GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-8828094037
dbmi.h File Reference
#include <stdio.h>
#include <grass/gis.h>
#include <grass/defs/dbmi.h>
Include dependency graph for dbmi.h:

Go to the source code of this file.

Data Structures

struct  _db_string
 
struct  _dbmscap
 
struct  _db_dirent
 
struct  _db_driver
 
struct  _db_handle
 
struct  _db_date_time
 
struct  _db_value
 
struct  _db_column
 
struct  _db_table
 
struct  _db_cursor
 
struct  _db_index
 
struct  _db_driver_state
 
struct  dbCatValI
 
struct  dbCatVal
 
struct  dbCatValArray
 
struct  _db_connection
 
struct  dbRclsRule
 

Macros

#define DB_VERSION   "0"
 
#define DB_DEFAULT_DRIVER   "sqlite"
 
#define DB_PROC_VERSION   999
 
#define DB_PROC_CLOSE_DATABASE   101
 
#define DB_PROC_CREATE_DATABASE   102
 
#define DB_PROC_DELETE_DATABASE   103
 
#define DB_PROC_FIND_DATABASE   104
 
#define DB_PROC_LIST_DATABASES   105
 
#define DB_PROC_OPEN_DATABASE   106
 
#define DB_PROC_SHUTDOWN_DRIVER   107
 
#define DB_PROC_CLOSE_CURSOR   201
 
#define DB_PROC_DELETE   202
 
#define DB_PROC_FETCH   203
 
#define DB_PROC_INSERT   204
 
#define DB_PROC_OPEN_INSERT_CURSOR   205
 
#define DB_PROC_OPEN_SELECT_CURSOR   206
 
#define DB_PROC_OPEN_UPDATE_CURSOR   207
 
#define DB_PROC_UPDATE   208
 
#define DB_PROC_ROWS   209
 
#define DB_PROC_BIND_UPDATE   220
 
#define DB_PROC_BIND_INSERT   221
 
#define DB_PROC_EXECUTE_IMMEDIATE   301
 
#define DB_PROC_BEGIN_TRANSACTION   302
 
#define DB_PROC_COMMIT_TRANSACTION   303
 
#define DB_PROC_CREATE_TABLE   401
 
#define DB_PROC_DESCRIBE_TABLE   402
 
#define DB_PROC_DROP_TABLE   403
 
#define DB_PROC_LIST_TABLES   404
 
#define DB_PROC_ADD_COLUMN   405
 
#define DB_PROC_DROP_COLUMN   406
 
#define DB_PROC_GRANT_ON_TABLE   407
 
#define DB_PROC_CREATE_INDEX   701
 
#define DB_PROC_LIST_INDEXES   702
 
#define DB_PROC_DROP_INDEX   703
 
#define DB_PERM_R   01
 
#define DB_PERM_W   02
 
#define DB_PERM_X   04
 
#define DB_OK   0
 
#define DB_FAILED   1
 
#define DB_NOPROC   2
 
#define DB_MEMORY_ERR   -1
 
#define DB_PROTOCOL_ERR   -2
 
#define DB_EOF   -1
 
#define DB_SQL_TYPE_UNKNOWN   0
 
#define DB_SQL_TYPE_CHARACTER   1
 
#define DB_SQL_TYPE_SMALLINT   2
 
#define DB_SQL_TYPE_INTEGER   3
 
#define DB_SQL_TYPE_REAL   4
 
#define DB_SQL_TYPE_DOUBLE_PRECISION   6
 
#define DB_SQL_TYPE_DECIMAL   7
 
#define DB_SQL_TYPE_NUMERIC   8
 
#define DB_SQL_TYPE_DATE   9
 
#define DB_SQL_TYPE_TIME   10
 
#define DB_SQL_TYPE_TIMESTAMP   11
 
#define DB_SQL_TYPE_INTERVAL   12
 
#define DB_SQL_TYPE_TEXT   13 /* length not defined */
 
#define DB_SQL_TYPE_SERIAL   21
 
#define DB_YEAR   0x4000
 
#define DB_MONTH   0x2000
 
#define DB_DAY   0x1000
 
#define DB_HOUR   0x0800
 
#define DB_MINUTE   0x0400
 
#define DB_SECOND   0x0200
 
#define DB_FRACTION   0x0100
 
#define DB_DATETIME_MASK   0xFF00
 
#define DB_C_TYPE_STRING   1
 
#define DB_C_TYPE_INT   2
 
#define DB_C_TYPE_DOUBLE   3
 
#define DB_C_TYPE_DATETIME   4
 
#define DB_CURRENT   1
 
#define DB_NEXT   2
 
#define DB_PREVIOUS   3
 
#define DB_FIRST   4
 
#define DB_LAST   5
 
