~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/unique.h

  • Committer: Jay Pipes
  • Date: 2009-02-21 16:00:06 UTC
  • mto: (907.1.1 trunk-with-temporal)
  • mto: This revision was merged to the branch mainline in revision 908.
  • Revision ID: jpipes@serialcoder-20090221160006-vnk3wt4qbcz62eru
Removes the TIME column type and related time functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DRIZZLED_UNIQUE_H
22
22
#define DRIZZLED_UNIQUE_H
23
23
 
24
 
#include "drizzled/tree.h"
25
24
/*
26
25
   Unique -- class for unique (removing of duplicates).
27
26
   Puts all values to the TREE. If the tree becomes too big,
30
29
   memory simultaneously with iteration, so it should be ~2-3x faster.
31
30
 */
32
31
 
33
 
namespace drizzled
34
 
{
35
 
 
36
 
namespace internal
37
 
{
38
 
typedef struct st_io_cache IO_CACHE;
39
 
}
40
 
 
41
 
class Unique : public memory::SqlAlloc
 
32
class Unique :public Sql_alloc
42
33
{
43
34
  DYNAMIC_ARRAY file_ptrs;
44
35
  ulong max_elements;
45
36
  size_t max_in_memory_size;
46
 
  internal::IO_CACHE *file;
 
37
  IO_CACHE file;
47
38
  TREE tree;
48
39
  unsigned char *record_pointers;
49
40
  bool flush();
76
67
  void reset();
77
68
  bool walk(tree_walk_action action, void *walk_action_arg);
78
69
 
79
 
  friend int unique_write_to_file(unsigned char* key, uint32_t count, Unique *unique);
80
 
  friend int unique_write_to_ptrs(unsigned char* key, uint32_t count, Unique *unique);
 
70
  friend int unique_write_to_file(unsigned char* key, element_count count, Unique *unique);
 
71
  friend int unique_write_to_ptrs(unsigned char* key, element_count count, Unique *unique);
81
72
};
82
73
 
83
 
} /* namespace drizzled */
84
 
 
85
74
#endif /* DRIZZLED_UNIQUE_H */