GRASS 8 Programmer's Manual 8.6.0dev(2026)-4bb960b182
Loading...
Searching...
No Matches
d_bindupdate.c
Go to the documentation of this file.
1/*!
2 * \file db/dbmi_driver/d_bindupdate.c
3 *
4 * \brief DBMI Library (driver) - bind update
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 ADD
18
19 \return DB_OK on success
20 \return DB_FAILED on failure
21 */
23{
24 dbToken token;
26 int stat;
27 int ncols;
28
29 /* get the arg(s) */
30 DB_RECV_TOKEN(&token);
31 cursor = (dbCursor *)db_find_token(token);
33 db_error("** not an update cursor **");
35 return DB_FAILED;
36 }
37 DB_RECV_SHORT_ARRAY(&cursor->column_flags, &ncols);
39 db_error("** no columns set in cursor for binding **");
41 return DB_FAILED;
42 }
43
44 /* call the procedure */
46
47 /* send the return code */
48 if (stat != DB_OK) {
50 return DB_OK;
51 }
53
54 /* no results */
55 return DB_OK;
56}
#define NULL
Definition ccmath.h:32
int db_d_bind_update(void)
ADD.
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_bind_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_SHORT_ARRAY(x, n)
Definition macros.h:76
#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