GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
dbmi_base/column.c File Reference
#include <stdlib.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/dbmi.h>
Include dependency graph for dbmi_base/column.c:

Go to the source code of this file.

Functions

dbColumn * db_get_table_column (dbTable *table, int n)
 returns column structure for given table and column number More...
 
dbValue * db_get_column_value (dbColumn *column)
 returns column value for given column structure More...
 
dbValue * db_get_column_default_value (dbColumn *column)
 returns column default value for given column structure More...
 
void db_set_column_sqltype (dbColumn *column, int sqltype)
 define column sqltype for column (the function db_sqltype_name() returns sqltype description) More...
 
void db_set_column_host_type (dbColumn *column, int type)
 
int db_get_column_scale (dbColumn *column)
 
void db_set_column_scale (dbColumn *column, int scale)
 
int db_get_column_precision (dbColumn *column)
 
void db_set_column_precision (dbColumn *column, int precision)
 
int db_get_column_sqltype (dbColumn *column)
 returns column sqltype for column (the function db_sqltype_name() returns sqltype description) More...
 
int db_get_column_host_type (dbColumn *column)
 
void db_set_column_has_defined_default_value (dbColumn *column)
 
void db_set_column_has_undefined_default_value (dbColumn *column)
 
void db_unset_column_has_default_value (dbColumn *column)
 
int db_test_column_has_default_value (dbColumn *column)
 
int db_test_column_has_defined_default_value (dbColumn *column)
 
int db_test_column_has_undefined_default_value (dbColumn *column)
 
void db_set_column_use_default_value (dbColumn *column)
 
void db_unset_column_use_default_value (dbColumn *column)
 
int db_test_column_use_default_value (dbColumn *column)
 
void db_set_column_null_allowed (dbColumn *column)
 
void db_unset_column_null_allowed (dbColumn *column)
 
int db_test_column_null_allowed (dbColumn *column)
 
int db_get_column_length (dbColumn *column)
 
void db_set_column_length (dbColumn *column, int length)
 
void db_set_column_select_priv_granted (dbColumn *column)
 
void db_set_column_select_priv_not_granted (dbColumn *column)
 
int db_get_column_select_priv (dbColumn *column)
 
void db_set_column_update_priv_granted (dbColumn *column)
 
void db_set_column_update_priv_not_granted (dbColumn *column)
 
int db_get_column_update_priv (dbColumn *column)
 
void db_init_column (dbColumn *column)
 
int db_set_column_name (dbColumn *column, const char *name)
 
const char * db_get_column_name (dbColumn *column)
 returns column name for given column More...
 
int db_set_column_description (dbColumn *column, const char *description)
 
const char * db_get_column_description (dbColumn *column)
 returns column description for given column More...
 
void db_free_column (dbColumn *column)
 frees column structure More...
 

Function Documentation

void db_free_column ( dbColumn *  column)

frees column structure

Returns
Parameters

Definition at line 374 of file dbmi_base/column.c.

References db_free_string().

Referenced by db_d_add_column(), and db_free_table().

dbValue* db_get_column_default_value ( dbColumn *  column)

returns column default value for given column structure

Returns
Parameters

Definition at line 33 of file dbmi_base/column.c.

Referenced by db__recv_column_default_value(), db__send_column_default_value(), db_convert_column_default_value_to_string(), and db_convert_Cstring_to_column_default_value().

const char* db_get_column_description ( dbColumn *  column)

returns column description for given column

Returns
Parameters

Definition at line 364 of file dbmi_base/column.c.

References db_get_string().

Referenced by db__copy_table(), db_get_column(), and db_print_column_definition().

int db_get_column_host_type ( dbColumn *  column)

Definition at line 110 of file dbmi_base/column.c.

int db_get_column_length ( dbColumn *  column)
Returns
Parameters

Definition at line 240 of file dbmi_base/column.c.

Referenced by db__copy_table(), db_print_column_definition(), db_table_to_sql(), and F_generate().

const char* db_get_column_name ( dbColumn *  column)
int db_get_column_precision ( dbColumn *  column)
Returns
Parameters

Definition at line 84 of file dbmi_base/column.c.

Referenced by db__copy_table(), and db_print_column_definition().

int db_get_column_scale ( dbColumn *  column)
Returns
Parameters

Definition at line 64 of file dbmi_base/column.c.

Referenced by db__copy_table(), and db_print_column_definition().

int db_get_column_select_priv ( dbColumn *  column)
Returns
Parameters

Definition at line 280 of file dbmi_base/column.c.