#define DB_READONLY   1
 
#define DB_INSERT   2
 
#define DB_UPDATE   3
 
#define DB_SEQUENTIAL   0
 
#define DB_SCROLL   1
 
#define DB_INSENSITIVE   4
 
#define DB_GRANTED   1
 
#define DB_NOT_GRANTED   -1
 
#define DB_PRIV_SELECT   0x01
 
#define DB_GROUP   0x01
 
#define DB_PUBLIC   0x02
 
#define DB_DEFINED   1
 
#define DB_UNDEFINED   2
 
#define DB_SQL_MAX   65536
 

Typedefs

typedef void * dbAddress
 
typedef int dbToken
 
typedef struct _db_string dbString
 
typedef struct _dbmscap dbDbmscap
 
typedef struct _db_dirent dbDirent
 
typedef struct _db_driver dbDriver
 
typedef struct _db_handle dbHandle
 
typedef struct _db_date_time dbDateTime
 
typedef struct _db_value dbValue
 
typedef struct _db_column dbColumn
 
typedef struct _db_table dbTable
 
typedef struct _db_cursor dbCursor
 
typedef struct _db_index dbIndex
 
typedef struct _db_driver_state dbDriverState
 
typedef struct _db_connection dbConnection
 

Macro Definition Documentation

◆ DB_C_TYPE_DATETIME

#define DB_C_TYPE_DATETIME   4

Definition at line 110 of file dbmi.h.

◆ DB_C_TYPE_DOUBLE

#define DB_C_TYPE_DOUBLE   3

Definition at line 109 of file dbmi.h.

◆ DB_C_TYPE_INT

#define DB_C_TYPE_INT   2

Definition at line 108 of file dbmi.h.

◆ DB_C_TYPE_STRING

#define DB_C_TYPE_STRING   1

Definition at line 107 of file dbmi.h.

◆ DB_CURRENT

#define DB_CURRENT   1

Definition at line 113 of file dbmi.h.

◆ DB_DATETIME_MASK

#define DB_DATETIME_MASK   0xFF00

Definition at line 104 of file dbmi.h.

◆ DB_DAY

#define DB_DAY   0x1000

Definition at line 99 of file dbmi.h.

◆ DB_DEFAULT_DRIVER

#define DB_DEFAULT_DRIVER   "sqlite"

Definition at line 21 of file dbmi.h.

◆ DB_DEFINED

#define DB_DEFINED   1

Definition at line 138 of file dbmi.h.

◆ DB_EOF

#define DB_EOF   -1

Definition at line 76 of file dbmi.h.

◆ DB_FAILED

#define DB_FAILED   1

Definition at line 72 of file dbmi.h.

◆ DB_FIRST

#define DB_FIRST   4

Definition at line 116 of file dbmi.h.

◆ DB_FRACTION

#define DB_FRACTION   0x0100

Definition at line 103 of file dbmi.h.

◆ DB_GRANTED

#define DB_GRANTED   1

Definition at line 128 of file dbmi.h.

◆ DB_GROUP

#define DB_GROUP   0x01

Definition at line 134 of file dbmi.h.

◆ DB_HOUR

#define DB_HOUR   0x0800

Definition at line 100 of file dbmi.h.

◆ DB_INSENSITIVE

#define DB_INSENSITIVE   4

Definition at line 125 of file dbmi.h.

◆ DB_INSERT

#define DB_INSERT   2

Definition at line 121 of file dbmi.h.

◆ DB_LAST

#define DB_LAST   5

Definition at line 117 of file dbmi.h.

◆ DB_MEMORY_ERR

#define DB_MEMORY_ERR   -1

Definition at line 74 of file dbmi.h.

◆ DB_MINUTE

#define DB_MINUTE   0x0400

Definition at line 101 of file dbmi.h.

◆ DB_MONTH

#define DB_MONTH   0x2000

Definition at line 98 of file dbmi.h.

◆ DB_NEXT

#define DB_NEXT   2

Definition at line 114 of file dbmi.h.

◆ DB_NOPROC

#define DB_NOPROC   2

Definition at line 73 of file dbmi.h.

◆ DB_NOT_GRANTED

#define DB_NOT_GRANTED   -1

Definition at line 129 of file dbmi.h.

◆ DB_OK

#define DB_OK   0

Definition at line 71 of file dbmi.h.

◆ DB_PERM_R

#define DB_PERM_R   01

Definition at line 66 of file dbmi.h.

◆ DB_PERM_W

#define DB_PERM_W   02

Definition at line 67 of file dbmi.h.

◆ DB_PERM_X

#define DB_PERM_X   04

Definition at line 68 of file dbmi.h.

◆ DB_PREVIOUS

#define DB_PREVIOUS   3

