grass  7.8.6
About: GRASS (Geographic Resources Analysis Support System) is a raster- and vector-based GIS, image processing system, graphics production system and spatial modeling system.
  Fossies Dox: grass-7.8.6.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

table.c File Reference

DBMI Library (client) - table management. More...

#include <stdlib.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/dbmi.h>
#include <grass/glocale.h>
Include dependency graph for table.c:

Go to the source code of this file.

Functions

int db_table_exists (const char *drvname, const char *dbname, const char *tabname)
 Check if table exists. More...
 
int db_get_table_number_of_rows (dbDriver *driver, dbString *sql)
 Get number of rows of table. More...
 

Detailed Description

DBMI Library (client) - table management.

(C) 1999-2008 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.

Author
Joel Jones (CERL/UIUC), Radim Blazek

Definition in file table.c.

Function Documentation

◆ db_get_table_number_of_rows()

int db_get_table_number_of_rows ( dbDriver driver,
dbString sql 
)

Get number of rows of table.

Parameters
driverdb driver
sqlSQL statement
Returns
number of records
-1

Definition at line 104 of file table.c.

References _, db_close_cursor(), db_close_database_shutdown_driver(), db_get_num_rows(), db_get_string(), DB_OK, db_open_select_cursor(), DB_SEQUENTIAL, and G_warning().

◆ db_table_exists()

int db_table_exists ( const char *  drvname,
const char *  dbname,
const char *  tabname 
)

Check if table exists.

Parameters
drvnamedriver name
dbnamedatabase name
tabnametable name
Returns
1 exist
0 doesn't exist
-1 error

Definition at line 32 of file table.c.

References _, c, count, db_close_database_shutdown_driver(), db_free_string_array(), db_get_string(), db_list_tables(), DB_OK, db_start_driver_open_database(), driver, full, G_debug(), G_strcasecmp(), G_warning(), and NULL.

Referenced by Vect__delete().