GRASS 8 Programmer's Manual 8.6.0dev(2026)-4bb960b182
Loading...
Searching...
No Matches
d_update.c
Go to the documentation of this file.
1/*!
2 * \file db/dbmi_driver/d_update.c
3 *
4 * \brief DBMI Library (driver) - 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#include "dbstubs.h"
15
16/*!
17 \brief ?
18
19 \return DB_OK on success
20 \return DB_FAILED on failure
21 */
22int db_d_update(void)
23{
24 dbToken token;
26 int stat;
27
28 /* get the arg(s) */
29 DB_RECV_TOKEN(&token);
30 cursor = (dbCursor *)db_find_token(token);
32 db_error("** not an update cursor **");
34 return DB_FAILED;
35 }
37 db_error("** no columns bound in cursor for update **");
39 return DB_FAILED;
40 }
42
43 /* call the procedure */
45
46 /* send the return code */
47 if (stat != DB_OK) {
49 return DB_OK;
50 }
52
53 /* no results */
54 return DB_OK;
55}
#define NULL
Definition ccmath.h:32
int db_d_update(void)
?
Definition d_update.c:22
Main header of GRASS DataBase Management Interface.
int dbToken
Definition dbmi.h:143
#define DB_FAILED
Definition dbmi.h:70
#define DB_OK
Definition dbmi.h:69
int(* db_driver_update)(dbCursor *)
dbAddress db_find_token(dbToken)
Find token.
int db_test_cursor_any_column_flag(dbCursor *)
Checks columns' flag.
Definition cursor.c:410
void db_error(const char *)
Report error message.
int db_test_cursor_type_update(dbCursor *)
Check if cursor type is 'update'.
Definition cursor.c:155
#define DB_RECV_TABLE_DATA(x)
Definition macros.h:153
#define DB_SEND_SUCCESS()
Definition macros.h:13
#define DB_RECV_TOKEN(x)
Definition macros.h:219
#define DB_SEND_FAILURE()
Definition macros.h:18