GRASS GIS 8 Programmer's Manual
8.5.0dev(2025)-565e82de51
Main Page
Related Pages
Data Structures
Data Structures
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Related Functions
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
x
y
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
r
s
t
u
v
w
y
Enumerations
a
c
d
e
h
i
j
l
m
n
o
p
r
s
t
v
y
Enumerator
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
y
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
d_rows.c
Go to the documentation of this file.
1
/*!
2
* \file db/dbmi_driver/d_rows.c
3
*
4
* \brief DBMI Library (driver) - get number of records
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 Get number of selected rows
21
22
\return DB_OK on success
23
\return DB_FAILED on failure
24
*/
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_d_get_num_rows
int db_d_get_num_rows(void)
Get number of selected rows.
Definition:
d_rows.c:25
dbmi.h
dbToken
int dbToken
Definition:
dbmi.h:145
DB_OK
#define DB_OK
Definition:
dbmi.h:71
dbstubs.h
db_driver_get_num_rows
int(* db_driver_get_num_rows)(dbCursor *)
db_find_token
dbAddress db_find_token(dbToken)
Find token.
Definition:
db/dbmi_base/token.c:30
macros.h
DB_SEND_INT
#define DB_SEND_INT(x)
Definition:
macros.h:82
DB_SEND_SUCCESS
#define DB_SEND_SUCCESS()
Definition:
macros.h:13
DB_RECV_TOKEN
#define DB_RECV_TOKEN(x)
Definition:
macros.h:219
DB_SEND_FAILURE
#define DB_SEND_FAILURE()
Definition:
macros.h:18
_db_cursor
Definition:
dbmi.h:221
lib
db
dbmi_driver
d_rows.c
Generated on Thu Mar 20 2025 07:33:23 for GRASS GIS 8 Programmer's Manual by
1.9.1