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

Go to the source code of this file.
Functions | |
| void | db_init_string (dbString *x) |
| Initialize dbString. | |
| int | db_set_string (dbString *x, const char *s) |
| Inserts string to dbString (enlarge string) | |
| int | db_set_string_no_copy (dbString *x, char *s) |
| Inserts string to dbString (overwrite current value) | |
| unsigned int | db_sizeof_string (const dbString *x) |
| Get string size. | |
| void | db_zero_string (dbString *x) |
| Zero string. | |
| int | db_enlarge_string (dbString *x, int len) |
| Enlarge dbString. | |
| char * | db_get_string (const dbString *x) |
| Get string. | |
| void | db_free_string (dbString *x) |
| Free allocated space for dbString. | |
| void | db_free_string_array (dbString *a, int n) |
| Free allocated dbString array. | |
| dbString * | db_alloc_string_array (int count) |
| Allocate dbString array. | |
| int | db_append_string (dbString *x, const char *s) |
| Append string to dbString. | |
| int | db_copy_string (dbString *dst, const dbString *src) |
| Copy dbString. | |
| void | db_double_quote_string (dbString *src) |
| Replace each ' is replaced by ''. | |
DBMI Library (base) - string management.
(C) 1999-2009 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 string.c.
Allocate dbString array.
| count | number of items to be allocated |
Definition at line 181 of file string.c.
References count, db_calloc(), and db_init_string().
Referenced by db__recv_string_array(), and db_alloc_index_columns().
Append string to dbString.
| x | pointer to dbString |
| s | string to be appended |
Definition at line 205 of file string.c.
References db_enlarge_string(), db_get_string(), DB_OK, db_set_string(), and x.
Referenced by db_d_append_error(), db_d_report_error(), db_delete_table(), db_double_quote_string(), db_list_drivers(), db_select_CatValArray(), db_table_to_sql(), IL_write_point_2d(), P_Aux_to_Vector(), P_Drop_Aux_Table(), and P_Sparse_Points().
Copy dbString.
| dst | destination dbString |
| src | source dbString |
Definition at line 230 of file string.c.
References db_get_string(), and db_set_string().
Referenced by db_clone_table(), db_copy_column(), and db_copy_value().
Replace each ' is replaced by ''.
| src | pointer to dbString |
Definition at line 240 of file string.c.
References db_append_string(), db_free_string(), db_get_string(), db_init_string(), db_set_string(), and NULL.
Enlarge dbString.
| x | pointer to dbString |
| len | requested string size |
Definition at line 120 of file string.c.
References DB_MEMORY_ERR, DB_OK, db_realloc(), NULL, and x.
Referenced by db__recv_string(), and db_append_string().
Free allocated space for dbString.
| x | pointer to dbString |
Definition at line 150 of file string.c.
References db_free(), db_init_string(), and x.
Referenced by db__recv_return_code(), db_CatValArray_free(), db_column_sqltype(), db_d_add_column(), db_d_describe_table(), db_d_drop_column(), db_d_drop_index(), db_d_drop_table(), db_d_execute_immediate(), db_d_grant_on_table(), db_d_list_indexes(), db_d_open_select_cursor(), db_d_open_update_cursor(), db_double_quote_string(), db_free_column(), db_free_dirent_array(), db_free_handle(), db_free_index(), db_free_string_array(), db_free_table(), db_grant_on_table(), db_select_CatValArray(), db_select_int(), and db_select_value().
Free allocated dbString array.
| a | pointer to 1st dbString in the array |
| n | number of items in array |
Definition at line 163 of file string.c.
References db_free(), and db_free_string().
Referenced by db__recv_string_array(), db_d_list_databases(), db_free_index(), and db_table_exists().
Get string.
| x | pointer to dbString |
Definition at line 140 of file string.c.
References x.
Referenced by db__recv_return_code(), db__recv_string(), db__send_string(), db_append_string(), db_copy_string(), db_d_describe_table(), db_d_report_error(), db_delete_table(), db_double_quote_string(), db_get_column_description(), db_get_column_name(), db_get_handle_dbname(), db_get_handle_dbschema(), db_get_index_column_name(), db_get_index_name(), db_get_index_table_name(), db_get_table_column_by_name(), db_get_table_description(), db_get_table_name(), db_get_table_number_of_rows(), db_get_value_string(), db_list_drivers(), db_print_column_definition(), db_select_CatValArray(), db_table_exists(), db_table_to_sql(), db_zero_string(), IL_write_point_2d(), NetA_init_distinct(), and NetA_init_timetable_from_db().
Initialize dbString.
| [out] | x | pointer to dbString |
Definition at line 25 of file string.c.
Referenced by db__recv_return_code(), db__send_Cstring(), db_alloc_dirent_array(), db_alloc_string_array(), db_column_sqltype(), db_d_add_column(), db_d_describe_table(), db_d_drop_column(), db_d_drop_index(), db_d_drop_table(), db_d_execute_immediate(), db_d_grant_on_table(), db_d_init_error(), db_d_list_indexes(), db_d_open_select_cursor(), db_d_open_update_cursor(), db_delete_table(), db_double_quote_string(), db_free_string(), db_get_column(), db_grant_on_table(), db_gversion(), db_init_column(), db_init_handle(), db_init_index(), db_init_table(), db_list_drivers(), db_print_column_definition(), db_select_CatValArray(), db_select_int(), db_select_value(), IL_vector_input_data_2d(), NetA_init_timetable_from_db(), P_Aux_to_Vector(), P_Drop_Aux_Table(), P_Sparse_Points(), V1_close_nat(), Vect_get_column_names(), Vect_get_column_names_types(), Vect_get_column_types(), Vect_net_build_graph(), Vect_net_ttb_build_graph(), and Vect_write_ascii().
Inserts string to dbString (enlarge string)
| [in,out] | x | pointer to dbString |
| s | string to be inserted |
Definition at line 41 of file string.c.
References x.
Referenced by db_append_string(), db_column_sqltype(), db_convert_value_datetime_into_string(), db_convert_value_to_string(), db_copy_string(), db_delete_table(), db_dirent(), db_double_quote_string(), db_get_column(), db_grant_on_table(), db_gversion(), db_select_CatValArray(), db_select_int(), db_select_value(), db_set_column_description(), db_set_column_name(), db_set_handle(), db_set_index_column_name(), db_set_index_name(), db_set_index_table_name(), db_set_table_description(), db_set_table_name(), db_set_value_string(), db_table_to_sql(), NetA_init_timetable_from_db(), V1_close_nat(), Vect_get_column_names(), Vect_get_column_names_types(), Vect_get_column_types(), and Vect_write_ascii().
Inserts string to dbString (overwrite current value)
| [in,out] | x | pointer to dbString |
| s | string to be inserted |
Definition at line 55 of file string.c.
References x.
Referenced by db__send_Cstring().
Zero string.
| x | pointer to dbString |
Definition at line 79 of file string.c.
References db_get_string(), db_zero(), and x.
Referenced by IL_write_point_2d(), P_Aux_to_Vector(), and Vect_write_ascii().