GRASS 8 Programmer's Manual
8.6.0dev(2026)-4bb960b182
Loading...
Searching...
No Matches
c_update.c
Go to the documentation of this file.
1
/*!
2
* \file db/dbmi_client/c_update.c
3
*
4
* \brief DBMI Library (client) - update statements
5
*
6
* SPDX-FileCopyrightText: 1999-2008 GRASS Development Team
7
* SPDX-License-Identifier: GPL-2.0-or-later
8
*
9
* \author Joel Jones (CERL/UIUC), Radim Blazek
10
*/
11
12
#include <
grass/dbmi.h
>
13
#include "
macros.h
"
14
15
/*!
16
\brief ?
17
18
\param cursor db cursor
19
20
\return DB_OK on success
21
\return DB_FAILED on failure
22
*/
23
int
db_update
(
dbCursor
*
cursor
)
24
{
25
int
ret_code
;
26
27
/* start the procedure call */
28
db__set_protocol_fds
(
cursor
->driver->send,
cursor
->driver->recv);
29
DB_START_PROCEDURE_CALL
(
DB_PROC_UPDATE
);
30
31
/* send the argument(s) to the procedure */
32
DB_SEND_TOKEN
(&
cursor
->token);
33
DB_SEND_TABLE_DATA
(
cursor
->table);
34
35
/* get the return code for the procedure call */
36
DB_RECV_RETURN_CODE
(&
ret_code
);
37
38
if
(
ret_code
!=
DB_OK
)
39
return
ret_code
;
/* ret_code SHOULD == DB_FAILED */
40
41
/* no results */
42
return
DB_OK
;
43
}
db_update
int db_update(dbCursor *cursor)
?
Definition
c_update.c:23
AMI_STREAM
Definition
ami_stream.h:153
dbmi.h
Main header of GRASS DataBase Management Interface.
DB_OK
#define DB_OK
Definition
dbmi.h:69
DB_PROC_UPDATE
#define DB_PROC_UPDATE
Definition
dbmi.h:42
db__set_protocol_fds
void db__set_protocol_fds(FILE *, FILE *)
?
Definition
db/dbmi_base/xdr.c:73
macros.h
DB_SEND_TABLE_DATA
#define DB_SEND_TABLE_DATA(x)
Definition
macros.h:148
DB_START_PROCEDURE_CALL
#define DB_START_PROCEDURE_CALL(x)
Definition
macros.h:2
DB_RECV_RETURN_CODE
#define DB_RECV_RETURN_CODE(x)
Definition
macros.h:7
DB_SEND_TOKEN
#define DB_SEND_TOKEN(x)
Definition
macros.h:214
_db_cursor
Definition
dbmi.h:219
lib
db
dbmi_client
c_update.c
Generated on Mon Sep 14 2026 06:57:42 for GRASS 8 Programmer's Manual by
1.9.8