GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-36359e2344
d_list_tabs.c
Go to the documentation of this file.
1
/*!
2
* \file db/dbmi_driver/d_list_tabs.c
3
*
4
* \brief DBMI Library (driver) - list tables
5
*
6
* (C) 1999-2008 by the GRASS Development Team
7
*
8
* This program is free software under the GNU General Public
9
* License (>=v2). Read the file COPYING that comes with GRASS
10
* for details.
11
*
12
* \author Joel Jones (CERL/UIUC), Radim Blazek
13
*/
14
15
#include <
grass/dbmi.h
>
16
#include "
macros.h
"
17
#include "
dbstubs.h
"
18
19
/*!
20
\brief List available tables for given connection
21
22
\return DB_OK on success
23
\return DB_FAILED on failure
24
*/
25
int
db_d_list_tables
(
void
)
26
{
27
dbString
*names;
28
int
count
;
29
int
system;
30
int
stat;
31
32
/* arg(s) */
33
DB_RECV_INT
(&system);
34
35
/* call the procedure */
36
stat =
db_driver_list_tables
(&names, &
count
, system);
37
38
/* send the return code */
39
if
(stat !=
DB_OK
) {
40
DB_SEND_FAILURE
();
41
return
DB_OK
;
42
}
43
DB_SEND_SUCCESS
();
44
45
/* send results */
46
DB_SEND_STRING_ARRAY
(names,
count
);
47
48
return
DB_OK
;
49
}
db_d_list_tables
int db_d_list_tables(void)
List available tables for given connection.
Definition:
d_list_tabs.c:25
dbmi.h
DB_OK
#define DB_OK
Definition:
dbmi.h:71
dbstubs.h
db_driver_list_tables
int(* db_driver_list_tables)(dbString **, int *, int)
count
int count
macros.h
DB_SEND_STRING_ARRAY
#define DB_SEND_STRING_ARRAY(x, n)
Definition:
macros.h:29
DB_RECV_INT
#define DB_RECV_INT(x)
Definition:
macros.h:87
DB_SEND_SUCCESS
#define DB_SEND_SUCCESS()
Definition:
macros.h:13
DB_SEND_FAILURE
#define DB_SEND_FAILURE()
Definition:
macros.h:18
_db_string
Definition:
dbmi.h:147
lib
db
dbmi_driver
d_list_tabs.c
Generated on Thu Nov 21 2024 07:03:26 for GRASS GIS 8 Programmer's Manual by
1.9.1