~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/column.h

  • Committer: Mark Atwood
  • Date: 2008-10-16 11:33:16 UTC
  • mto: (520.1.13 drizzle)
  • mto: This revision was merged to the branch mainline in revision 530.
  • Revision ID: mark@fallenpegasus.com-20081016113316-ff6jdt31ck90sjdh
an implemention of the errmsg plugin

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Drizzle Client & Protocol Library
3
 
 *
4
 
 * Copyright (C) 2008 Eric Day (eday@oddments.org)
5
 
 * All rights reserved.
6
 
 *
7
 
 * Use and distribution licensed under the BSD license.  See
8
 
 * the COPYING.BSD file in the root source directory for full text.
9
 
 */
10
 
 
11
 
/**
12
 
 * @file
13
 
 * @brief Column Declarations
14
 
 */
15
 
 
16
 
#ifndef __DRIZZLE_COLUMN_H
17
 
#define __DRIZZLE_COLUMN_H
18
 
 
19
 
#ifdef __cplusplus
20
 
extern "C" {
21
 
#endif
22
 
 
23
 
/**
24
 
 * @addtogroup drizzle_column Column Declarations
25
 
 * @ingroup drizzle_client_interface
26
 
 * @ingroup drizzle_server_interface
27
 
 *
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.
31
 
 * @{
32
 
 */
33
 
 
34
 
/**
35
 
 * Initialize a column structure.
36
 
 */
37
 
DRIZZLE_API
38
 
drizzle_column_st *drizzle_column_create(drizzle_result_st *result,
39
 
                                         drizzle_column_st *column);
40
 
 
41
 
/**
42
 
 * Free a column structure.
43
 
 */
44
 
DRIZZLE_API
45
 
void drizzle_column_free(drizzle_column_st *column);
46
 
 
47
 
/**
48
 
 * Get the drizzle_result_st struct that the column belongs to.
49
 
 */
50
 
DRIZZLE_API
51
 
drizzle_result_st *drizzle_column_drizzle_result(drizzle_column_st *column);
52
 
 
53
 
/**
54
 
 * Get catalog name for a column.
55
 
 */
56
 
DRIZZLE_API
57
 
const char *drizzle_column_catalog(drizzle_column_st *column);
58
 
 
59
 
/**
60
 
 * Get database name for a column.
61
 
 */
62
 
DRIZZLE_API
63
 
const char *drizzle_column_db(drizzle_column_st *column);
64
 
 
65
 
/**
66
 
 * Get table name for a column.
67
 
 */
68
 
DRIZZLE_API
69
 
const char *drizzle_column_table(drizzle_column_st *column);
70
 
 
71
 
/**
72
 
 * Get original table name for a column.
73
 
 */
74
 
DRIZZLE_API
75
 
const char *drizzle_column_orig_table(drizzle_column_st *column);
76
 
 
77
 
/**
78
 
 * Get column name for a column.
79
 
 */
80
 
DRIZZLE_API
81
 
const char *drizzle_column_name(drizzle_column_st *column);
82
 
 
83
 
/**
84
 
 * Get original column name for a column.
85
 
 */
86
 
DRIZZLE_API
87
 
const char *drizzle_column_orig_name(drizzle_column_st *column);
88
 
 
89
 
/**
90
 
 * Get charset for a column.
91
 
 */
92
 
DRIZZLE_API
93
 
drizzle_charset_t drizzle_column_charset(drizzle_column_st *column);
94
 
 
95
 
/**
96
 
 * Get size of a column.
97
 
 */
98
 
DRIZZLE_API
99
 
uint32_t drizzle_column_size(drizzle_column_st *column);
100
 
 
101
 
/**
102
 
 * Get max size of a column.
103
 
 */
104
 
DRIZZLE_API
105
 
size_t drizzle_column_max_size(drizzle_column_st *column);
106
 
 
107
 
/**
108
 
 * Set max size of a column.
109
 
 */
110
 
DRIZZLE_API
111
 
void drizzle_column_set_max_size(drizzle_column_st *column, size_t size);
112
 
 
113
 
/**
114
 
 * Get the type of a column.
115
 
 */
116
 
DRIZZLE_API
117
 
drizzle_column_type_t drizzle_column_type(drizzle_column_st *column);
118
 
 
119
 
/**
120
 
 * Get the Drizzle type of a column.
121
 
 */
122
 
DRIZZLE_API
123
 
drizzle_column_type_drizzle_t
124
 
drizzle_column_type_drizzle(drizzle_column_st *column);
125
 
 
126
 
/**
127
 
 * Get flags for a column.
128
 
 */
129
 
DRIZZLE_API
130
 
drizzle_column_flags_t drizzle_column_flags(drizzle_column_st *column);
131
 
 
132
 
/**
133
 
 * Get the number of decimals for numeric columns.
134
 
 */
135
 
DRIZZLE_API
136
 
uint8_t drizzle_column_decimals(drizzle_column_st *column);
137
 
 
138
 
/**
139
 
 * Get default value for a column.
140
 
 */
141
 
DRIZZLE_API
142
 
const uint8_t *drizzle_column_default_value(drizzle_column_st *column,
143
 
                                            size_t *size);
144
 
 
145
 
/** @} */
146
 
 
147
 
#ifdef __cplusplus
148
 
}
149
 
#endif
150
 
 
151
 
#endif /* __DRIZZLE_COLUMN_H */