GRASS 8 Programmer's Manual 8.6.0dev(2026)-4bb960b182
Loading...
Searching...
No Matches
d_delete.c
Go to the documentation of this file.
1/*!
2 * \file db/dbmi_driver/d_delete.c
3 *
4 * \brief DBMI Library (driver) - delete record
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 Delete record (?)
18
19 \return DB_OK on success
20 \return DB_FAILED on failure
21 */
22int db_d_delete(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 }
36
37 /* call the procedure */
39
40 /* send the return code */
41 if (stat != DB_OK) {
43 return DB_OK;
44 }
46
47 /* no results */
48 return DB_OK;
49}
#define NULL
Definition ccmath.h:32
int db_d_delete(void)
Delete record (?)
Definition d_delete.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_delete)(dbCursor *)
dbAddress db_find_token(dbToken)
Find token.
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_SEND_SUCCESS()
Definition macros.h:13
#define DB_RECV_TOKEN(x)
Definition macros.h:219
#define DB_SEND_FAILURE()
Definition macros.h:18