17 #include <grass/gis.h>
18 #include <grass/dbmi.h>
19 #include <grass/glocale.h>
36 int i,
count, found = 0;
41 if (strchr(tabname,
'.'))
46 G_warning(_(
"Unable open database <%s> by driver <%s>"), dbname,
59 for (i = 0; i <
count; i++) {
62 if (!full && (c = strchr(buf,
'.'))) {
65 G_debug(2,
"table = %s -> %s", buf, bufp);
77 for (i = 0; i <
count; i++) {
80 if (!full && (c = strchr(buf,
'.'))) {
dbDriver * db_start_driver_open_database(const char *drvname, const char *dbname)
Open driver/database connection.
int G_strcasecmp(const char *x, const char *y)
String compare ignoring case (upper or lower)
int db_close_cursor(dbCursor *cursor)
Close cursor.
int db_close_database_shutdown_driver(dbDriver *driver)
Close driver/database connection.
int db_get_table_number_of_rows(dbDriver *driver, dbString *sql)
Get number of rows of table.
int db_get_num_rows(dbCursor *cursor)
Get number of selected rows.
void db_free_string_array(dbString *a, int n)
char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]
G_warning("category support for [%s] in mapset [%s] %s", name, mapset, type)
int db_table_exists(const char *drvname, const char *dbname, const char *tabname)
Check if table exists.
char * db_get_string(dbString *x)
int G_debug(int level, const char *msg,...)
Print debugging message.
int db_list_tables(dbDriver *driver, dbString **names, int *count, int system)
List available tables for given connection.
int db_open_select_cursor(dbDriver *driver, dbString *select, dbCursor *cursor, int mode)
Open select cursor.