~mordred/drizzle-interface/cython-interface

« back to all changes in this revision

Viewing changes to interface/libdrizzle/column_server.i

  • Committer: Monty Taylor
  • Date: 2009-10-28 02:20:39 UTC
  • mfrom: (113.1.2 c-transition)
  • Revision ID: mordred@inaugust.com-20091028022039-a202c33y8nm06x5n
Merged in transition to C.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 
 *
4
 
 * drizzle-interface: Interface Wrappers for Drizzle
5
 
 * Copyright (c) 2009 Sun Microsystems
6
 
 * All rights reserved.
7
 
 *
8
 
 * Redistribution and use in source and binary forms, with or without
9
 
 * modification, are permitted provided that the following conditions are met:
10
 
 *
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.
18
 
 *
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.
30
 
 */
31
 
 
32
 
%rename(ColumnServer) column_server;
33
 
 
34
 
class column_server : public drizzle_column {};
35
 
 
36
 
%extend column_server {
37
 
 
38
 
  /**
39
 
   * Set catalog name for a column.
40
 
   */
41
 
  void set_catalog(const char *catalog)
42
 
  {
43
 
    drizzle_column_set_catalog($self, catalog);
44
 
  }
45
 
 
46
 
 
47
 
  /**
48
 
   * Set database name for a column.
49
 
   */
50
 
  void set_db(const char *db)
51
 
  {
52
 
    drizzle_column_set_db($self, db);
53
 
  }
54
 
 
55
 
 
56
 
  /**
57
 
   * Set table name for a column.
58
 
   */
59
 
  void set_table(drizzle_column_st *column, const char *table)
60
 
  {
61
 
    drizzle_column_set_table($self, table);
62
 
  }
63
 
 
64
 
 
65
 
  /**
66
 
   * Set original table name for a column.
67
 
   */
68
 
  void set_orig_table(const char *orig_table)
69
 
  {
70
 
    drizzle_column_set_orig_table($self, orig_table);
71
 
  }
72
 
 
73
 
 
74
 
  /**
75
 
   * Set column name for a column.
76
 
   */
77
 
  void set_name(const char *name)
78
 
  {
79
 
    drizzle_column_set_name($self, name);
80
 
  }
81
 
 
82
 
 
83
 
  /**
84
 
   * Set original column name for a column.
85
 
   */
86
 
  void set_orig_name(const char *orig_name)
87
 
  {
88
 
    drizzle_column_set_orig_name($self, orig_name);
89
 
  }
90
 
 
91
 
 
92
 
  /**
93
 
   * Set charset for a column.
94
 
   */
95
 
  void set_charset(drizzle_charset_t charset)
96
 
  {
97
 
    drizzle_column_set_charset($self, charset);
98
 
  }
99
 
 
100
 
 
101
 
  /**
102
 
   * Set size of a column.
103
 
   */
104
 
  void set_size(uint32_t size)
105
 
  {
106
 
    drizzle_column_set_size($self, size);
107
 
  }
108
 
 
109
 
 
110
 
  /**
111
 
   * Set the type of a column.
112
 
   */
113
 
  void set_type(drizzle_column_type_t type)
114
 
  {
115
 
    drizzle_column_set_type($self, type);
116
 
  }
117
 
 
118
 
 
119
 
  /**
120
 
   * Set flags for a column.
121
 
   */
122
 
  void set_flags(drizzle_column_flags_t flags)
123
 
  {
124
 
    drizzle_column_set_flags($self, flags);
125
 
  }
126
 
 
127
 
 
128
 
  /**
129
 
   * Set the number of decimals for numeric columns.
130
 
   */
131
 
  void set_decimals(uint8_t decimals)
132
 
  {
133
 
    drizzle_column_set_decimals($self, decimals);
134
 
  }
135
 
 
136
 
 
137
 
  /**
138
 
   * Set default value for a column.
139
 
   */
140
 
  void set_default_value(const uint8_t *default_value, size_t size)
141
 
  {
142
 
    drizzle_column_set_default_value($self, default_value, size);
143
 
  }
144
 
 
145
 
 
146
 
}