Project

General

Profile

main.c File Reference

all functions of this API More...

#include "main.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>

Functions

int sqliteOpen (mmachine m, char *f, int flag)
 Internal Don't use. - Create a generic database connection.
int _sqliteOpenFileEx (mmachine m)
 Scol function _sqliteOpenFileEx : fun [Chn P I I I] ObjSqlite.
int _sqliteOpenFile (mmachine m)
 Scol function _sqliteOpenFile : fun [Chn P] ObjSqlite Open a new connection (database in a file) Ouvre une connection sur base fichier / Connect a file database.
int _sqliteOpenMemory (mmachine m)
 Scol function _sqliteOpenMemory : fun [Chn] ObjSqlite Create and connect a database into the memory.
int _sqliteOpenTemp (mmachine m)
 Scol function _sqliteOpenTemp : fun [Chn] ObjSqlite Create and connect a database to the temporarly file.
int _sqliteClose (mmachine m)
 Scol function _sqliteClose : fun [ObjSqlite] I Close any database connexion.
int _sqliteCallbackProgress (mmachine m)
int _sqliteCallback (mmachine m)
int callobjsqlitecallbackProgress (mmachine m)
int _sqliteExec (mmachine m)
 Scol function _sqliteExec : fun [ObjSqlite S I] I Execute any sql instruction Return 0 if ok or the sqlite's error code.
int _sqliteExecResult (mmachine m)
 Scol function _sqliteExecResult : fun [ObjSlite S I] [[S S] r1] Run a sqlite request and return the result without callback.
int _getsqlitelimitflag (int mcat)
int _sqliteGetSizeLimit (mmachine m)
 _sqliteGetSizeLimit : Get the maximale size to objects manipulate by SQLite3 fun [ObjSqlite I] I more informations : _sqliteSetSizeLimit
int _sqliteSetSizeLimit (mmachine m)
 _sqliteSetSizeLimit : Set the maximale size to objects manipulate by SQLite3 fun [ObjSqlite I I] I more informations : http://www.sqlite.org/c3ref/c_limit_attached.html
int _sqliteThreadsafe (mmachine m)
 Scol function _sqliteThreadsafe : fun [] I Return 0 if mono-thread, 1 if serialized, 2 if multi-thread (strictly defined at the compile-time).
int _sqliteShraedCacheEnabled (mmachine m)
 Scol function _sqliteShraedCacheEnabled : fun [I] I Return 0 if success or a specific error code.
int _sqliteVersion (mmachine m)
 Scol function _sqliteVersion : fun [] S Return the SQLITE used version.
int _sqliteVersionScol (mmachine m)
 Scol function _sqliteVersionScol : fun [] S Return this library version (it is defined in main.h).
int SC_SQLITE_ONLYREAD (mmachine m)
int SC_SQLITE_READWRITE (mmachine m)
int SC_SQLITE_OPEN_NOMUTEX (mmachine m)
int SC_SQLITE_OPEN_FULLMUTEX (mmachine m)
int SC_SQLITE_OPEN_SHAREDCACHE (mmachine m)
int SC_SQLITE_OPEN_PRIVATE_CACHE (mmachine m)
int SC_SQLITE_LENGTH_LIMIT (mmachine m)
int SC_SQLITE_SQL_LENGTH_LIMIT (mmachine m)
int SC_SQLITE_COLUMN_LIMIT (mmachine m)
int SC_SQLITE_EXPR_DEPTH_LIMIT (mmachine m)
int SC_SQLITE_COMPOUND_SELECT_LIMIT (mmachine m)
int SC_SQLITE_VDBE_OP_LIMIT (mmachine m)
int SC_SQLITE_FUNCTION_ARG_LIMIT (mmachine m)
int SC_SQLITE_ATTACHED_LIMIT (mmachine m)
int SC_SQLITE_LIKE_PATTERN_LENGTH_LIMIT (mmachine m)
int SC_SQLITE_VARIABLE_NUMBER_LIMIT (mmachine m)
int SC_SQLITE_TRIGGER_DEPTH_LIMIT (mmachine m)
int ObjSqliteDestroy (mmachine m, int handsys, int mobj)
int SCOLinitSQLITEclass (mmachine m)

Variables

mmachine mm
char * sqlite_name [SQLITE_PKG_NB]
int(* sqlite_fun [SQLITE_PKG_NB])(mmachine m)
int sqlite_narg [SQLITE_PKG_NB]
char * sqlite_type [SQLITE_PKG_NB]

