1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems, Inc.
4
* Copyright (C) 2008 Sun Microsystems
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
20
20
#ifndef DRIZZLED_DTCOLLATION_H
21
21
#define DRIZZLED_DTCOLLATION_H
23
#include "drizzled/definitions.h"
24
#include "drizzled/visibility.h"
25
#include <drizzled/definitions.h>
30
struct charset_info_st;
32
class DRIZZLED_API DTCollation
28
typedef struct charset_info_st CHARSET_INFO;
35
const charset_info_st *collation;
33
const CHARSET_INFO *collation;
36
34
enum Derivation derivation;
38
DRIZZLED_LOCAL DTCollation();
39
DRIZZLED_LOCAL DTCollation(const charset_info_st * const collation_arg,
40
Derivation derivation_arg);
37
void set_repertoire_from_charset(const CHARSET_INFO * const cs);
40
DTCollation(const CHARSET_INFO * const collation_arg,
41
Derivation derivation_arg);
41
42
void set(DTCollation &dt);
42
void set(const charset_info_st * const collation_arg,
43
void set(const CHARSET_INFO * const collation_arg,
43
44
Derivation derivation_arg);
44
void set(const charset_info_st * const collation_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);
45
49
void set(Derivation derivation_arg);
46
50
bool set(DTCollation &dt1, DTCollation &dt2, uint32_t flags= 0);
84
DRIZZLED_LOCAL bool aggregate(DTCollation &dt, uint32_t flags= 0);
88
bool aggregate(DTCollation &dt, uint32_t flags= 0);
86
DRIZZLED_LOCAL const char *derivation_name() const;
90
const char *derivation_name() const;
95
99
Item **items, uint32_t nitems,
100
@note In Drizzle we have just one charset, so no conversion is required (though collation may).
102
103
Collect arguments' character sets together.
104
105
We allow to apply automatic character set conversion in some cases.
139
140
void my_coll_agg_error(Item** args, uint32_t count, const char *fname,
142
} /* namespace drizzled */
144
143
#endif /* DRIZZLED_DTCOLLATION_H */