1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* drizzle-interface: Interface Wrappers for Drizzle
5
* Copyright (c) 2009 Sun Microsystems
8
* Redistribution and use in source and binary forms, with or without
9
* modification, are permitted provided that the following conditions are met:
11
* 1. Redistributions of source code must retain the above copyright
12
* notice, this list of conditions and the following disclaimer.
13
* 2. Redistributions in binary form must reproduce the above copyright
14
* notice, this list of conditions and the following disclaimer in the
15
* documentation and/or other materials provided with the distribution.
16
* 3. The name of the author may not be used to endorse or promote products
17
* derived from this software without specific prior written permission.
19
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
23
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32
%rename(ColumnServer) column_server;
34
class column_server : public drizzle_column {};
36
%extend column_server {
39
* Set catalog name for a column.
41
void set_catalog(const char *catalog)
43
drizzle_column_set_catalog($self, catalog);
48
* Set database name for a column.
50
void set_db(const char *db)
52
drizzle_column_set_db($self, db);
57
* Set table name for a column.
59
void set_table(drizzle_column_st *column, const char *table)
61
drizzle_column_set_table($self, table);
66
* Set original table name for a column.
68
void set_orig_table(const char *orig_table)
70
drizzle_column_set_orig_table($self, orig_table);
75
* Set column name for a column.
77
void set_name(const char *name)
79
drizzle_column_set_name($self, name);
84
* Set original column name for a column.
86
void set_orig_name(const char *orig_name)
88
drizzle_column_set_orig_name($self, orig_name);
93
* Set charset for a column.
95
void set_charset(drizzle_charset_t charset)
97
drizzle_column_set_charset($self, charset);
102
* Set size of a column.
104
void set_size(uint32_t size)
106
drizzle_column_set_size($self, size);
111
* Set the type of a column.
113
void set_type(drizzle_column_type_t type)
115
drizzle_column_set_type($self, type);
120
* Set flags for a column.
122
void set_flags(drizzle_column_flags_t flags)
124
drizzle_column_set_flags($self, flags);
129
* Set the number of decimals for numeric columns.
131
void set_decimals(uint8_t decimals)
133
drizzle_column_set_decimals($self, decimals);
138
* Set default value for a column.
140
void set_default_value(const uint8_t *default_value, size_t size)
142
drizzle_column_set_default_value($self, default_value, size);