/[Development]/lmsd/sql.h
ViewVC logotype

Contents of /lmsd/sql.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon Apr 14 22:20:47 2003 UTC (7 years, 4 months ago) by lukasz
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
- recovery from source (after crash-test of cvs)
1
2 /* sql_connect(): Connect to a given data source ... */
3 void * sql_connect(unsigned char *host, unsigned char *user, unsigned char *pass, unsigned char *db);
4 /* returns a 'black-box' pointer to a structure holding internal database frontend data */
5
6
7
8 /* sql_query(): Make a SQL query */
9 void * sql_query(void *handle, unsigned char *query, int result_importance);
10 /*
11 * where: handle is a blackbox pointer returned by sql_connect() and
12 * query is the actual query statement
13 *
14 *
15 * if result_importance is 0 the function will return NULL or handle depending
16 * on how much rows were returned (NULL for 0 rows, handle otherwise)
17 *
18 * in case result_importance is not null, the function returns a blackbox pointer
19 * to query result, which has to be disposed using sql_flushquery()
20 */
21
22
23 /* sql_count(): Get number of rows returned */
24 int sql_count(void * handle);
25 /* handle is a blackbox pointer returned by sql_query() */
26
27
28 /* sql_flushquery(): Dispose result information */
29 void sql_flushquery(void * handle);
30 /* handle: as above */
31
32
33 /* sql_getcolid(): Get a column identifier */
34 int sql_getcolid(void * handle, unsigned char * name);
35 /* fetches from query 'handle' an identifier associated with column 'name'
36 such an identifier has to be used in sql_strgetdata() ... */
37
38
39 /* sql_getrow(): Fetch a single row from query */
40 void * sql_getrow(void * handle);
41 /* returns another blackbox pointer, which has to be freed using sql_flushrow() */
42
43
44 /* sql_flushrow(): Dispose row information */
45 void * sql_flushrow(void *r);
46
47
48 /* sql_strgetdata(): Fetch data */
49 unsigned char * sql_strgetdata(void * row, int id);
50 /* this function fetches data from row, from a column associated with id 'id' */

CVS Admin
ViewVC Help
Powered by ViewVC 1.1.6