GRASS 8 Programmer's Manual 8.6.0dev(2026)-55de52a352
Loading...
Searching...
No Matches
d_execute.c
Go to the documentation of this file.
1/*!
2 * \file db/dbmi_driver/d_execute.c
3 *
4 * \brief DBMI Library (driver) - execute SQL 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 <stdlib.h>
13#include <grass/dbmi.h>
14#include "macros.h"
15#include "dbstubs.h"
16
17/*!
18 \brief Execute SQL statements
19
20 \return DB_OK on success
21 \return DB_FAILED on failure
22 */
24{
25 int stat;
27
28 /* get the arg(s) */
31
32 /* call the procedure */
35
36 /* send the return code */
37 if (stat != DB_OK) {
39 return DB_OK;
40 }
42
43 /* no results */
44 return DB_OK;
45}
46
47/*!
48 \brief Begin transaction
49
50 \return DB_OK on success
51 \return DB_FAILED on failure
52 */
54{
55 int stat;
56
57 /* call the procedure */
59
60 /* send the return code */
61 if (stat != DB_OK) {
63 return DB_OK;
64 }
66
67 /* no results */
68 return DB_OK;
69}
70
71/*!
72 \brief Commit transaction
73
74 \return DB_OK on success
75 \return DB_FAILED on failure
76 */
78{
79 int stat;
80
81 /* call the procedure */
83
84 /* send the return code */
85 if (stat != DB_OK) {
87 return DB_OK;
88 }
90
91 /* no results */
92 return DB_OK;
93}
int db_d_begin_transaction(void)
Begin transaction.
Definition d_execute.c:53
int db_d_execute_immediate(void)
Execute SQL statements.
Definition d_execute.c:23
int db_d_commit_transaction(void)
Commit transaction.
Definition d_execute.c:77
Main header of GRASS DataBase Management Interface.
#define DB_OK
Definition dbmi.h:69
int(* db_driver_commit_transaction)(void)
int(* db_driver_execute_immediate)(dbString *)
int(* db_driver_begin_transaction)(void)
void db_free_string(dbString *)
Free allocated space for dbString.
Definition string.c:148
void db_init_string(dbString *)
Initialize dbString.
Definition string.c:23
#define DB_SEND_SUCCESS()
Definition macros.h:13
#define DB_RECV_STRING(x)
Definition macros.h:39
#define DB_SEND_FAILURE()
Definition macros.h:18