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

awsqlsvr.h File Reference


Detailed Description

Uses freetds: http://www.freetds.org

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

Go to the source code of this file.

Data Structures

struct  aw_sqlsvr_cinfo_t
 Database connection info. More...

struct  aw_sqlsvr_conn_t
 State info. More...

struct  aw_sqlsvr_state_t
 State info. More...


Functions

void aw_sqlsvr_connect (aw_sqlsvr_cinfo_t *cinfo, aw_sqlsvr_state_t *state, aw_logger_t *logger)
 Get a db connection, from pool if exists or create a db connection.

void aw_sqlsvr_disconnect (aw_sqlsvr_cinfo_t *cinfo, aw_sqlsvr_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_sqlsvr_disconnect_all (aw_sqlsvr_cinfo_t *cinfo, aw_sqlsvr_state_t *state, aw_logger_t *logger)
 Release the ALL db connection back to the pool with this login.

void aw_sqlsvr_init (void)
 Initialize lib.

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

byte_t * aw_sqlsvr_val_as_string (TDSSOCKET *tds, int32_t col_idx, byte_t *result, int32_t buffsize)
 Get column data as string.


Function Documentation

void aw_sqlsvr_connect (  aw_sqlsvr_cinfo_t *  cinfo,
aw_sqlsvr_state_t *  state,
aw_logger_t *  logger
) 
 

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

aw_sqlsvr_connect

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

void aw_sqlsvr_disconnect (  aw_sqlsvr_cinfo_t *  cinfo,
aw_sqlsvr_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_sqlsvr_disconnect

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

void aw_sqlsvr_disconnect_all (  aw_sqlsvr_cinfo_t *  cinfo,
aw_sqlsvr_state_t *  state,
aw_logger_t *  logger
) 
 

Release the ALL db connection back to the pool with this login.

aw_sqlsvr_disconnect_all

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

void aw_sqlsvr_init (  void   ) 
 

Initialize lib.

aw_sqlsvr_init

int32_t aw_sqlsvr_initialized (  void   ) 
 

Non-zero if lib is initialize.

aw_sqlsvr_initialized

byte_t* aw_sqlsvr_val_as_string (  TDSSOCKET *  tds,
int32_t  col_idx,
byte_t *  result,
int32_t  buffsize
) 
 

Get column data as string.

aw_sqlsvr_val_as_string

Parameters:
tds TDSSOCKET
col_idx Column index
result Where to write the data
buffsize How big is the result

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