1 #ifndef GRASS_DBMIDEFS_H 2 #define GRASS_DBMIDEFS_H 61 int db_copy_table(
const char *,
const char *,
const char *,
const char *,
62 const char *,
const char *);
64 const char *,
const char *,
const char *,
67 const char *,
const char *,
const char *,
70 const char *,
const char *,
const char *,
71 const char *,
int *,
int);
136 int db_fetch(dbCursor *,
int,
int *);
238 dbString *, dbCursor *,
int);
299 const
char *, const
char *,
302 const
char *,
int **);
304 int, const
char *, dbValue *);
413 int db_set_login(const
char *, const
char *, const
char *, const
char *);
414 int db_set_login2(const
char *, const
char *, const
char *, const
char *,
415 const
char *, const
char *,
int);
416 int db_get_login(const
char *, const
char *, const
char **, const
char **);
417 int db_get_login2(const
char *, const
char *, const
char **, const
char **,
418 const
char **, const
char **);
void * db_realloc(void *, int)
Reallocate memory.
int db__send_int_array(const int *, int)
Send integer array.
dbDriverState * db__get_driver_state(void)
Get driver state.
dbValue * db_get_column_default_value(dbColumn *)
Returns column default value for given column structure.
char * db_store(const char *)
Make a copy of string buffer.
int db_set_index_type_unique(dbIndex *)
Set index type to unique.
int db_describe_table(dbDriver *, dbString *, dbTable **)
Describe table.
const char * db_get_handle_dbname(dbHandle *)
Get handle database name.
int db_d_get_num_rows(void)
Get number of selected rows.
int db__recv_double(double *)
Receive double.
int db_begin_transaction(dbDriver *)
Begin transaction.
void db_set_table_select_priv_granted(dbTable *)
Grant selection privileges for all columns.
void db_free_index_array(dbIndex *, int)
Free index array.
const char * db_whoami(void)
Who am i?
void db_free_dirent_array(dbDirent *, int)
Free dbDirent.
int db_d_begin_transaction(void)
Begin transaction.
dbValue * db_get_column_value(dbColumn *)
Returns column value for given column structure.
int db_create_table(dbDriver *, dbTable *)
Create table.
void db_CatValArray_init(dbCatValArray *)
Initialize dbCatValArray.
int db_alloc_cursor_column_flags(dbCursor *)
Allocate columns' flags for cursor.
int db_CatValArray_get_value_int(dbCatValArray *, int, int *)
Find value (integer) by key.
int db_d_close_cursor(void)
Close cursor.
int db_test_cursor_column_for_update(dbCursor *, int)
Check if column flag is 'update'.
int db_d_open_insert_cursor(void)
Open insert cursor.
void db_auto_print_protocol_errors(int)
Set auto print protocol error.
int db_bind_update(dbCursor *)
?
int db_get_connection(dbConnection *)
Get default DB connection settings for the current mapset.
int db_test_cursor_type_fetch(dbCursor *)
Check cursor type.
dbDriver * db_start_driver(const char *)
Initialize a new dbDriver for db transaction.
int db_column_sqltype(dbDriver *, const char *, const char *)
Get column sqltype.
void db_set_column_null_allowed(dbColumn *)
Set null value to be allowed.
void db_char_to_lowercase(char *)
Convert character to lowercase.
int db_set_index_name(dbIndex *, const char *)
Set index name.
int db__send_procedure_not_implemented(int)
?
int db_list_tables(dbDriver *, dbString **, int *, int)
List available tables for given connection.
int db_copy_table_where(const char *, const char *, const char *, const char *, const char *, const char *, const char *)
Copy a table (by where statement)
int db__recv_float(float *)
Receive float.
int db__send_column_value(dbColumn *)
Send column value.
int db_d_commit_transaction(void)
Commit transaction.
void db_set_column_sqltype(dbColumn *, int)
Define column sqltype for column.
int db_add_column(dbDriver *, dbString *, dbColumn *)
Add column to table.
int db_get_column_length(dbColumn *)
Get column's length.
void db_strip(char *)
Strip given string.
int db_driver(int, char **)
const char * db_get_column_name(dbColumn *)
Returns column name for given column.
void db_copy_value(dbValue *, dbValue *)
Copy value.
void db_unset_cursor_mode_scroll(dbCursor *)
Unset 'scroll' cursor mode.
void void db_d_report_error(void)
Report error message for DB driver.
int db_d_version(void)
Get version info.
int db_legal_tablename(const char *)
Check if output is legal table name.
void db_set_value_hour(dbValue *, int)
Set hour value.
int db_isdir(const char *)
Test if path is a directory.
int db_enlarge_string(dbString *, int)
Enlarge dbString.
void db_init_string(dbString *)
Initialize dbString.
void db_set_column_use_default_value(dbColumn *)
Set default value to be used.
int db_d_delete(void)
Delete record (?)
void db_set_table_delete_priv_not_granted(dbTable *)
Set delete privileges not granted for table.
int db_test_index_type_unique(dbIndex *)
Test if type is unique.
void db_char_to_uppercase(char *)
Convert character to uppercase.
int db_d_grant_on_table(void)
Grant privileges on table.
const char * db_get_table_name(dbTable *)
Get the name of the table.
int db__send_failure(void)
Send failure code.
int db_fetch(dbCursor *, int, int *)
Fetch data from open cursor.
const char * db_dbmscap_filename(void)
Get dbmscap file name.
int db_d_create_database(void)
Create database.
const char * db_get_default_group_name(void)
Get group name from current DB connection settings.
void db_zero(void *, int)
Zero allocated space.
int db_open_select_cursor(dbDriver *, dbString *, dbCursor *, int)
Open select cursor.
void db_set_value_day(dbValue *, int)
Set day value.
void db_set_cursor_type_insert(dbCursor *)
Set cursor to be writable (insert)
dbDirent * db_alloc_dirent_array(int)
Allocate dirent array.
void db_set_cursor_column_for_update(dbCursor *, int)
Set Column flag to 'update'.
int db__recv_index_array(dbIndex **, int *)
Receive index array.
int db__recv_string(dbString *)
Reads a string from transport.
int db_find_database(dbDriver *, dbHandle *, int *)
Find database.
int db__recv_short(short *)
Receive short.
int db_get_column_select_priv(dbColumn *)
Get select privileges.
char * db_get_string(const dbString *)
Get string.
int db__send_table_data(dbTable *)
Send table data.
void db_free_table(dbTable *)
Free the table.
void db_Cstring_to_lowercase(char *)
Convert string to lowercase.
int db_d_list_indexes(void)
List indexes.
int db_driver_mkdir(const char *, int, int)
Create db directory.
int db_copy_string(dbString *, const dbString *)
Copy dbString.
int db_update(dbCursor *)
?
int db__send_short_array(const short *, int)
Send short array.
int db_get_value_int(dbValue *)
Get integer value.
int db__send_success(void)
Send success code.
int db_CatValArray_realloc(dbCatValArray *, int)
Realloc dbCatValArray.
int db__send_float_array(const float *, int)
Send float array.
int db_get_table_select_priv(dbTable *)
Get table select privileges.
int db_drop_index(dbDriver *, dbString *)
Drop index.
int db_d_drop_column(void)
Drop column.
int db_d_open_select_cursor(void)
Open select cursor.
void db_unset_cursor_mode_insensitive(dbCursor *)
Unset 'intensive' cursor mode.
int db_test_column_has_default_value(dbColumn *)
Check if column has defined default value.
int db_get_value_hour(dbValue *)
Get hour value.
int db_get_login_dump(FILE *)
Print all connection settings to file.
int db_d_close_database(void)
Close database connection.
int db_d_add_column(void)
Add column to table.
void db_free_cursor(dbCursor *)
Free allocated dbCursor.
dbDriver * db_start_driver_open_database(const char *, const char *)
Open driver/database connection.
int db_delete_table(const char *, const char *, const char *)
Delete table.
int db_set_handle(dbHandle *, const char *, const char *)
Set handle (database and schema name)
void db_unset_cursor_mode(dbCursor *)
Unset cursor mode.
int db_d_list_tables(void)
List available tables for given connection.
int db_alloc_cursor_table(dbCursor *, int)
Allocate table for cursor.
void db_CatValArray_sort(dbCatValArray *)
Sort key/value array by key.
void db_free(void *)
Free allocated memory.
int db_set_table_column(dbTable *, int, dbColumn *)
Set a specific column for given table and column number.
dbColumn * db_get_table_column_by_name(dbTable *, const char *)
Returns column structure for given table and column name.
const char * db_get_error_who(void)
void db_syserror(const char *)
Report system error.
int db_d_open_database(void)
Open database connection.
int db_get_column(dbDriver *, const char *, const char *, dbColumn **)
Get column structure by table and column name.
void db_free_index(dbIndex *)
Free allocated dbIndex.
int db_get_column_precision(dbColumn *)
Get column precision.
int db__send_procedure_ok(int)
?
int db_get_value_minute(dbValue *)
Get minute value.
int db_test_cursor_type_insert(dbCursor *)
Check if cursor type is 'insert'.
const char * db_list_drivers(void)
Return comma separated list of existing DB drivers, used for driver parameter options.
int db_CatValArray_alloc(dbCatValArray *, int)
Allocate dbCatValArray.
dbIndex * db_alloc_index_array(int)
Allocate index array.
int db__recv_column_value(dbColumn *)
Receive column value.
int db_convert_Cstring_to_value(const char *, int, dbValue *)
Convert string to value.
void db_copy_dbmscap_entry(dbDbmscap *, dbDbmscap *)
Copy dbmscap entry.
int db_set_string(dbString *, const char *)
Inserts string to dbString (enlarge string)
void db_debug_off(void)
Turn off debugging.
dbDirent * db_dirent(const char *, int *)
Read directory and build an array of dbDirent's.
dbToken db_new_token(dbAddress)
Add new token.
int db_set_login(const char *, const char *, const char *, const char *)
Set login parameters for driver/database.
int db_get_column_update_priv(dbColumn *)
Get update privileges.
int db_close_database_shutdown_driver(dbDriver *)
Close driver/database connection.
void db_debug_on(void)
Turn on debugging.
int db_CatValArray_sort_by_value(dbCatValArray *)
Sort key/value array by value.
int db__send_index(dbIndex *)
Send index.
int db__recv_int_array(int **, int *)
Receive integer array.
void db__drop_cursor_from_driver_state(dbCursor *)
Drop cursor from driver state.
void db_set_error_handler_driver(dbDriver *)
Define standard error handler for open database connection.
int db_convert_column_value_to_string(dbColumn *, dbString *)
?
int db__recv_short_array(short **, int *)
Receive short array.
int db__send_float(float)
Send float.
int db_d_bind_update(void)
ADD.
int db__send_datetime(dbDateTime *)
Send datetime.
int db_d_create_table(void)
Create table.
void db_set_cursor_mode_scroll(dbCursor *)
Set 'scroll' cursor mode.
dbTable * db_clone_table(dbTable *)
Make a new exact copy of an existing table.
dbToken db_get_cursor_token(dbCursor *)
Get cursor token.
int db_convert_Cstring_to_column_value(const char *, dbColumn *)
?
int db_d_describe_table(void)
Describe table.
int db__recv_table_definition(dbTable **)
Receive table definition.
void db_procedure_not_implemented(const char *)
Report 'not implemented' error.
void db__add_cursor_to_driver_state(dbCursor *)
Add cursor do driver state.
void db_drop_token(dbToken)
Drop token.
int db_test_column_has_undefined_default_value(dbColumn *)
Check if column has defined default value.
int db_test_value_datetime_current(dbValue *)
Check if datatime is current.
void db__mark_database_open(const char *, const char *)
Mark database as opened.
void db_d_append_error(const char *,...) __attribute__((format(printf
int db__recv_string_array(dbString **, int *)
Receive string array.
int db__recv_return_code(int *)
Receive return code.
int db_set_column_name(dbColumn *, const char *)
Set column name.
int db_test_cursor_column_flag(dbCursor *, int)
Checks column's flag.
const char * db_get_default_database_name(void)
Get database name from current DB connection settings.
int db_grant_on_table(dbDriver *, const char *, int, int)
Grant privileges on table.
int db__recv_char(char *)
?
void db_set_value_datetime_current(dbValue *)
Set datetime to current.
void db_unset_column_null_allowed(dbColumn *)
Unset null value to be allowed.
void db_set_value_minute(dbValue *, int)
Set minute value.
int db_get_column_sqltype(dbColumn *)
Returns column sqltype for column.
int db__start_procedure_call(int)
? (client only)
void db_auto_print_errors(int)
Toggles printing of DBMI error messages.
int db_test_value_isnull(dbValue *)
Check of value is null.
int db_alloc_index_columns(dbIndex *, int)
Allocate index columns.
void db_set_cursor_type_update(dbCursor *)
Set cursor to be writable (update)
dbHandle * db_alloc_handle_array(int)
Allocate array of handles.
const char * db_sqltype_name(int)
Get SQL data type description.
void db_debug(const char *)
Print debug message.
int db_append_string(dbString *, const char *)
Append string to dbString.
int db_d_drop_table(void)
Drop table.
int db__recv_column_definition(dbColumn *)
Receive column definition.
int db__send_short(int)
Send short.
int db_create_database(dbDriver *, dbHandle *)
Create database.
int db__recv_datetime(dbDateTime *)
Receive datetime.
int db_test_cursor_any_column_flag(dbCursor *)
Checks columns' flag.
int db_get_table_update_priv(dbTable *)
Get table update privileges.
int db__test_database_open(void)
Test database connection.
int db_delete(dbCursor *)
Delete record (?)
void db_set_table_insert_priv_not_granted(dbTable *)
Set insert privileges not granted for table.
int db_get_column_host_type(dbColumn *)
Get column host type.
void db_free_handle(dbHandle *)
Free dbHandle structure.
void db_set_value_datetime_not_current(dbValue *)
Set value to non-current.
int db__send_column_definition(dbColumn *)
Send column definition.
int db_list_indexes(dbDriver *, dbString *, dbIndex **, int *)
List indexes.
int db_select_value(dbDriver *, const char *, const char *, int, const char *, dbValue *)
Select one (first) value from table/column for key/id.
int db_convert_value_to_string(dbValue *, int, dbString *)
Convert value to string.
int db_set_table_description(dbTable *, const char *)
Set the description of the table.
int db_get_error_code(void)
Get error code.
void db_init_column(dbColumn *)
Initialize dbColumn.
void db_set_cursor_token(dbCursor *, dbToken)
Set cursor token.
int db_CatValArray_get_value(dbCatValArray *, int, dbCatVal **)
Find value by key.
int db_close_database(dbDriver *)
Close database connection.
int db_execute_immediate(dbDriver *, dbString *)
Execute SQL statements.
int db_d_open_update_cursor(void)
Open update cursor.
int db_get_num_rows(dbCursor *)
Get number of selected rows.
dbString * db_alloc_string_array(int)
Allocate dbString array.
int db__send_string(dbString *)
Send string.
void db_d_init_error(const char *)
Init error message for DB driver.
void db_set_value_month(dbValue *, int)
Set month value.
int db__recv_table_data(dbTable *)
Receive table data.
int db_d_create_index(void)
Create index.
void db_set_column_has_undefined_default_value(dbColumn *)
Unset default value identificator.
int db_set_value_string(dbValue *, const char *)
Set string value.
int db_gversion(dbDriver *, dbString *, dbString *)
Get version info.
void db_set_value_seconds(dbValue *, double)
Set seconds value.
void db_set_cursor_table(dbCursor *, dbTable *)
Set table for given cursor.
void db_set_column_scale(dbColumn *, int)
Set column scale.
int db__send_column_default_value(dbColumn *)
Send column default value.
int db_sqltype_to_Ctype(int)
Get C data type based on given SQL data type.
int db_create_index(dbDriver *, dbIndex *)
Create index.
unsigned int db_sizeof_string(const dbString *)
Get string size.
void db_memory_error(void)
Report memory error.
double db_get_value_seconds(dbValue *)
Get seconds value.
int db_shutdown_driver(dbDriver *)
Closedown the driver, and free the driver structure.
void db_init_cursor(dbCursor *)
Initialize dbCursor.
void db_unset_error_handler_driver(dbDriver *)
Remove error handler before closing the driver.
int db__recv_handle(dbHandle *)
Receive handle.
void db_zero_string(dbString *)
Zero string.
int db__recv_float_array(float **, int *)
Receive float array.
int db__recv_token(dbToken *)
Receive token.
const char * db_get_default_schema_name(void)
Get schema name from current DB connection settings.
int db_CatValArray_get_value_double(dbCatValArray *, int, double *)
Find value (double) by key.
int db_get_value_year(dbValue *)
Get year value.
int db_has_dbms(void)
Check dbms.
int db__send_table_definition(dbTable *)
Send table definition.
int db__recv_index(dbIndex *)
Receive index.
void db_set_table_select_priv_not_granted(dbTable *)
Set selection privileges not granted for all columns.
void db_clear_error(void)
Clear error status.
void db_set_value_double(dbValue *, double)
Set double precision value.
int db_test_column_null_allowed(dbColumn *)
Checks if null value is allowed.
void * db_calloc(int, int)
Allocate memory.
double db_get_value_as_double(dbValue *, int)
Get value as double.
void db_init_handle(dbHandle *)
Initialize handle (i.e database/schema)
void db_set_table_update_priv_granted(dbTable *)
Grant update privileges for all columns.
const char * db_get_error_msg(void)
Get error message.
void db_set_value_null(dbValue *)
Set value to null.
void db_set_column_select_priv_granted(dbColumn *)
Set select privileges to be granted.
void db_Cstring_to_uppercase(char *)
Convert string to lowercase.
int db_set_table_name(dbTable *, const char *)
Set the name of the table.
dbTable * db_alloc_table(int)
Allocate a table with a specific number of columns.
const char * db_get_table_description(dbTable *)
Get the description of the table.
int db_test_column_use_default_value(dbColumn *)
Checks if default value is used.
void db_unset_cursor_column_flag(dbCursor *, int)
Unset column's flag.
void db_noproc_error(int)
Report no procedure error.
void db_free_dbmscap(dbDbmscap *)
Free dbmscap.
void db_set_value_year(dbValue *, int)
Set year value.
int db__send_token(dbToken *)
Send token.
int db_copy_table_select(const char *, const char *, const char *, const char *, const char *, const char *, const char *)
Copy a table (by select statement)
int db_set_connection(dbConnection *)
Set default DB connection settings.
int db_create_index2(dbDriver *, const char *, const char *)
Create unique index.
int db__send_handle(dbHandle *)
Send handle.
void db_error(const char *)
Report error message.
int db_convert_value_datetime_into_string(dbValue *, int, dbString *)
Convert datetime value into string.
const char * db_get_value_string(dbValue *)
Get string value.
int db_set_column_description(dbColumn *, const char *)
Set column description.
void db_free_string_array(dbString *, int)
Free allocated dbString array.
int db_open_database(dbDriver *, dbHandle *)
Open database connection.
int db_d_drop_index(void)
Drop index.
int db_get_table_delete_priv(dbTable *)
Get table delete privileges.
int db_nocase_compare(const char *, const char *)
Compare strings case-insensitive.
void db_set_table_delete_priv_granted(dbTable *)
Grant delete privileges for table.
const char * db_get_index_name(dbIndex *)
Get index name.
void db_unset_column_has_default_value(dbColumn *)
Unset default value identificator.
int db_commit_transaction(dbDriver *)
Commit transaction.
dbAddress db_find_token(dbToken)
Find token.
int db_copy_table(const char *, const char *, const char *, const char *, const char *, const char *)
Copy a table.
double db_get_value_double(dbValue *)
Get double precision value.
int db_set_index_column_name(dbIndex *, int, const char *)
Set column name.
int db_get_login(const char *, const char *, const char **, const char **)
Get login parameters for driver/database.
int db__send_double_array(const double *, int)
Send double array.
int db_get_index_number_of_columns(dbIndex *)
Get number of columns.
void db_set_cursor_type_readonly(dbCursor *)
Set cursor to be read-only (select)
int db_d_fetch(void)
Fetch data.
void db_interval_range(int, int *, int *)
Define range based on SQL data type.
void db_init_index(dbIndex *)
Initialize dbIndex.
void db_set_column_host_type(dbColumn *, int)
Set column host data type.
void db_CatValArray_free(dbCatValArray *)
Free allocated dbCatValArray.
void db_set_column_update_priv_granted(dbColumn *)
Set update privileges to be granted.
void db_free_handle_array(dbHandle *, int)
Free array of handles.
int db__send_double(double)
Send double.
const char * db_get_column_description(dbColumn *)
Returns column description for given column.
int db__recv_procnum(int *)
? (driver only)
int db_set_string_no_copy(dbString *, char *)
Inserts string to dbString (overwrite current value)
int db_get_table_number_of_rows(dbDriver *, dbString *)
Get number of rows of table.
const char * db_get_handle_dbschema(dbHandle *)
Get handle schema name.
int db_d_delete_database(void)
Delete database.
void db_unset_column_use_default_value(dbColumn *)
Unset default value to be used.
void db_set_value_int(dbValue *, int)
Set integer value.
int db_get_value_day(dbValue *)
Get day value.
int db__recv_value(dbValue *, int)
Receive value.
void db_set_column_has_defined_default_value(dbColumn *)
Set default value identificator.
dbColumn * db_get_table_column(dbTable *, int)
Returns column structure for given table and column number.
void db_free_cursor_column_flags(dbCursor *)
Free columns' flags of cursor.
int db__recv_column_default_value(dbColumn *)
Receive column default value.
int db_d_list_databases(void)
List databases.
int db__send_string_array(dbString *, int)
Send string array.
int db_set_index_table_name(dbIndex *, const char *)
Set table name.
int db_test_cursor_mode_scroll(dbCursor *)
Check if cursor mode is 'scroll'.
void db_set_cursor_mode(dbCursor *, int)
Set cursor mode.
void db_double_quote_string(dbString *)
Replace each ' is replaced by ''.
int db_drop_table(dbDriver *, dbString *)
Drop table.
int db_column_Ctype(dbDriver *, const char *, const char *)
Get column ctype.
int db_append_table_column(dbTable *, dbColumn *)
Append a specific column to given table.
int db_open_update_cursor(dbDriver *, dbString *_name, dbString *, dbCursor *, int)
Open update cursor.
void db_set_cursor_column_flag(dbCursor *, int)
Set column's flag.
dbDbmscap * db_read_dbmscap(void)
Read dbmscap.
int db_delete_database(dbDriver *, dbHandle *)
Delete database.
void db_init_table(dbTable *)
Initialize the table to zero.
int db__recv_double_array(double **, int *)
Receive double array.
const char * db_get_index_table_name(dbIndex *)
Get table name.
int db_table_exists(const char *, const char *, const char *)
Check if table exists.
int db_get_login2(const char *, const char *, const char **, const char **, const char **, const char **)
Get login parameters for driver/database.
void db_protocol_error(void)
Report protocol error.
void db_set_column_update_priv_not_granted(dbColumn *)
Unset update privileges.
int db_get_table_insert_priv(dbTable *)
Get table insert privileges.
int db_d_execute_immediate(void)
Execute SQL statements.
void db_print_index(FILE *, dbIndex *)
Report index.
int db_test_cursor_type_update(dbCursor *)
Check if cursor type is 'update'.
void * db_malloc(int)
Allocate memory.
void db_set_table_update_priv_not_granted(dbTable *)
Set update privileges not granted for all columns.
int db__recv_int(int *)
Receive integer.
int db_convert_Cstring_to_value_datetime(const char *, int, dbValue *)
Convert datetime string to value.
int db_select_CatValArray(dbDriver *, const char *, const char *, const char *, const char *, dbCatValArray *)
Select pairs key/value to array, values are sorted by key (must be integer)
void db_set_table_insert_priv_granted(dbTable *)
Grant insert privileges for table.
int db__send_index_array(dbIndex *, int)
Send index array.
void db__init_driver_state(void)
Initialize driver state.
void db_set_column_precision(dbColumn *, int)
Set column precision.
dbTable * db_get_cursor_table(dbCursor *)
Get table allocated by cursor.
int db_list_databases(dbDriver *, dbString *, int, dbHandle **, int *)
List databases.
int db_test_column_has_defined_default_value(dbColumn *)
Check if column has defined default value.
const char * db_get_index_column_name(dbIndex *, int)
Get column number.
void db_print_column_definition(FILE *, dbColumn *)
Print column definition info.
void db__set_protocol_fds(FILE *, FILE *)
?
void db_print_error(void)
Print error.
int db_get_table_number_of_columns(dbTable *)
Return the number of columns of the table.
void db_set_column_select_priv_not_granted(dbColumn *)
Unset select privileges.
int db_d_insert(void)
Insert new record into table.
void db__mark_database_closed(void)
Mark database as closed.
int db_test_cursor_mode_insensitive(dbCursor *)
Check if cursor mode is 'intensive'.
dbColumn * db_copy_column(dbColumn *, dbColumn *)
Copy a db column from source to destination.
int db__send_value(dbValue *, int)
Send value.
int db_select_int(dbDriver *, const char *, const char *, const char *, int **)
Select array of ordered integers from table/column.
int db_copy_table_by_ints(const char *, const char *, const char *, const char *, const char *, const char *, const char *, int *, int)
Copy a table (by keys)
int db_insert(dbCursor *)
Insert new record into table.
void db__close_all_cursors(void)
Close all cursors.
void db_set_value_not_null(dbValue *)
Set value to not null.
int db_test_cursor_any_column_for_update(dbCursor *)
Check if columns' flag is 'update'.
const char * db_get_default_driver_name(void)
Get driver name from current DB connection settings.
int db_get_value_month(dbValue *)
Get month value.
int db_set_login2(const char *, const char *, const char *, const char *, const char *, const char *, int)
Set login parameters for driver/database.
void db_free_string(dbString *)
Free allocated space for dbString.
int db_get_column_scale(dbColumn *)
Get column scale.
void db_set_column_length(dbColumn *, int)
Set column's length.
int db__send_int(int)
Send integer.
int db_d_find_database(void)
Find database.
int db_close_cursor(dbCursor *)
Close cursor.
int db_drop_column(dbDriver *, dbString *, dbString *)
Drop column.
int db_open_insert_cursor(dbDriver *, dbCursor *)
Open insert cursor.
void db_unset_cursor_column_for_update(dbCursor *, int)
Unset 'update' column flag.
int db_convert_Cstring_to_column_default_value(const char *, dbColumn *)
?
int db_set_index_type_non_unique(dbIndex *)
Set index type to non-unique.
int db__send_Cstring(const char *)
Send C string.
void db_set_error_who(const char *)
Set 'who' for error messages.
void db_set_cursor_mode_insensitive(dbCursor *)
Set 'intensive' cursor mode.
int db_convert_column_default_value_to_string(dbColumn *, dbString *)
?
void db_print_table_definition(FILE *, dbTable *)
Print table definition info.
void db_free_column(dbColumn *)
Frees column structure.
int db_get_cursor_number_of_columns(dbCursor *)
Get number of columns.
int db_set_default_connection(void)
Sets up database connection settings using GRASS default from dbmi.h.
int db_table_to_sql(dbTable *, dbString *)
Create SQL CREATE sring from table definition.