~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/dtcollation.h

  • Committer: Daniel Nichter
  • Date: 2011-10-23 16:01:37 UTC
  • mto: This revision was merged to the branch mainline in revision 2448.
  • Revision ID: daniel@percona.com-20111023160137-7ac3blgz8z4tf8za
Add Administration Getting Started and Logging.  Capitalize SQL clause keywords.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems
 
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef DRIZZLED_DTCOLLATION_H
21
 
#define DRIZZLED_DTCOLLATION_H
22
 
 
23
 
#include <stdint.h>
 
20
#pragma once
24
21
 
25
22
#include <drizzled/definitions.h>
26
 
 
27
 
class Item;
28
 
typedef struct charset_info_st CHARSET_INFO;
29
 
 
30
 
 
31
 
class DTCollation {
 
23
#include <drizzled/visibility.h>
 
24
 
 
25
namespace drizzled {
 
26
 
 
27
class DRIZZLED_API DTCollation
 
28
{
32
29
public:
33
 
  const CHARSET_INFO *collation;
34
 
  enum Derivation derivation;
35
 
  uint32_t repertoire;
36
 
 
37
 
  void set_repertoire_from_charset(const CHARSET_INFO * const cs);
38
 
 
39
 
  DTCollation();
40
 
  DTCollation(const CHARSET_INFO * const collation_arg,
41
 
              Derivation derivation_arg);
 
30
  const charset_info_st* collation;
 
31
  Derivation derivation;
 
32
 
 
33
  DRIZZLED_LOCAL DTCollation();
 
34
  DRIZZLED_LOCAL DTCollation(const charset_info_st*, Derivation);
42
35
  void set(DTCollation &dt);
43
 
  void set(const CHARSET_INFO * const collation_arg,
44
 
           Derivation derivation_arg);
45
 
  void set(const CHARSET_INFO * const collation_arg,
46
 
           Derivation derivation_arg,
47
 
           uint32_t repertoire_arg);
48
 
  void set(const CHARSET_INFO * const collation_arg);
 
36
  void set(const charset_info_st*, Derivation);
 
37
  void set(const charset_info_st*);
49
38
  void set(Derivation derivation_arg);
50
39
  bool set(DTCollation &dt1, DTCollation &dt2, uint32_t flags= 0);
51
40
 
85
74
  @endcode
86
75
*/
87
76
 
88
 
  bool aggregate(DTCollation &dt, uint32_t flags= 0);
 
77
  DRIZZLED_LOCAL bool aggregate(DTCollation &dt, uint32_t flags= 0);
89
78
 
90
 
  const char *derivation_name() const;
 
79
  DRIZZLED_LOCAL const char *derivation_name() const;
91
80
 
92
81
};
93
82
 
99
88
                                        Item **items, uint32_t nitems,
100
89
                                        uint32_t flags);
101
90
 
102
 
/**
 
91
/*
 
92
 
 
93
 @note In Drizzle we have just one charset, so no conversion is required (though collation may).
 
94
 
103
95
  Collect arguments' character sets together.
104
96
 
105
97
  We allow to apply automatic character set conversion in some cases.
140
132
void my_coll_agg_error(Item** args, uint32_t count, const char *fname,
141
133
                       int item_sep);
142
134
 
143
 
#endif /* DRIZZLED_DTCOLLATION_H */
 
135
} /* namespace drizzled */
 
136