Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

awsqlite.h File Reference


Detailed Description

#include "awdb.h"
#include "sqlite3.h"
#include "monitor.h"
#include "wire.h"
#include "regexmatch.h"

Go to the source code of this file.

Data Structures

struct  aw_sqlite_cinfo_t
 Database connection info. More...

struct  aw_sqlite_state_t
 State info. More...


Functions

void aw_sqlite_connect (aw_sqlite_cinfo_t *cinfo, aw_sqlite_state_t *state, aw_logger_t *logger)
 Get a db connection, from pool if exists or create a db connection.

void aw_sqlite_disconnect (aw_sqlite_cinfo_t *cinfo, aw_sqlite_state_t *state, aw_logger_t *logger, int32_t close)
 Release the db connection back to the pool, if 'close' is non-zero close the connection.

void aw_sqlite_disconnect_all (aw_sqlite_cinfo_t *cinfo, aw_sqlite_state_t *state, aw_logger_t *logger)
 Release the ALL db connections back to the pool with same login.

int32_t aw_sqlite_execute_stmt (sqlite3_stmt *stmt, aw_logger_t *logger)
 Execute statement and retry in case of SQLITE_BUSY.

void aw_sqlite_init (void)
 Initialize lib.

int32_t aw_sqlite_initialized (void)
 Non-zero if lib is initialize.


Function Documentation

void aw_sqlite_connect (  aw_sqlite_cinfo_t *  cinfo,
aw_sqlite_state_t *  state,
aw_logger_t *  logger
) 
 

Get a db connection, from pool if exists or create a db connection.

aw_sqlite_connect

Parameters:
cinfo Connection info
state Connection state info
logger Logger for messages

void aw_sqlite_disconnect (  aw_sqlite_cinfo_t *  cinfo,
aw_sqlite_state_t *  state,
aw_logger_t *  logger,
int32_t  close
) 
 

Release the db connection back to the pool, if 'close' is non-zero close the connection.

aw_sqlite_disconnect

Parameters:
cinfo Connection info
state Connection state info
logger Logger for messages
close Close connection if non-zero

void aw_sqlite_disconnect_all (  aw_sqlite_cinfo_t *  cinfo,
aw_sqlite_state_t *  state,
aw_logger_t *  logger
) 
 

Release the ALL db connections back to the pool with same login.

aw_sqlite_disconnect_all

Parameters:
cinfo Connection info
state Connection state info
logger Logger for messages

int32_t aw_sqlite_execute_stmt (  sqlite3_stmt *  stmt,
aw_logger_t *  logger
) 
 

Execute statement and retry in case of SQLITE_BUSY.

aw_sqlite_execute_stmt

Parameters:
stmt sqlite prepared statement
logger Logger
Returns:
SQLITE_xxx code (never returns SQLITE_BUSY)

void aw_sqlite_init (  void   ) 
 

Initialize lib.

aw_sqlite_init

int32_t aw_sqlite_initialized (  void   ) 
 

Non-zero if lib is initialize.

aw_sqlite_initialized

Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)