GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
DBMI Library (base) - string management. More...
Go to the source code of this file.
Functions | |
void | db_init_string (dbString *x) |
Initialize dbString. More... | |
int | db_set_string (dbString *x, const char *s) |
Inserts string to dbString (enlarge string) More... | |
int | db_set_string_no_copy (dbString *x, char *s) |
Inserts string to dbString (overwrite current value) More... | |
unsigned int | db_sizeof_string (const dbString *x) |
Get string size. More... | |
void | db_zero_string (dbString *x) |
Zero string. More... | |
int | db_enlarge_string (dbString *x, int len) |
Enlarge dbString. More... | |
char * | db_get_string (const dbString *x) |
Get string. More... | |
void | db_free_string (dbString *x) |
Free allocated space for dbString. More... | |
void | db_free_string_array (dbString *a, int n) |
Free allocated dbString array. More... | |
dbString * | db_alloc_string_array (int count) |
Allocate dbString array. More... | |
int | db_append_string (dbString *x, const char *s) |
Append string to dbString. More... | |
int | db_copy_string (dbString *dst, const dbString *src) |
Copy dbString. More... | |
void | db_double_quote_string (dbString *src) |
Replace each ' is replaced by ''. More... | |
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.
dbString* db_alloc_string_array | ( | int | count | ) |
int db_append_string | ( | dbString * | x, |
const char * | s | ||
) |
Append string to dbString.
x | pointer to dbString |
s | string to be appended |
Definition at line 205 of file string.c.
Referenced by db_d_append_error(), db_d_report_error(), db_delete_table(), and P_Drop_Aux_Table().
void db_double_quote_string | ( | dbString * | src | ) |
int db_enlarge_string | ( | dbString * | x, |
int | len | ||
) |
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(), _db_string::nalloc, NULL, and _db_string::string.
void db_free_string | ( | dbString * | x | ) |
Free allocated space for dbString.
x | pointer to dbString |
Definition at line 150 of file string.c.
References db_free(), db_init_string(), _db_string::nalloc, and _db_string::string.
Referenced by db_CatValArray_free(), db_d_add_column(), 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_free_column(), db_free_dirent_array(), db_free_handle(), db_free_index(), and db_grant_on_table().
void db_free_string_array | ( | dbString * | a, |
int | n | ||
) |
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.
Referenced by db_free_index().
char* db_get_string | ( | const dbString * | x | ) |
Get string.
x | pointer to dbString |
Definition at line 140 of file string.c.
References _db_string::string.
Referenced by db_d_report_error(), db_delete_table(), 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_number_of_rows(), db_get_value_string(), db_print_column_definition(), and db_zero_string().
void db_init_string | ( | dbString * | x | ) |
Initialize dbString.
[out] | x | pointer to dbString |
Definition at line 25 of file string.c.
References G_zero().
Referenced by db_alloc_dirent_array(), db_d_add_column(), 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_delete_table(), db_free_string(), db_grant_on_table(), db_gversion(), db_init_column(), db_init_handle(), db_init_index(), db_print_column_definition(), and P_Drop_Aux_Table().
int db_set_string | ( | dbString * | x, |
const char * | s | ||
) |
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.
Referenced by db_convert_value_datetime_into_string(), db_convert_value_to_string(), db_delete_table(), db_grant_on_table(), db_gversion(), db_set_column_description(), db_set_column_name(), db_set_handle(), db_set_index_column_name(), db_set_index_name(), and db_set_index_table_name().
int db_set_string_no_copy | ( | dbString * | x, |
char * | s | ||
) |
unsigned int db_sizeof_string | ( | const dbString * | x | ) |
Get string size.
x | pointer to dbString |
Definition at line 67 of file string.c.
References _db_string::nalloc.
void db_zero_string | ( | dbString * | x | ) |
Zero string.
x | pointer to dbString |
Definition at line 79 of file string.c.
References db_get_string(), db_zero(), and _db_string::nalloc.