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

awsqlsvr.c File Reference

#include "awsqlsvr.h"
#include "llt.h"

Functions

 __attribute__ ((constructor))
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.

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

__attribute__ (  (constructor)   ) 
 

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

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)