Referenced by db_get_table_select_priv(), and db_print_column_definition().

int db_get_column_update_priv ( dbColumn *  column)
Returns
Parameters

Definition at line 310 of file dbmi_base/column.c.

Referenced by db_get_table_update_priv(), and db_print_column_definition().

void db_init_column ( dbColumn *  column)
Returns
Parameters

Definition at line 320 of file dbmi_base/column.c.

References db_init_string(), and db_zero().

Referenced by db_alloc_table(), db_d_add_column(), and db_get_column().

int db_set_column_description ( dbColumn *  column,
const char *  description 
)
Returns
Parameters

Definition at line 354 of file dbmi_base/column.c.

References db_set_string().

Referenced by db__copy_table().

void db_set_column_has_defined_default_value ( dbColumn *  column)
Returns
Parameters

Definition at line 120 of file dbmi_base/column.c.

void db_set_column_has_undefined_default_value ( dbColumn *  column)
Returns
Parameters

Definition at line 130 of file dbmi_base/column.c.

void db_set_column_host_type ( dbColumn *  column,
int  type 
)
Returns
Parameters

Definition at line 54 of file dbmi_base/column.c.

References dialogs::type.

void db_set_column_length ( dbColumn *  column,
int  length 
)
Returns
Parameters

Definition at line 250 of file dbmi_base/column.c.

Referenced by db__copy_table().

int db_set_column_name ( dbColumn *  column,
const char *  name 
)
Returns
Parameters

Definition at line 334 of file dbmi_base/column.c.

References db_set_string().

Referenced by db__copy_table().

void db_set_column_null_allowed ( dbColumn *  column)
Returns
Parameters

Definition at line 210 of file dbmi_base/column.c.

void db_set_column_precision ( dbColumn *  column,
int  precision 
)
Returns
Parameters

Definition at line 94 of file dbmi_base/column.c.

Referenced by db__copy_table().

void db_set_column_scale ( dbColumn *  column,
int  scale 
)
Returns
Parameters

Definition at line 74 of file dbmi_base/column.c.

Referenced by db__copy_table().

void db_set_column_select_priv_granted ( dbColumn *  column)
Returns
Parameters

Definition at line 260 of file dbmi_base/column.c.

Referenced by db_set_table_select_priv_granted().

void db_set_column_select_priv_not_granted ( dbColumn *  column)
Returns
Parameters

Definition at line 270 of file dbmi_base/column.c.

Referenced by db_set_table_select_priv_not_granted().

void db_set_column_sqltype ( dbColumn *  column,
int  sqltype 
)

define column sqltype for column (the function db_sqltype_name() returns sqltype description)

Returns
Parameters

Definition at line 44 of file dbmi_base/column.c.

Referenced by db__copy_table().

void db_set_column_update_priv_granted ( dbColumn *  column)
Returns
Parameters

Definition at line 290 of file dbmi_base/column.c.

Referenced by db_set_table_update_priv_granted().

void db_set_column_update_priv_not_granted ( dbColumn *  column)
Returns
Parameters

Definition at line 300 of file dbmi_base/column.c.

Referenced by db_set_table_update_priv_not_granted().

void db_set_column_use_default_value ( dbColumn *  column)
Returns
Parameters

Definition at line 180 of file dbmi_base/column.c.

int db_test_column_has_default_value ( dbColumn *  column)
Returns
Parameters

Definition at line 150 of file dbmi_base/column.c.

Referenced by db_print_column_definition().

int db_test_column_has_defined_default_value ( dbColumn *  column)
Returns
Parameters

Definition at line 160 of file dbmi_base/column.c.

int db_test_column_has_undefined_default_value ( dbColumn *  column)
Returns
Parameters

Definition at line 170 of file dbmi_base/column.c.

int db_test_column_null_allowed ( dbColumn *  column)
Returns
Parameters

Definition at line 230 of file dbmi_base/column.c.

Referenced by db_print_column_definition().

int db_test_column_use_default_value ( dbColumn *  column)
Returns
Parameters

Definition at line 200 of file dbmi_base/column.c.

void db_unset_column_has_default_value ( dbColumn *  column)
Returns
Parameters

Definition at line 140 of file dbmi_base/column.c.

void db_unset_column_null_allowed ( dbColumn *  column)
Returns
Parameters

Definition at line 220 of file dbmi_base/column.c.

void db_unset_column_use_default_value ( dbColumn *  column)
Returns
Parameters

Definition at line 190 of file dbmi_base/column.c.