|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-ddeab64dbf
|
DBMI Library (base) - value management. More...

Go to the source code of this file.
DBMI Library (base) - value management.
(C) 1999-2009, 2011 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file value.c.
| int db_CatValArray_alloc | ( | dbCatValArray * | arr, |
| int | n | ||
| ) |
Allocate dbCatValArray.
| arr | pointer to dbCatValArray |
| n | number of items |
Definition at line 401 of file value.c.
References DB_OK, and G_calloc.
Referenced by db_select_CatValArray(), and Vedit_bulk_labeling().
| void db_CatValArray_free | ( | dbCatValArray * | arr | ) |
Free allocated dbCatValArray.
| arr | pointer to dbCatValArray |
Definition at line 373 of file value.c.
References DB_C_TYPE_DATETIME, DB_C_TYPE_STRING, db_free(), db_free_string(), and G_free().
Referenced by IL_vector_input_data_2d(), NetA_get_node_costs(), Vect_net_build_graph(), Vect_net_ttb_build_graph(), and Vedit_bulk_labeling().
| void db_CatValArray_init | ( | dbCatValArray * | arr | ) |
Initialize dbCatValArray.
| arr | pointer to dbCatValArray to be initialized |
Definition at line 361 of file value.c.
References NULL.
Referenced by IL_vector_input_data_2d(), NetA_get_node_costs(), Vect_net_build_graph(), and Vect_net_ttb_build_graph().
| int db_CatValArray_realloc | ( | dbCatValArray * | arr, |
| int | n | ||
| ) |
Realloc dbCatValArray.
| arr | pointer to dbCatValArray |
| n | number of items |
Copy value.
Copy value from src to destination
| dst | destination dbValue |
| src | source dbValue |
Definition at line 340 of file value.c.
References _db_date_time::current, _db_value::d, _db_date_time::day, db_copy_string(), _db_date_time::hour, _db_value::i, _db_value::isNull, _db_date_time::minute, _db_date_time::month, _db_string::nalloc, _db_value::s, _db_date_time::seconds, _db_value::t, and _db_date_time::year.
Referenced by db_copy_column(), and db_select_value().
Get value as double.
For given value and C type of value returns double representation.
| value | pointer to dbValue |
| ctype | C data type |
Definition at line 65 of file value.c.
References DB_C_TYPE_DOUBLE, DB_C_TYPE_INT, DB_C_TYPE_STRING, db_get_value_double(), db_get_value_int(), and db_get_value_string().
Get day value.
| value | pointer to dbValue |
Definition at line 128 of file value.c.
References _db_date_time::day, and _db_value::t.
Referenced by db_convert_value_datetime_into_string().
Get double precision value.
| value | pointer to dbValue |
Definition at line 50 of file value.c.
References _db_value::d.
Referenced by db_convert_value_to_string(), db_get_value_as_double(), db_select_CatValArray(), db_select_int(), P_Aux_to_Vector(), and Vect_write_ascii().
Get hour value.
| value | pointer to dbValue |
Definition at line 140 of file value.c.
References _db_date_time::hour, and _db_value::t.
Referenced by db_convert_value_datetime_into_string().
Get integer value.
| value | pointer to dbValue |
Definition at line 38 of file value.c.
References _db_value::i.
Referenced by db_convert_value_to_string(), db_get_value_as_double(), db_select_CatValArray(), db_select_int(), Gp_load_sites_thematic(), Gv_load_vect_thematic(), NetA_init_distinct(), NetA_init_timetable_from_db(), and Vect_write_ascii().
Get minute value.
| value | pointer to dbValue |
Definition at line 152 of file value.c.
References _db_date_time::minute, and _db_value::t.
Referenced by db_convert_value_datetime_into_string().
Get month value.
| value | pointer to dbValue |
Definition at line 116 of file value.c.
References _db_date_time::month, and _db_value::t.
Referenced by db_convert_value_datetime_into_string().
Get seconds value.
| value | pointer to dbValue |
Definition at line 164 of file value.c.
References _db_date_time::seconds, and _db_value::t.
Referenced by db_convert_value_datetime_into_string().
Get string value.
| value | pointer to dbValue |
Definition at line 92 of file value.c.
References db_get_string(), and _db_value::s.
Referenced by db_convert_value_to_string(), db_get_value_as_double(), db_select_CatValArray(), db_select_int(), Gp_load_sites_thematic(), Gv_load_vect_thematic(), and Vect_write_ascii().
Get year value.
| value | pointer to dbValue |
Definition at line 104 of file value.c.
References _db_value::t, and _db_date_time::year.
Referenced by db_convert_value_datetime_into_string().
Set datetime to current.
| value | pointer to dbValue |
Definition at line 315 of file value.c.
References _db_date_time::current, db_set_value_not_null(), and _db_value::t.
Referenced by db_convert_Cstring_to_value_datetime().
Set value to non-current.
| value | pointer to dbValue |
Definition at line 326 of file value.c.
References _db_date_time::current, db_set_value_not_null(), and _db_value::t.
Referenced by db_set_value_day(), db_set_value_hour(), db_set_value_minute(), db_set_value_month(), db_set_value_seconds(), and db_set_value_year().
Set day value.
| value | pointer to dbValue |
| day | day value |
Definition at line 255 of file value.c.
References _db_date_time::day, db_set_value_datetime_not_current(), and _db_value::t.
Referenced by db_convert_Cstring_to_value_datetime().
Set double precision value.
| value | pointer to dbValue |
| d | double value |
Definition at line 207 of file value.c.
References _db_value::d, and db_set_value_not_null().
Referenced by db_convert_Cstring_to_value().
Set hour value.
| value | pointer to dbValue |
| hour | hour value |
Definition at line 267 of file value.c.
References db_set_value_datetime_not_current(), _db_date_time::hour, and _db_value::t.
Referenced by db_convert_Cstring_to_value_datetime().
Set integer value.
| value | pointer to dbValue |
| i | integer value |
Definition at line 195 of file value.c.
References db_set_value_not_null(), and _db_value::i.
Referenced by db_convert_Cstring_to_value().
Set minute value.
| value | pointer to dbValue |
| minute | minute value |
Definition at line 279 of file value.c.
References db_set_value_datetime_not_current(), _db_date_time::minute, and _db_value::t.
Referenced by db_convert_Cstring_to_value_datetime().
Set month value.
| value | pointer to dbValue |
| month | month value |
Definition at line 243 of file value.c.
References db_set_value_datetime_not_current(), _db_date_time::month, and _db_value::t.
Referenced by db_convert_Cstring_to_value_datetime().
Set value to not null.
| value | pointer to dbValue |
Definition at line 184 of file value.c.
References _db_value::isNull.
Referenced by db_set_value_datetime_current(), db_set_value_datetime_not_current(), db_set_value_double(), db_set_value_int(), and db_set_value_string().
Set value to null.
| value | pointer to dbValue |
Definition at line 174 of file value.c.
References _db_value::isNull.
Set seconds value.
| value | pointer to dbValue |
| seconds | seconds value |
Definition at line 291 of file value.c.
References db_set_value_datetime_not_current(), _db_date_time::seconds, and _db_value::t.
Referenced by db_convert_Cstring_to_value_datetime().
Set string value.
| value | pointer to dbValue |
| s | string value |
Definition at line 219 of file value.c.
References db_set_string(), db_set_value_not_null(), and _db_value::s.
Referenced by db_convert_Cstring_to_value().
Set year value.
| value | pointer to dbValue |
| year | year value |
Definition at line 231 of file value.c.
References db_set_value_datetime_not_current(), _db_value::t, and _db_date_time::year.
Referenced by db_convert_Cstring_to_value_datetime().
Check if datatime is current.
| value | pointer to dbValue |
Definition at line 305 of file value.c.
References _db_date_time::current, and _db_value::t.
Referenced by db_convert_value_datetime_into_string().
Check of value is null.
| value | pointer to dbValue |
Definition at line 26 of file value.c.
References _db_value::isNull.
Referenced by db_convert_value_to_string(), and Vect_write_ascii().