GRASS 8 Programmer's Manual 8.6.0dev(2026)-4bb960b182
Loading...
Searching...
No Matches
c_openinsert.c
Go to the documentation of this file.
1/*!
2 * \file db/dbmi_client/c_openinsert.c
3 *
4 * \brief DBMI Library (client) - open insert cursor
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 Open insert cursor
17
18 \param driver db driver
19 \param cursor cursor to be opened
20
21 \return DB_OK on success
22 \return DB_FAILED on failure
23 */
25{
26 int ret_code;
27
28 /*
29 db_init_cursor (cursor);
30 */
31 cursor->driver = driver;
32
33 /* start the procedure call */
36
37 /* send the argument(s) to the procedure */
39
40 /* get the return code for the procedure call */
42
43 if (ret_code != DB_OK)
44 return ret_code; /* ret_code SHOULD == DB_FAILED */
45
46 /* get the results */
47 DB_RECV_TOKEN(&cursor->token);
48 DB_RECV_INT(&cursor->type);
49 DB_RECV_INT(&cursor->mode);
50 return DB_OK;
51}
int db_open_insert_cursor(dbDriver *driver, dbCursor *cursor)
Open insert cursor.
Main header of GRASS DataBase Management Interface.
#define DB_PROC_OPEN_INSERT_CURSOR
Definition dbmi.h:39
#define DB_OK
Definition dbmi.h:69
dbTable * db_get_cursor_table(dbCursor *)
Get table allocated by cursor.
Definition cursor.c:64
void db__set_protocol_fds(FILE *, FILE *)
?
#define DB_SEND_TABLE_DEFINITION(x)
Definition macros.h:137
#define DB_RECV_INT(x)
Definition macros.h:87
#define DB_RECV_TOKEN(x)
Definition macros.h:219
#define DB_START_PROCEDURE_CALL(x)
Definition macros.h:2
#define DB_RECV_RETURN_CODE(x)
Definition macros.h:7