00001 /* 00002 * Drizzle Client & Protocol Library 00003 * 00004 * Copyright (C) 2008 Eric Day (eday@oddments.org) 00005 * All rights reserved. 00006 * 00007 * Redistribution and use in source and binary forms, with or without 00008 * modification, are permitted provided that the following conditions are 00009 * met: 00010 * 00011 * * Redistributions of source code must retain the above copyright 00012 * notice, this list of conditions and the following disclaimer. 00013 * 00014 * * Redistributions in binary form must reproduce the above 00015 * copyright notice, this list of conditions and the following disclaimer 00016 * in the documentation and/or other materials provided with the 00017 * distribution. 00018 * 00019 * * The names of its contributors may not be used to endorse or 00020 * promote products derived from this software without specific prior 00021 * written permission. 00022 * 00023 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00024 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00025 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 00026 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00027 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00028 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 00029 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00030 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00031 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00032 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 00033 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00034 * 00035 */ 00036 00037 00043 #ifndef __DRIZZLE_COLUMN_H 00044 #define __DRIZZLE_COLUMN_H 00045 00046 #ifdef __cplusplus 00047 extern "C" { 00048 #endif 00049 00064 DRIZZLE_API 00065 drizzle_column_st *drizzle_column_create(drizzle_result_st *result, 00066 drizzle_column_st *column); 00067 00071 DRIZZLE_API 00072 void drizzle_column_free(drizzle_column_st *column); 00073 00077 DRIZZLE_API 00078 drizzle_result_st *drizzle_column_drizzle_result(drizzle_column_st *column); 00079 00083 DRIZZLE_API 00084 const char *drizzle_column_catalog(drizzle_column_st *column); 00085 00089 DRIZZLE_API 00090 const char *drizzle_column_db(drizzle_column_st *column); 00091 00095 DRIZZLE_API 00096 const char *drizzle_column_table(drizzle_column_st *column); 00097 00101 DRIZZLE_API 00102 const char *drizzle_column_orig_table(drizzle_column_st *column); 00103 00107 DRIZZLE_API 00108 const char *drizzle_column_name(drizzle_column_st *column); 00109 00113 DRIZZLE_API 00114 const char *drizzle_column_orig_name(drizzle_column_st *column); 00115 00119 DRIZZLE_API 00120 drizzle_charset_t drizzle_column_charset(drizzle_column_st *column); 00121 00125 DRIZZLE_API 00126 uint32_t drizzle_column_size(drizzle_column_st *column); 00127 00131 DRIZZLE_API 00132 size_t drizzle_column_max_size(drizzle_column_st *column); 00133 00137 DRIZZLE_API 00138 void drizzle_column_set_max_size(drizzle_column_st *column, size_t size); 00139 00143 DRIZZLE_API 00144 drizzle_column_type_t drizzle_column_type(drizzle_column_st *column); 00145 00149 DRIZZLE_API 00150 drizzle_column_type_drizzle_t 00151 drizzle_column_type_drizzle(drizzle_column_st *column); 00152 00156 DRIZZLE_API 00157 drizzle_column_flags_t drizzle_column_flags(drizzle_column_st *column); 00158 00162 DRIZZLE_API 00163 uint8_t drizzle_column_decimals(drizzle_column_st *column); 00164 00168 DRIZZLE_API 00169 const uint8_t *drizzle_column_default_value(drizzle_column_st *column, 00170 size_t *size); 00171 00174 #ifdef __cplusplus 00175 } 00176 #endif 00177 00178 #endif /* __DRIZZLE_COLUMN_H */