Definition at line 115 of file dbmi.h.

◆ DB_PRIV_SELECT

#define DB_PRIV_SELECT   0x01

Definition at line 132 of file dbmi.h.

◆ DB_PROC_ADD_COLUMN

#define DB_PROC_ADD_COLUMN   405

Definition at line 57 of file dbmi.h.

◆ DB_PROC_BEGIN_TRANSACTION

#define DB_PROC_BEGIN_TRANSACTION   302

Definition at line 50 of file dbmi.h.

◆ DB_PROC_BIND_INSERT

#define DB_PROC_BIND_INSERT   221

Definition at line 47 of file dbmi.h.

◆ DB_PROC_BIND_UPDATE

#define DB_PROC_BIND_UPDATE   220

Definition at line 46 of file dbmi.h.

◆ DB_PROC_CLOSE_CURSOR

#define DB_PROC_CLOSE_CURSOR   201

Definition at line 37 of file dbmi.h.

◆ DB_PROC_CLOSE_DATABASE

#define DB_PROC_CLOSE_DATABASE   101

Definition at line 29 of file dbmi.h.

◆ DB_PROC_COMMIT_TRANSACTION

#define DB_PROC_COMMIT_TRANSACTION   303

Definition at line 51 of file dbmi.h.

◆ DB_PROC_CREATE_DATABASE

#define DB_PROC_CREATE_DATABASE   102

Definition at line 30 of file dbmi.h.

◆ DB_PROC_CREATE_INDEX

#define DB_PROC_CREATE_INDEX   701

Definition at line 61 of file dbmi.h.

◆ DB_PROC_CREATE_TABLE

#define DB_PROC_CREATE_TABLE   401

Definition at line 53 of file dbmi.h.

◆ DB_PROC_DELETE

#define DB_PROC_DELETE   202

Definition at line 38 of file dbmi.h.

◆ DB_PROC_DELETE_DATABASE

#define DB_PROC_DELETE_DATABASE   103

Definition at line 31 of file dbmi.h.

◆ DB_PROC_DESCRIBE_TABLE

#define DB_PROC_DESCRIBE_TABLE   402

Definition at line 54 of file dbmi.h.

◆ DB_PROC_DROP_COLUMN

#define DB_PROC_DROP_COLUMN   406

Definition at line 58 of file dbmi.h.

◆ DB_PROC_DROP_INDEX

#define DB_PROC_DROP_INDEX   703

Definition at line 63 of file dbmi.h.

◆ DB_PROC_DROP_TABLE

#define DB_PROC_DROP_TABLE   403

Definition at line 55 of file dbmi.h.

◆ DB_PROC_EXECUTE_IMMEDIATE

#define DB_PROC_EXECUTE_IMMEDIATE   301

Definition at line 49 of file dbmi.h.

◆ DB_PROC_FETCH

#define DB_PROC_FETCH   203

Definition at line 39 of file dbmi.h.

◆ DB_PROC_FIND_DATABASE

#define DB_PROC_FIND_DATABASE   104

Definition at line 32 of file dbmi.h.

◆ DB_PROC_GRANT_ON_TABLE

#define DB_PROC_GRANT_ON_TABLE   407

Definition at line 59 of file dbmi.h.

◆ DB_PROC_INSERT

#define DB_PROC_INSERT   204

Definition at line 40 of file dbmi.h.

◆ DB_PROC_LIST_DATABASES

#define DB_PROC_LIST_DATABASES   105

Definition at line 33 of file dbmi.h.

◆ DB_PROC_LIST_INDEXES

#define DB_PROC_LIST_INDEXES   702

Definition at line 62 of file dbmi.h.

◆ DB_PROC_LIST_TABLES

#define DB_PROC_LIST_TABLES   404

Definition at line 56 of file dbmi.h.

◆ DB_PROC_OPEN_DATABASE

#define DB_PROC_OPEN_DATABASE   106

Definition at line 34 of file dbmi.h.

◆ DB_PROC_OPEN_INSERT_CURSOR

#define DB_PROC_OPEN_INSERT_CURSOR   205

Definition at line 41 of file dbmi.h.

◆ DB_PROC_OPEN_SELECT_CURSOR

#define DB_PROC_OPEN_SELECT_CURSOR   206

Definition at line 42 of file dbmi.h.

◆ DB_PROC_OPEN_UPDATE_CURSOR

#define DB_PROC_OPEN_UPDATE_CURSOR   207

Definition at line 43 of file dbmi.h.

◆ DB_PROC_ROWS

#define DB_PROC_ROWS   209

Definition at line 45 of file dbmi.h.

◆ DB_PROC_SHUTDOWN_DRIVER

#define DB_PROC_SHUTDOWN_DRIVER   107

Definition at line 35 of file dbmi.h.

