~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/dtcollation.h

  • Committer: Padraig O'Sullivan
  • Date: 2009-08-26 04:24:02 UTC
  • mto: This revision was merged to the branch mainline in revision 1139.
  • Revision ID: osullivan.padraig@gmail.com-20090826042402-ryh95r58b7godtbj
Made all data members of the KeyField class private and provided accessors
when necessary.

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, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
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
20
20
#ifndef DRIZZLED_DTCOLLATION_H
21
21
#define DRIZZLED_DTCOLLATION_H
22
22
 
23
 
#include "drizzled/definitions.h"
24
 
#include "drizzled/visibility.h"
 
23
#include <stdint.h>
25
24
 
26
 
namespace drizzled
27
 
{
 
25
#include <drizzled/definitions.h>
28
26
 
29
27
class Item;
30
 
struct charset_info_st;
31
 
 
32
 
class DRIZZLED_API DTCollation
33
 
{
 
28
typedef struct charset_info_st CHARSET_INFO;
 
29
 
 
30
 
 
31
class DTCollation {
34
32
public:
35
 
  const charset_info_st *collation;
 
33
  const CHARSET_INFO *collation;
36
34
  enum Derivation derivation;
37
35
 
38
 
  DRIZZLED_LOCAL DTCollation();
39
 
  DRIZZLED_LOCAL DTCollation(const charset_info_st * const collation_arg,
40
 
                             Derivation derivation_arg);
 
36
  DTCollation();
 
37
  DTCollation(const CHARSET_INFO * const collation_arg,
 
38
              Derivation derivation_arg);
41
39
  void set(DTCollation &dt);
42
 
  void set(const charset_info_st * const collation_arg,
 
40
  void set(const CHARSET_INFO * const collation_arg,
43
41
           Derivation derivation_arg);
44
 
  void set(const charset_info_st * const collation_arg);
 
42
  void set(const CHARSET_INFO * const collation_arg);
45
43
  void set(Derivation derivation_arg);
46
44
  bool set(DTCollation &dt1, DTCollation &dt2, uint32_t flags= 0);
47
45
 
81
79
  @endcode
82
80
*/
83
81
 
84
 
  DRIZZLED_LOCAL bool aggregate(DTCollation &dt, uint32_t flags= 0);
 
82
  bool aggregate(DTCollation &dt, uint32_t flags= 0);
85
83
 
86
 
  DRIZZLED_LOCAL const char *derivation_name() const;
 
84
  const char *derivation_name() const;
87
85
 
88
86
};
89
87
 
95
93
                                        Item **items, uint32_t nitems,
96
94
                                        uint32_t flags);
97
95
 
98
 
/*
99
 
 
100
 
 @note In Drizzle we have just one charset, so no conversion is required (though collation may).
101
 
 
 
96
/**
102
97
  Collect arguments' character sets together.
103
98
 
104
99
  We allow to apply automatic character set conversion in some cases.
139
134
void my_coll_agg_error(Item** args, uint32_t count, const char *fname,
140
135
                       int item_sep);
141
136
 
142
 
} /* namespace drizzled */
143
 
 
144
137
#endif /* DRIZZLED_DTCOLLATION_H */