[GRASS-SVN] r32637 - in grass/trunk/lib/db: . dbmi_client
dbmi_driver
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Aug 8 05:18:01 EDT 2008
Author: martinl
Date: 2008-08-08 05:18:01 -0400 (Fri, 08 Aug 2008)
New Revision: 32637
Modified:
grass/trunk/lib/db/dbmi_client/c_drop_col.c
grass/trunk/lib/db/dbmi_client/c_execute.c
grass/trunk/lib/db/dbmi_client/c_list_tabs.c
grass/trunk/lib/db/dbmi_client/c_openupdate.c
grass/trunk/lib/db/dbmi_client/c_priv.c
grass/trunk/lib/db/dbmi_driver/d_add_col.c
grass/trunk/lib/db/dbmi_driver/d_begin_work.x
grass/trunk/lib/db/dbmi_driver/d_bindupdate.c
grass/trunk/lib/db/dbmi_driver/d_close_cur.c
grass/trunk/lib/db/dbmi_driver/d_closedb.c
grass/trunk/lib/db/dbmi_driver/d_create_idx.c
grass/trunk/lib/db/dbmi_driver/d_create_tab.c
grass/trunk/lib/db/dbmi_driver/d_createdb.c
grass/trunk/lib/db/dbmi_driver/d_delete.c
grass/trunk/lib/db/dbmi_driver/d_deletedb.c
grass/trunk/lib/db/dbmi_driver/d_desc_table.c
grass/trunk/lib/db/dbmi_driver/d_drop_col.c
grass/trunk/lib/db/dbmi_driver/d_drop_index.c
grass/trunk/lib/db/dbmi_driver/d_drop_tab.c
grass/trunk/lib/db/dbmi_driver/d_execute.c
grass/trunk/lib/db/dbmi_driver/d_fetch.c
grass/trunk/lib/db/dbmi_driver/d_finddb.c
grass/trunk/lib/db/dbmi_driver/d_insert.c
grass/trunk/lib/db/dbmi_driver/d_list_idx.c
grass/trunk/lib/db/dbmi_driver/d_list_tabs.c
grass/trunk/lib/db/dbmi_driver/d_listdb.c
grass/trunk/lib/db/dbmi_driver/d_mkdir.c
grass/trunk/lib/db/dbmi_driver/d_opendb.c
grass/trunk/lib/db/dbmi_driver/d_openinsert.c
grass/trunk/lib/db/dbmi_driver/d_openselect.c
grass/trunk/lib/db/dbmi_driver/d_openupdate.c
grass/trunk/lib/db/dbmi_driver/d_priv.c
grass/trunk/lib/db/dbmi_driver/d_rows.c
grass/trunk/lib/db/dbmi_driver/d_update.c
grass/trunk/lib/db/dbmi_driver/d_version.c
grass/trunk/lib/db/dbmi_driver/driver.c
grass/trunk/lib/db/dbmi_driver/driver_state.c
grass/trunk/lib/db/dbmilib.dox
Log:
dbmilib: initial doxygenization of dbmi_driver (merge from devbr6, r32636)
Modified: grass/trunk/lib/db/dbmi_client/c_drop_col.c
===================================================================
--- grass/trunk/lib/db/dbmi_client/c_drop_col.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_client/c_drop_col.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -16,7 +16,7 @@
#include "macros.h"
/*!
- \brief driver db driver
+ \brief Drop column
\param driver db driver
\param tableName table name
Modified: grass/trunk/lib/db/dbmi_client/c_execute.c
===================================================================
--- grass/trunk/lib/db/dbmi_client/c_execute.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_client/c_execute.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -48,7 +48,7 @@
/*!
\brief Begin transaction
- \return driver db driver
+ \param driver db driver
\return DB_OK on success
\return DB_FAILED on failure
Modified: grass/trunk/lib/db/dbmi_client/c_list_tabs.c
===================================================================
--- grass/trunk/lib/db/dbmi_client/c_list_tabs.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_client/c_list_tabs.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -36,8 +36,7 @@
\return DB_OK on success
\return DB_FAILED on failure
*/
-int
-db_list_tables(dbDriver * driver, dbString ** names, int *count, int system)
+int db_list_tables(dbDriver * driver, dbString ** names, int *count, int system)
{
int ret_code;
Modified: grass/trunk/lib/db/dbmi_client/c_openupdate.c
===================================================================
--- grass/trunk/lib/db/dbmi_client/c_openupdate.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_client/c_openupdate.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -27,7 +27,6 @@
\return DB_OK on success
\return DB_FAILED on failure
*/
-
int db_open_update_cursor(dbDriver * driver, dbString * table_name,
dbString * select, dbCursor * cursor, int mode)
{
Modified: grass/trunk/lib/db/dbmi_client/c_priv.c
===================================================================
--- grass/trunk/lib/db/dbmi_client/c_priv.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_client/c_priv.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -16,7 +16,7 @@
#include "macros.h"
/*!
- \brief Grant privileges
+ \brief Grant privileges on table
\param driver db driver
\param tableName table name
Modified: grass/trunk/lib/db/dbmi_driver/d_add_col.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_add_col.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_add_col.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_add_col.c
+ *
+ * \brief DBMI Library (driver) - add column to table
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,12 +18,12 @@
#include "dbstubs.h"
/*!
- \fn
- \brief
- \return
- \param
- */
-int db_d_add_column()
+ \brief Add column to table
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
+*/
+int db_d_add_column(void)
{
dbColumn column;
dbString name;
Modified: grass/trunk/lib/db/dbmi_driver/d_begin_work.x
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_begin_work.x 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_begin_work.x 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,8 +1,27 @@
+/*!
+ * \file db/dbmi_driver/d_begin_work.c
+ *
+ * \brief DBMI Library (driver) - ?
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include "dbmi.h"
#include "macros.h"
-int
-db_d_begin_work()
+/*!
+ \brief ?
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
+*/
+int db_d_begin_work(void)
{
int stat;
int result;
Modified: grass/trunk/lib/db/dbmi_driver/d_bindupdate.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_bindupdate.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_bindupdate.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_bindupdate.c
+ *
+ * \brief DBMI Library (driver) - bind update
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <grass/dbmi.h>
#include "macros.h"
#include "dbstubs.h"
@@ -3,8 +17,8 @@
/*!
- \fn
- \brief
- \return
- \param
+ \brief ADD
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
int db_d_bind_update()
Modified: grass/trunk/lib/db/dbmi_driver/d_close_cur.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_close_cur.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_close_cur.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_close_cur.c
+ *
+ * \brief DBMI Library (driver) - close cursor
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,12 +18,12 @@
#include "dbstubs.h"
/*!
- \fn
- \brief
- \return
- \param
- */
-int db_d_close_cursor()
+ \brief Close cursor
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
+*/
+int db_d_close_cursor(void)
{
dbCursor *cursor;
dbToken token;
Modified: grass/trunk/lib/db/dbmi_driver/d_closedb.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_closedb.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_closedb.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_closedb.c
+ *
+ * \brief DBMI Library (driver) - close database connection
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <grass/dbmi.h>
#include "macros.h"
#include "dbstubs.h"
@@ -3,10 +17,10 @@
/*!
- \fn
- \brief
- \return
- \param
- */
-int db_d_close_database()
+ \brief Close database connection
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
+*/
+int db_d_close_database(void)
{
int stat;
Modified: grass/trunk/lib/db/dbmi_driver/d_create_idx.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_create_idx.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_create_idx.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_create_idx.c
+ *
+ * \brief DBMI Library (driver) - create index
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,12 +18,12 @@
#include "dbstubs.h"
/*!
- \fn
- \brief
- \return
- \param
- */
-int db_d_create_index()
+ \brief Create index
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
+*/
+int db_d_create_index(void)
{
dbIndex index;
int stat;
Modified: grass/trunk/lib/db/dbmi_driver/d_create_tab.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_create_tab.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_create_tab.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_create_tab.c
+ *
+ * \brief DBMI Library (driver) - create table
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,12 +18,12 @@
#include "dbstubs.h"
/*!
- \fn
- \brief
- \return
- \param
+ \brief Create table
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
-int db_d_create_table()
+int db_d_create_table(void)
{
dbTable *table;
int stat;
Modified: grass/trunk/lib/db/dbmi_driver/d_createdb.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_createdb.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_createdb.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_createdb.c
+ *
+ * \brief DBMI Library (driver) - create database
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,12 +18,12 @@
#include "dbstubs.h"
/*!
- \fn
- \brief
- \return
- \param
+ \brief Create database
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
-int db_d_create_database()
+int db_d_create_database(void)
{
dbHandle handle;
int stat;
Modified: grass/trunk/lib/db/dbmi_driver/d_delete.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_delete.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_delete.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_delete.c
+ *
+ * \brief DBMI Library (driver) - delete record
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <grass/dbmi.h>
#include "macros.h"
#include "dbstubs.h"
@@ -3,10 +17,10 @@
/*!
- \fn
- \brief
- \return
- \param
+ \brief Delete record (?)
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
-int db_d_delete()
+int db_d_delete(void)
{
dbToken token;
Modified: grass/trunk/lib/db/dbmi_driver/d_deletedb.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_deletedb.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_deletedb.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_deletedb.c
+ *
+ * \brief DBMI Library (driver) - delete database
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,12 +18,12 @@
#include "dbstubs.h"
/*!
- \fn
- \brief
- \return
- \param
+ \brief Delete database
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
-int db_d_delete_database()
+int db_d_delete_database(void)
{
dbHandle handle;
int stat;
Modified: grass/trunk/lib/db/dbmi_driver/d_desc_table.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_desc_table.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_desc_table.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_desc_table.c
+ *
+ * \brief DBMI Library (driver) - describe table
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,12 +18,12 @@
#include "dbstubs.h"
/*!
- \fn
- \brief
- \return
- \param
+ \brief Describe table
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
-int db_d_describe_table()
+int db_d_describe_table(void)
{
dbTable *table;
dbString name;
Modified: grass/trunk/lib/db/dbmi_driver/d_drop_col.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_drop_col.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_drop_col.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_drop_col.c
+ *
+ * \brief DBMI Library (driver) - drop column
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,12 +18,12 @@
#include "dbstubs.h"
/*!
- \fn
- \brief
- \return
- \param
+ \brief Drop column
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
-int db_d_drop_column()
+int db_d_drop_column(void)
{
dbString tableName;
dbString columnName;
Modified: grass/trunk/lib/db/dbmi_driver/d_drop_index.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_drop_index.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_drop_index.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_drop_index.c
+ *
+ * \brief DBMI Library (driver) - drop index
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,11 +18,11 @@
#include "dbstubs.h"
/*!
- \fn
- \brief
- \return
- \param
- */
+ \brief Drop index
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
+*/
int db_d_drop_index(void)
{
dbString name;
Modified: grass/trunk/lib/db/dbmi_driver/d_drop_tab.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_drop_tab.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_drop_tab.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_drop_tab.c
+ *
+ * \brief DBMI Library (driver) - drop table
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,10 +18,10 @@
#include "dbstubs.h"
/*!
- \fn
- \brief
- \return
- \param
+ \brief Drop table
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
int db_d_drop_table(void)
{
Modified: grass/trunk/lib/db/dbmi_driver/d_execute.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_execute.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_execute.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_execute.c
+ *
+ * \brief DBMI Library (driver) - execute SQL statements
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,12 +18,12 @@
#include "dbstubs.h"
/*!
- \fn
- \brief
- \return
- \param
+ \brief Execute SQL statements
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
-int db_d_execute_immediate()
+int db_d_execute_immediate(void)
{
int stat;
dbString SQLstatement;
@@ -34,12 +48,12 @@
}
/*!
- \fn
- \brief
- \return
- \param
+ \brief Begin transaction
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
-int db_d_begin_transaction()
+int db_d_begin_transaction(void)
{
int stat;
@@ -58,10 +72,12 @@
}
/*!
- \fn
- \brief
- \return
- \param
+ \brief Commit transaction
+
+ \param driver db driver
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
int db_d_commit_transaction()
{
Modified: grass/trunk/lib/db/dbmi_driver/d_fetch.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_fetch.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_fetch.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_fetch.c
+ *
+ * \brief DBMI Library (driver) - fetch data
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <grass/dbmi.h>
#include "macros.h"
#include "dbstubs.h"
@@ -5,12 +19,11 @@
static int valid_cursor(dbCursor * cursor, int position);
+/*!
+ \brief Fetch data
-/*!
- \fn
- \brief
- \return
- \param
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
int db_d_fetch(void)
{
Modified: grass/trunk/lib/db/dbmi_driver/d_finddb.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_finddb.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_finddb.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_finddb.c
+ *
+ * \brief DBMI Library (driver) - find database
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,12 +18,12 @@
#include "dbstubs.h"
/*!
- \fn
- \brief
- \return
- \param
+ \brief Find database
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
-int db_d_find_database()
+int db_d_find_database(void)
{
dbHandle handle;
int found;
Modified: grass/trunk/lib/db/dbmi_driver/d_insert.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_insert.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_insert.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_insert.c
+ *
+ * \brief DBMI Library (driver) - insert new record
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <grass/dbmi.h>
#include "macros.h"
#include "dbstubs.h"
@@ -3,10 +17,10 @@
/*!
- \fn
- \brief
- \return
- \param
- */
-int db_d_insert()
+ \brief Insert new record into table
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
+*/
+int db_d_insert(void)
{
dbToken token;
Modified: grass/trunk/lib/db/dbmi_driver/d_list_idx.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_list_idx.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_list_idx.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_list_idx.c
+ *
+ * \brief DBMI Library (driver) - list indexes
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,12 +18,12 @@
#include "dbstubs.h"
/*!
- \fn
- \brief
- \return
- \param
+ \brief List indexes
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
-int db_d_list_indexes()
+int db_d_list_indexes(void)
{
dbIndex *list;
dbString table_name;
Modified: grass/trunk/lib/db/dbmi_driver/d_list_tabs.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_list_tabs.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_list_tabs.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_list_tabs.c
+ *
+ * \brief DBMI Library (driver) - list tables
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <grass/dbmi.h>
#include "macros.h"
#include "dbstubs.h"
@@ -3,10 +17,10 @@
/*!
- \fn
- \brief
- \return
- \param
+ \brief List available tables for given connection
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
-int db_d_list_tables()
+int db_d_list_tables(void)
{
dbString *names;
Modified: grass/trunk/lib/db/dbmi_driver/d_listdb.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_listdb.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_listdb.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_listdb.c
+ *
+ * \brief DBMI Library (driver) - list databases
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,11 +18,11 @@
#include "dbstubs.h"
/*!
- \fn int db_d_list_databases(void)
- \brief
- \return
- \param
- */
+ \brief List databases
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
+*/
int db_d_list_databases(void)
{
dbHandle *handles;
Modified: grass/trunk/lib/db/dbmi_driver/d_mkdir.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_mkdir.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_mkdir.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_mkdir.c
+ *
+ * \brief DBMI Library (driver) - creare directories
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
@@ -12,11 +26,15 @@
/*!
- \fn
- \brief
- \return
- \param
- */
+ \brief Create db directory
+
+ \param path full path
+ \param mode mode
+ \param parentdirs parent directories
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
+*/
int db_driver_mkdir(const char *path, int mode, int parentdirs)
{
if (parentdirs) {
Modified: grass/trunk/lib/db/dbmi_driver/d_opendb.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_opendb.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_opendb.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_opendb.c
+ *
+ * \brief DBMI Library (driver) - open database connection
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,12 +18,12 @@
#include "dbstubs.h"
/*!
- \fn
- \brief
- \return
- \param
+ \brief Open database connection
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
-int db_d_open_database()
+int db_d_open_database(void)
{
dbHandle handle;
int stat;
Modified: grass/trunk/lib/db/dbmi_driver/d_openinsert.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_openinsert.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_openinsert.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_openinsert.c
+ *
+ * \brief DBMI Library (driver) - open insert cursor
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <grass/dbmi.h>
#include "macros.h"
#include "dbstubs.h"
@@ -3,10 +17,10 @@
/*!
- \fn
- \brief
- \return
- \param
+ \brief Open insert cursor
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
-int db_d_open_insert_cursor()
+int db_d_open_insert_cursor(void)
{
dbCursor *cursor;
Modified: grass/trunk/lib/db/dbmi_driver/d_openselect.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_openselect.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_openselect.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_openselect.c
+ *
+ * \brief DBMI Library (driver) - open select cursor
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,12 +18,12 @@
#include "dbstubs.h"
/*!
- \fn
- \brief
- \return
- \param
+ \brief Open select cursor
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
-int db_d_open_select_cursor()
+int db_d_open_select_cursor(void)
{
dbCursor *cursor;
int stat;
Modified: grass/trunk/lib/db/dbmi_driver/d_openupdate.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_openupdate.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_openupdate.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_openupdate.c
+ *
+ * \brief DBMI Library (driver) - open update cursor
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,12 +18,12 @@
#include "dbstubs.h"
/*!
- \fn
- \brief
- \return
- \param
+ \brief Open update cursor
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
-int db_d_open_update_cursor()
+int db_d_open_update_cursor(void)
{
dbCursor *cursor;
int stat;
Modified: grass/trunk/lib/db/dbmi_driver/d_priv.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_priv.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_priv.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_priv.c
+ *
+ * \brief DBMI Library (driver) - privileges management
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "macros.h"
@@ -4,11 +18,12 @@
#include "dbstubs.h"
/*!
- \brief Grant privileges on table
- \return
- \param
- */
-int db_d_grant_on_table()
+ \brief Grant privileges on table
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
+*/
+int db_d_grant_on_table(void)
{
dbString tableName;
int priv, to;
Modified: grass/trunk/lib/db/dbmi_driver/d_rows.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_rows.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_rows.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_rows.c
+ *
+ * \brief DBMI Library (driver) - get number of records
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <grass/dbmi.h>
#include "macros.h"
#include "dbstubs.h"
@@ -3,10 +17,10 @@
/*!
- \fn
- \brief
- \return
- \param
+ \brief Get number of selected rows
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
*/
-int db_d_get_num_rows()
+int db_d_get_num_rows(void)
{
dbToken token;
Modified: grass/trunk/lib/db/dbmi_driver/d_update.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_update.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_update.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_update.c
+ *
+ * \brief DBMI Library (driver) - update statemets
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <grass/dbmi.h>
#include "macros.h"
#include "dbstubs.h"
@@ -3,10 +17,10 @@
/*!
- \fn
- \brief
- \return
- \param
- */
-int db_d_update()
+ \brief ?
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
+*/
+int db_d_update(void)
{
dbToken token;
Modified: grass/trunk/lib/db/dbmi_driver/d_version.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/d_version.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/d_version.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/d_version.c
+ *
+ * \brief DBMI Library (driver) - version info
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <grass/dbmi.h>
#include "macros.h"
@@ -2,8 +16,8 @@
/*!
- \fn
- \brief
- \return
- \param
- */
-int db_d_version()
+ \brief Get version info
+
+ \return DB_OK on success
+ \return DB_FAILED on failure
+*/
+int db_d_version(void)
{
Modified: grass/trunk/lib/db/dbmi_driver/driver.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/driver.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/driver.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,22 +1,19 @@
-
-/****************************************************************************
+/*!
+ * \file db/dbmi_driver/driver.c
+ *
+ * \brief DBMI Library (driver) - drivers
*
- * MODULE: DBMI library - drivers
- * AUTHOR(S): Joel Jones (CERL/UIUC) <jjones zorro.cecer.army.mil>
- * (overall original contributor of db libraries)
- * This file (and driver directory) originates with GRASS 5.0:
- * Radim Blazek <radim.blazek gmail.com> (original contributor)
- * Glynn Clements <glynn gclements.plus.com>,
- * Markus Neteler <neteler itc.it>,
- * Huidae Cho <grass4u gmail.com>,
- * PURPOSE: database management driver functions
- * COPYRIGHT: (C) 2003-2006 by the GRASS Development Team
+ * (C) 1999-2008 by the GRASS Development Team
*
- * This program is free software under the GNU General Public
- * License (>=v2). Read the file COPYING that comes with GRASS
- * for details.
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
*
- *****************************************************************************/
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ * \author Modified by Glynn Clements <glynn gclements.plus.com>,
+ * Markus Neteler <neteler itc.it>,
+ * Huidae Cho <grass4u gmail.com>
+ */
#include <sys/types.h>
#include <sys/stat.h>
@@ -31,11 +28,12 @@
extern char *getenv();
/*!
- \fn int db_driver (int argc,
- char *argv[])
- \brief
- \return
- \param
+ \brief Get driver (?)
+
+ \param argc, argv arguments
+
+ \return 0 on success
+ \return 1 on failure
*/
int db_driver(int argc, char *argv[])
{
Modified: grass/trunk/lib/db/dbmi_driver/driver_state.c
===================================================================
--- grass/trunk/lib/db/dbmi_driver/driver_state.c 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmi_driver/driver_state.c 2008-08-08 09:18:01 UTC (rev 32637)
@@ -1,3 +1,17 @@
+/*!
+ * \file db/dbmi_driver/driver_state.c
+ *
+ * \brief DBMI Library (driver) - drivers state
+ *
+ * (C) 1999-2008 by the GRASS Development Team
+ *
+ * This program is free software under the GNU General Public
+ * License (>=v2). Read the file COPYING that comes with GRASS
+ * for details.
+ *
+ * \author Joel Jones (CERL/UIUC), Radim Blazek
+ */
+
#include <stdlib.h>
#include <grass/dbmi.h>
#include "dbstubs.h"
@@ -5,25 +19,41 @@
static dbDriverState state;
-
+/*!
+ \brief Initialize driver state
+*/
void db__init_driver_state(void)
{
db_zero((void *)&state, sizeof(state));
}
+/*!
+ \brief Get driver state
+ \return pointer to dbDriverState
+*/
dbDriverState *db__get_driver_state(void)
{
return &state;
}
+/*!
+ \brief Test database connection
+ \return 1 opened
+ \return 0 closed
+*/
int db__test_database_open(void)
{
return state.open ? 1 : 0;
}
+/*!
+ \brief Mark database as opened
+ \param dbname database name
+ \param dbschema database schema name
+*/
void db__mark_database_open(const char *dbname, const char *dbschema)
{
state.dbname = db_store(dbname);
@@ -31,7 +61,9 @@
state.open = 1;
}
-
+/*!
+ \brief Mark database as closed
+*/
void db__mark_database_closed(void)
{
free(state.dbname);
@@ -39,7 +71,11 @@
state.open = 0;
}
+/*!
+ \brief Add cursor do driver state
+ \param cursor db cursor to be added
+*/
void db__add_cursor_to_driver_state(dbCursor * cursor)
{
dbCursor **list;
@@ -66,7 +102,11 @@
list[i] = cursor;
}
+/*!
+ \brief Drop cursor from driver state
+ \param cursor db cursor to be dropped
+*/
void db__drop_cursor_from_driver_state(dbCursor * cursor)
{
int i;
@@ -76,7 +116,9 @@
state.cursor_list[i] = NULL;
}
-
+/*!
+ \brief Close all cursors
+*/
void db__close_all_cursors(void)
{
int i;
Modified: grass/trunk/lib/db/dbmilib.dox
===================================================================
--- grass/trunk/lib/db/dbmilib.dox 2008-08-08 09:11:14 UTC (rev 32636)
+++ grass/trunk/lib/db/dbmilib.dox 2008-08-08 09:18:01 UTC (rev 32637)
@@ -176,10 +176,89 @@
- db_update()
- db__copy_table()
+
\section dbmi_driver DBMI DRIVER functions
-[ to be moved here from below list ]
+ - db_driver()
+ - db_driver_mkdir()
+
+ - db_d_add_column()
+
+ - db_d_begin_transaction()
+
+ - db_d_bind_update()
+
+ - db_d_close_cursor()
+
+ - db_d_close_database()
+
+ - db_d_commit_transaction()
+
+ - db_d_create_database()
+
+ - db_d_create_index()
+
+ - db_d_create_table()
+
+ - db_d_delete()
+
+ - db_d_delete_database()
+
+ - db_d_describe_table()
+
+ - db_d_drop_column()
+
+ - db_d_drop_index()
+
+ - db_d_drop_table()
+
+ - db_d_execute_immediate()
+
+ - db_d_fetch()
+
+ - db_d_find_database()
+
+ - db_d_get_num_rows()
+
+ - db_driver_mkdir()
+
+ - db_d_grant_on_table()
+
+ - db_d_insert()
+
+ - db_d_list_databases()
+
+ - db_d_list_indexes()
+
+ - db_d_list_tables()
+
+ - db_d_open_database()
+
+ - db_d_open_insert_cursor()
+
+ - db_d_open_select_cursor()
+
+ - db_d_open_update_cursor()
+
+ - db_d_update()
+
+ - db_d_update()
+
+ - db__add_cursor_to_driver_state()
+
+ - db__close_all_cursors()
+
+ - db__drop_cursor_from_driver_state()
+
+ - db__init_driver_state()
+
+ - db__mark_database_closed()
+
+ - db__mark_database_open()
+
+ - db__test_database_open()
+
\section dbmi_functions DBMI functions list (incomplete)
\subsection DB_alloc_routines DB alloc routines
More information about the grass-commit
mailing list