GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71759
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
c_openselect.c File Reference

DBMI Library (client) - open select cursor. More...

#include <grass/dbmi.h>
#include "macros.h"
Include dependency graph for c_openselect.c:

Go to the source code of this file.

Functions

int db_open_select_cursor (dbDriver *driver, dbString *select, dbCursor *cursor, int mode)
 Open select cursor. More...
 

Detailed Description

DBMI Library (client) - open select cursor.

(C) 1999-2008, 2012 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

Definition in file c_openselect.c.

Function Documentation

int db_open_select_cursor ( dbDriver driver,
dbString select,
dbCursor cursor,
int  mode 
)

Open select cursor.

Open modes:

  • DB_SEQUENTIAL

Data can be fetched by db_fetch().

Cursor should be closed by db_close_cursor().

Parameters
driverpointer to dbDriver
selectSQL select statement (pointer to dbString)
cursorpointer to dbCursor to be opened
modeopen mode
Returns
DB_OK on success
DB_FAILED on failure

Definition at line 37 of file c_openselect.c.

References db__set_protocol_fds(), db_init_cursor(), DB_OK, DB_PROC_OPEN_SELECT_CURSOR, DB_RECV_INT, DB_RECV_RETURN_CODE, DB_RECV_TABLE_DEFINITION, DB_RECV_TOKEN, DB_SEND_INT, DB_SEND_STRING, DB_START_PROCEDURE_CALL, driver, _db_cursor::driver, _db_cursor::mode, _db_driver::recv, _db_driver::send, _db_cursor::table, _db_cursor::token, and _db_cursor::type.

Referenced by db_get_table_number_of_rows(), db_select_CatValArray(), db_select_int(), db_select_value(), NetA_init_distinct(), NetA_init_timetable_from_db(), P_Aux_to_Vector(), and Vect_write_ascii().