GRASS 8 Programmer's Manual 8.6.0dev(2026)-c83afef6d3
Loading...
Searching...
No Matches
d_createdb.c
Go to the documentation of this file.
1/*!
2 * \file db/dbmi_driver/d_createdb.c
3 *
4 * \brief DBMI Library (driver) - create database
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 Create database
19
20 \return DB_OK on success
21 \return DB_FAILED on failure
22 */
24{
25 dbHandle handle;
26 int stat;
27
28 /* get the arg(s) */
29 db_init_handle(&handle);
30 DB_RECV_HANDLE(&handle);
31
32 /* call the procedure */
34 db_free_handle(&handle);
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}
int db_d_create_database(void)
Create database.
Definition d_createdb.c:23
Main header of GRASS DataBase Management Interface.
#define DB_OK
Definition dbmi.h:69
int(* db_driver_create_database)(dbHandle *)
void db_init_handle(dbHandle *)
Initialize handle (i.e database/schema)
Definition handle.c:20
void db_free_handle(dbHandle *)
Free dbHandle structure.
Definition handle.c:76
#define DB_SEND_SUCCESS()
Definition macros.h:13
#define DB_RECV_HANDLE(x)
Definition macros.h:131
#define DB_SEND_FAILURE()
Definition macros.h:18