2
* Drizzle Client & Protocol Library
4
* Copyright (C) 2008 Eric Day (eday@oddments.org)
7
* Use and distribution licensed under the BSD license. See
8
* the COPYING file in this directory for full text.
13
* @brief Column Declarations
16
#ifndef __DRIZZLE_COLUMN_H
17
#define __DRIZZLE_COLUMN_H
24
* @addtogroup drizzle_column Column Declarations
25
* @ingroup drizzle_client_interface
26
* @ingroup drizzle_server_interface
28
* These functions are used to get detailed column information. This information
29
* is usually sent as the first part of a result set. There are multiple ways
30
* for column information to be buffered depending on the functions being used.
35
* Initialize a column structure.
38
drizzle_column_st *drizzle_column_create(drizzle_result_st *result,
39
drizzle_column_st *column);
42
* Free a column structure.
45
void drizzle_column_free(drizzle_column_st *column);
48
* Get the drizzle_result_st struct that the column belongs to.
51
drizzle_result_st *drizzle_column_drizzle_result(drizzle_column_st *column);
54
* Get catalog name for a column.
57
const char *drizzle_column_catalog(drizzle_column_st *column);
60
* Get database name for a column.
63
const char *drizzle_column_db(drizzle_column_st *column);
66
* Get table name for a column.
69
const char *drizzle_column_table(drizzle_column_st *column);
72
* Get original table name for a column.
75
const char *drizzle_column_orig_table(drizzle_column_st *column);
78
* Get column name for a column.
81
const char *drizzle_column_name(drizzle_column_st *column);
84
* Get original column name for a column.
87
const char *drizzle_column_orig_name(drizzle_column_st *column);
90
* Get charset for a column.
93
drizzle_charset_t drizzle_column_charset(drizzle_column_st *column);
96
* Get size of a column.
99
uint32_t drizzle_column_size(drizzle_column_st *column);
102
* Get max size of a column.
105
size_t drizzle_column_max_size(drizzle_column_st *column);
108
* Set max size of a column.
111
void drizzle_column_set_max_size(drizzle_column_st *column, size_t size);
114
* Get the type of a column.
117
drizzle_column_type_t drizzle_column_type(drizzle_column_st *column);
120
* Get the Drizzle type of a column.
123
drizzle_column_type_drizzle_t
124
drizzle_column_type_drizzle(drizzle_column_st *column);
127
* Get flags for a column.
130
drizzle_column_flags_t drizzle_column_flags(drizzle_column_st *column);
133
* Get the number of decimals for numeric columns.
136
uint8_t drizzle_column_decimals(drizzle_column_st *column);
139
* Get default value for a column.
142
const uint8_t *drizzle_column_default_value(drizzle_column_st *column,
151
#endif /* __DRIZZLE_COLUMN_H */