GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
columnfmt.c
Go to the documentation of this file.
1 #include <grass/dbmi.h>
2 
9 int db_convert_Cstring_to_column_value(const char *Cstring, dbColumn * column)
10 {
11  dbValue *value;
12  int sqltype;
13 
14  sqltype = db_get_column_sqltype(column);
15  value = db_get_column_value(column);
16  return db_convert_Cstring_to_value(Cstring, sqltype, value);
17 }
18 
25 int
27  dbColumn * column)
28 {
29  dbValue *value;
30  int sqltype;
31 
32  sqltype = db_get_column_sqltype(column);
33  value = db_get_column_default_value(column);
34  return db_convert_Cstring_to_value(Cstring, sqltype, value);
35 }
36 
43 int db_convert_column_value_to_string(dbColumn * column, dbString * string)
44 {
45  int sqltype;
46  dbValue *value;
47 
48  sqltype = db_get_column_sqltype(column);
49  value = db_get_column_value(column);
50  return db_convert_value_to_string(value, sqltype, string);
51 }
52 
59 int
61  dbString * string)
62 {
63  int sqltype;
64  dbValue *value;
65 
66  sqltype = db_get_column_sqltype(column);
67  value = db_get_column_default_value(column);
68  return db_convert_value_to_string(value, sqltype, string);
69 }
int db_convert_Cstring_to_column_value(const char *Cstring, dbColumn *column)
Definition: columnfmt.c:9
dbValue * db_get_column_default_value(dbColumn *column)
returns column default value for given column structure
int db_convert_Cstring_to_column_default_value(const char *Cstring, dbColumn *column)
Definition: columnfmt.c:26
int db_convert_value_to_string(dbValue *value, int sqltype, dbString *string)
Definition: valuefmt.c:47
int db_convert_column_value_to_string(dbColumn *column, dbString *string)
Definition: columnfmt.c:43
int db_get_column_sqltype(dbColumn *column)
returns column sqltype for column (the function db_sqltype_name() returns sqltype description) ...
int db_convert_column_default_value_to_string(dbColumn *column, dbString *string)
Definition: columnfmt.c:60
dbValue * db_get_column_value(dbColumn *column)
returns column value for given column structure
char * value
Definition: env.c:30
int db_convert_Cstring_to_value(const char *Cstring, int sqltype, dbValue *value)
Definition: valuefmt.c:13