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

awora.h File Reference


Detailed Description

Note:
Most data structures based on Oracle examples. That is why the code is so fugly.

Todo:
Use new oci8 api, see PHP oci8 for inspiration

#include "awdb.h"
#include "monitor.h"
#include "wire.h"
#include "regexmatch.h"
#include <oratypes.h>
#include <ocidfn.h>
#include <ociapr.h>

Go to the source code of this file.

Data Structures

struct  aw_ora_cinfo_t
 Database connection info. More...

struct  aw_ora_conn_t
 State info. More...

struct  aw_ora_state_t
 State info. More...

struct  define
struct  describe

Defines

#define DATE_TYPE   12
#define FC_OOPEN   14
#define FLOAT_TYPE   4
#define FT_DELETE   9
#define FT_INSERT   3
#define FT_SELECT   4
#define FT_UPDATE   5
#define INT_TYPE   3
#define MAX_ITEM_BUFFER_SIZE   33
#define MAX_SELECT_LIST_SIZE   12
#define MAX_SQL_IDENTIFIER   31
#define NO_DATA_FOUND   1403
#define NULL_VALUE_RETURNED   1405
#define NUMBER_TYPE   2
#define PARSE_NO_DEFER   0
#define PARSE_V7_LNG   2
#define ROWID_TYPE   11
#define STRING_TYPE   5
#define VAR_NOT_IN_LIST   1007
#define VARCHAR2_TYPE   1

Functions

void aw_ora_connect (aw_ora_cinfo_t *cinfo, aw_ora_state_t *state, aw_logger_t *logger)
 Get a db connection, from pool if exists or create a db connection.

sword aw_ora_describe_define (Lda_Def *lda, Cda_Def *cda, struct describe *desc, struct define *def)
 Stolen from cdemo2.c and modified.

void aw_ora_disconnect (aw_ora_cinfo_t *cinfo, aw_ora_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_ora_disconnect_all (aw_ora_cinfo_t *cinfo, aw_ora_state_t *state, aw_logger_t *logger)
 Release the ALL db connections back to the pool with same login.

byte_t * aw_ora_error (Lda_Def *lda, Cda_Def *cursor, text *msg, sword msgsize)
 Fill string with oracle error message.

void aw_ora_init (void)
 Initialize lib.

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


Define Documentation

#define DATE_TYPE   12
 

#define FC_OOPEN   14
 

#define FLOAT_TYPE   4
 

#define FT_DELETE   9
 

#define FT_INSERT   3
 

#define FT_SELECT   4
 

#define FT_UPDATE   5
 

#define INT_TYPE   3
 

#define MAX_ITEM_BUFFER_SIZE   33
 

#define MAX_SELECT_LIST_SIZE   12
 

#define MAX_SQL_IDENTIFIER   31
 

#define NO_DATA_FOUND   1403
 

#define NULL_VALUE_RETURNED   1405
 

#define NUMBER_TYPE   2
 

#define PARSE_NO_DEFER   0
 

#define PARSE_V7_LNG   2
 

#define ROWID_TYPE   11
 

#define STRING_TYPE   5
 

#define VAR_NOT_IN_LIST   1007
 

#define VARCHAR2_TYPE   1
 


Function Documentation

void aw_ora_connect (  aw_ora_cinfo_t *  cinfo,
aw_ora_state_t *  state,
aw_logger_t *  logger
) 
 

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

aw_ora_connect

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

sword aw_ora_describe_define (  Lda_Def *  lda,
Cda_Def *  cda,
struct describe *  desc,
struct define *  def
) 
 

Stolen from cdemo2.c and modified.

aw_ora_describe_define

void aw_ora_disconnect (  aw_ora_cinfo_t *  cinfo,
aw_ora_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_ora_disconnect

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

void aw_ora_disconnect_all (  aw_ora_cinfo_t *  cinfo,
aw_ora_state_t *  state,
aw_logger_t *  logger
) 
 

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

aw_ora_disconnect_all

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

byte_t* aw_ora_error (  Lda_Def *  lda,
Cda_Def *  cursor,
text *  msg,
sword  msgsize
) 
 

Fill string with oracle error message.

aw_ora_error

void aw_ora_init (  void   ) 
 

Initialize lib.

aw_ora_init

int32_t aw_ora_initialized (  void   ) 
 

Non-zero if lib is initialize.

aw_ora_initialized

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