GRASS Programmer's Manual
6.5.svn(2014)-r66266
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
d_rows.c
Go to the documentation of this file.
1
15
#include <grass/dbmi.h>
16
#include "
macros.h
"
17
#include "
dbstubs.h
"
18
25
int
db_d_get_num_rows
(
void
)
26
{
27
dbToken token;
28
dbCursor *cursor;
29
int
nrows;
30
31
/* get the arg(s) */
32
DB_RECV_TOKEN
(&token);
33
cursor = (dbCursor *)
db_find_token
(token);
34
35
/* call the procedure */
36
nrows =
db_driver_get_num_rows
(cursor);
37
38
/* send the return code */
39
if
(nrows < 0) {
40
DB_SEND_FAILURE
();
41
return
DB_OK;
42
}
43
DB_SEND_SUCCESS
();
44
45
/* results */
46
DB_SEND_INT
(nrows);
47
return
DB_OK;
48
}
db_find_token
dbAddress db_find_token(dbToken token)
Definition:
db/dbmi_base/token.c:15
DB_SEND_INT
#define DB_SEND_INT(x)
Definition:
macros.h:37
DB_RECV_TOKEN
#define DB_RECV_TOKEN(x)
Definition:
macros.h:99
db_d_get_num_rows
int db_d_get_num_rows(void)
Get number of selected rows.
Definition:
d_rows.c:25
macros.h
DB_SEND_FAILURE
#define DB_SEND_FAILURE()
Definition:
macros.h:9
dbstubs.h
db_driver_get_num_rows
int(* db_driver_get_num_rows)()
DB_SEND_SUCCESS
#define DB_SEND_SUCCESS()
Definition:
macros.h:7
lib
db
dbmi_driver
d_rows.c
Generated on Sat Jan 2 2016 01:46:47 for GRASS Programmer's Manual by
1.8.5