00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #pragma once
00018
00019 #include <drizzled/common_fwd.h>
00020
00021 namespace drizzled {
00022
00023 class TYPELIB
00024 {
00025 public:
00026 enum e_find_options
00027 {
00028 e_none = 0,
00029 e_match_full = 1,
00030 e_dont_complete = 2,
00031
00032 e_default = 3
00033 };
00034
00035 TYPELIB* copy_typelib(memory::Root&) const;
00036 int find_type_or_exit(const char*, const char* option) const;
00037 int find_type(const char*, e_find_options) const;
00038 const char *get_type(unsigned int nr) const;
00039
00040 uint64_t find_set(const char *x, uint32_t length, const charset_info_st*,
00041 char **err_pos, uint32_t *err_len, bool *set_warning) const;
00042 uint32_t find_type(const char *find, uint32_t length, bool part_match) const;
00043 uint32_t find_type2(const char *find, uint32_t length, const charset_info_st*) const;
00044
00045 unsigned int count;
00046 const char *name;
00047 const char **type_names;
00048 unsigned int *type_lengths;
00049 };
00050
00051 }
00052