4 #include <grass/dbmi.h>
19 case DB_C_TYPE_STRING:
23 sscanf(Cstring,
"%d", &i);
26 case DB_C_TYPE_DOUBLE:
28 sscanf(Cstring,
"%lf", &d);
31 case DB_C_TYPE_DATETIME:
34 db_error(
"db_convert_Cstring_to_value(): unrecognized sqltype");
60 case DB_C_TYPE_DOUBLE:
64 case DB_C_TYPE_STRING:
67 case DB_C_TYPE_DATETIME:
72 (
"db_convert_value_into_string(): unrecongized sqltype-type");
int db_test_value_isnull(dbValue *value)
sprintf(buf2,"%s", G3D_CATS_ELEMENT)
void db_set_value_int(dbValue *value, int i)
int G_trim_decimal(char *buf)
Removes trailing zeros from decimal number.
void db_error(const char *s)
int db_convert_value_to_string(dbValue *value, int sqltype, dbString *string)
int db_convert_value_datetime_into_string(dbValue *value, int sqltype, dbString *string)
int db_sqltype_to_Ctype(int sqltype)
void db_set_value_double(dbValue *value, double d)
double db_get_value_double(dbValue *value)
char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]
int db_set_value_string(dbValue *value, const char *s)
int db_set_string(dbString *x, const char *s)
int db_get_value_int(dbValue *value)
int db_convert_Cstring_to_value(const char *Cstring, int sqltype, dbValue *value)
const char * db_get_value_string(dbValue *value)
int db_convert_Cstring_to_value_datetime(const char *buf, int sqltype, dbValue *value)