◆ DB_PROC_UPDATE

#define DB_PROC_UPDATE   208

Definition at line 44 of file dbmi.h.

◆ DB_PROC_VERSION

#define DB_PROC_VERSION   999

Definition at line 27 of file dbmi.h.

◆ DB_PROTOCOL_ERR

#define DB_PROTOCOL_ERR   -2

Definition at line 75 of file dbmi.h.

◆ DB_PUBLIC

#define DB_PUBLIC   0x02

Definition at line 135 of file dbmi.h.

◆ DB_READONLY

#define DB_READONLY   1

Definition at line 120 of file dbmi.h.

◆ DB_SCROLL

#define DB_SCROLL   1

Definition at line 124 of file dbmi.h.

◆ DB_SECOND

#define DB_SECOND   0x0200

Definition at line 102 of file dbmi.h.

◆ DB_SEQUENTIAL

#define DB_SEQUENTIAL   0

Definition at line 123 of file dbmi.h.

◆ DB_SQL_MAX

#define DB_SQL_MAX   65536

Definition at line 142 of file dbmi.h.

◆ DB_SQL_TYPE_CHARACTER

#define DB_SQL_TYPE_CHARACTER   1

Definition at line 81 of file dbmi.h.

◆ DB_SQL_TYPE_DATE

#define DB_SQL_TYPE_DATE   9

Definition at line 88 of file dbmi.h.

◆ DB_SQL_TYPE_DECIMAL

#define DB_SQL_TYPE_DECIMAL   7

Definition at line 86 of file dbmi.h.

◆ DB_SQL_TYPE_DOUBLE_PRECISION

#define DB_SQL_TYPE_DOUBLE_PRECISION   6

Definition at line 85 of file dbmi.h.

◆ DB_SQL_TYPE_INTEGER

#define DB_SQL_TYPE_INTEGER   3

Definition at line 83 of file dbmi.h.

◆ DB_SQL_TYPE_INTERVAL

#define DB_SQL_TYPE_INTERVAL   12

Definition at line 91 of file dbmi.h.

◆ DB_SQL_TYPE_NUMERIC

#define DB_SQL_TYPE_NUMERIC   8

Definition at line 87 of file dbmi.h.

◆ DB_SQL_TYPE_REAL

#define DB_SQL_TYPE_REAL   4

Definition at line 84 of file dbmi.h.

◆ DB_SQL_TYPE_SERIAL

#define DB_SQL_TYPE_SERIAL   21

Definition at line 94 of file dbmi.h.

◆ DB_SQL_TYPE_SMALLINT

#define DB_SQL_TYPE_SMALLINT   2

Definition at line 82 of file dbmi.h.

◆ DB_SQL_TYPE_TEXT

#define DB_SQL_TYPE_TEXT   13 /* length not defined */

Definition at line 92 of file dbmi.h.

◆ DB_SQL_TYPE_TIME

#define DB_SQL_TYPE_TIME   10

Definition at line 89 of file dbmi.h.

◆ DB_SQL_TYPE_TIMESTAMP

#define DB_SQL_TYPE_TIMESTAMP   11

Definition at line 90 of file dbmi.h.

◆ DB_SQL_TYPE_UNKNOWN

#define DB_SQL_TYPE_UNKNOWN   0

Definition at line 79 of file dbmi.h.

◆ DB_UNDEFINED

#define DB_UNDEFINED   2

Definition at line 139 of file dbmi.h.

◆ DB_UPDATE

#define DB_UPDATE   3

Definition at line 122 of file dbmi.h.

◆ DB_VERSION

#define DB_VERSION   "0"

Definition at line 18 of file dbmi.h.

◆ DB_YEAR

#define DB_YEAR   0x4000

Definition at line 97 of file dbmi.h.

Typedef Documentation

◆ dbAddress

typedef void* dbAddress

Definition at line 144 of file dbmi.h.

◆ dbColumn

typedef struct _db_column dbColumn

◆ dbConnection

typedef struct _db_connection dbConnection

◆ dbCursor

typedef struct _db_cursor dbCursor

◆ dbDateTime

typedef struct _db_date_time dbDateTime

◆ dbDbmscap

typedef struct _dbmscap dbDbmscap

◆ dbDirent

typedef struct _db_dirent dbDirent

◆ dbDriver

typedef struct _db_driver dbDriver

◆ dbDriverState

◆ dbHandle

typedef struct _db_handle dbHandle

◆ dbIndex

typedef struct _db_index dbIndex

◆ dbString

typedef struct _db_string dbString

◆ dbTable

typedef struct _db_table dbTable

◆ dbToken

typedef int dbToken

Definition at line 145 of file dbmi.h.

◆ dbValue

typedef struct _db_value dbValue