Detailed Description

all functions of this API

Author:
Stephane Bisaro

Function Documentation

int _sqliteClose ( mmachine  m  ) 

Scol function _sqliteClose : fun [ObjSqlite] I Close any database connexion.

Parameters:
ObjSqlite : a valid object
Returns:
I : 0 if ok, nil if scol error or an other integer if sqlite error
int _sqliteExec ( mmachine  m  ) 

Scol function _sqliteExec : fun [ObjSqlite S I] I Execute any sql instruction Return 0 if ok or the sqlite's error code.

Parameters:
ObjSqlite : a valid object
S : a valid sqlite request
I : should be nil
Returns:
I : 0 if success or the error code
int _sqliteExecResult ( mmachine  m  ) 

Scol function _sqliteExecResult : fun [ObjSlite S I] [[S S] r1] Run a sqlite request and return the result without callback.

Parameters:
ObjSqlite : a valid object
S : a valid sqlite request
I : should be nil
Returns:
[[S S] r1] : the result or nil if error
int _sqliteGetSizeLimit ( mmachine  m  ) 

_sqliteGetSizeLimit : Get the maximale size to objects manipulate by SQLite3 fun [ObjSqlite I] I more informations : _sqliteSetSizeLimit

Parameters:
ObjSqlite : a valid object
I : flag
Returns:
I : the value
int _sqliteOpenFile ( mmachine  m  ) 

Scol function _sqliteOpenFile : fun [Chn P] ObjSqlite Open a new connection (database in a file) Ouvre une connection sur base fichier / Connect a file database.

Parameters:
Chn : a channel
P : a read reference file
Returns:
ObjSqlite : a new object or nil if error
int _sqliteOpenFileEx ( mmachine  m  ) 

Scol function _sqliteOpenFileEx : fun [Chn P I I I] ObjSqlite.

Open a new connection (file) Ouvre une connection sur base fichier / Connect a file database

Parameters:
Chn : a channel
P : a read-reference file
I : flag : SQLITE_READWRITE (default) or SQLITE_ONLYREAD
I : flag : SQLITE_OPEN_PRIVATE_CACHE (default) or SQLITE_OPEN_SHAREDCACHE (see _sqliteSharedCacheEnabled too)
I : flag : SQLITE_OPEN_FULLMUTEX (default) or SQLITE_OPEN_NOMUTEX (multi-thread)
Returns:
ObjSqlite : a new object or nil if error
int _sqliteOpenMemory ( mmachine  m  ) 

Scol function _sqliteOpenMemory : fun [Chn] ObjSqlite Create and connect a database into the memory.

Parameters:
Chn : a channel
Returns:
ObjSqlite : a new object or nil if error
int _sqliteOpenTemp ( mmachine  m  ) 

Scol function _sqliteOpenTemp : fun [Chn] ObjSqlite Create and connect a database to the temporarly file.

Parameters:
Chn : a channel
Returns:
ObjSqlite : a new object or nil if error
int _sqliteSetSizeLimit ( mmachine  m  ) 

_sqliteSetSizeLimit : Set the maximale size to objects manipulate by SQLite3 fun [ObjSqlite I I] I more informations : http://www.sqlite.org/c3ref/c_limit_attached.html

Parameters:
ObjSqlite : a valid object
I : flag : SQLITE_LENGTH_LIMIT, SQLITE_SQL_LENGTH_LIMIT, SQLITE_COLUMN_LIMIT, SQLITE_EXPR_DEPTH_LIMIT, SQLITE_COMPOUND_SELECT_LIMIT, SQLITE_VDBE_OP_LIMIT, SQLITE_FUNCTION_ARG_LIMIT, SQLITE_ATTACHED_LIMIT, SQLITE_LIKE_PATTERN_LENGTH_LIMIT, SQLITE_VARIABLE_NUMBER_LIMIT, SQLITE_TRIGGER_DEPTH_LIMIT
I : the new value
Returns:
I : this new value
int sqliteOpen ( mmachine  m,
char *  f,
int  flag 
)

Internal Don't use. - Create a generic database connection.

Warning : the filename (if filename) must be encoded in utf-8 format (windows system only)

Generated on Tue Mar 15 13:59:36 2011 for sqlite3 by  doxygen 1.6.3