1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
|
/* $Id: oracle.h,v 1.40 1999/06/01 08:11:04 thies Exp $ */
#ifndef _PHP3_ORACLE_H
#define _PHP3_ORACLE_H
#if HAVE_ORACLE
#if (defined(__osf__) && defined(__alpha))
# ifndef A_OSF
# define A_OSF
# endif
# ifndef OSF1
# define OSF1
# endif
# ifndef _INTRINSICS
# define _INTRINSICS
# endif
#endif /* osf alpha */
#include "oratypes.h"
#include "ocidfn.h"
#ifdef __STDC__
#include "ociapr.h"
#endif
extern php3_module_entry oracle_module_entry;
#define oracle_module_ptr &oracle_module_entry
/* oparse flags */
#define DEFER_PARSE 1
#define NATIVE 1
#define VERSION_7 2
#define ORANUMWIDTH 38
#if (defined(__osf__) && defined(__alpha)) || defined(CRAY) || defined(KSR)
#define HDA_SIZE 512
#else
#define HDA_SIZE 256
#endif
#define ORAUIDLEN 32
#define ORAPWLEN 32
#define ORANAMELEN 32
#define ORABUFLEN 2000
/* Some Oracle error codes */
#define VAR_NOT_IN_LIST 1007
#define NO_DATA_FOUND 1403
#define NULL_VALUE_RETURNED 1405
/* Some SQL and OCI function codes */
#define FT_INSERT 3
#define FT_SELECT 4
#define FT_UPDATE 5
#define FT_DELETE 9
#define FC_OOPEN 14
typedef struct {
int open;
Lda_Def lda;
ub1 hda[HDA_SIZE];
} oraConnection;
typedef struct oraColumn {
sb4 dbsize;
sb2 dbtype;
text cbuf[ORANAMELEN+1];
sb4 cbufl;
sb4 dsize;
sb2 prec;
sb2 scale;
sb2 nullok;
ub1 *buf;
sb2 indp;
ub2 col_retlen, col_retcode;
} oraColumn;
typedef struct oraParam {
text *progv;
sword progvl;
sb2 inout;
ub2 alen;
} oraParam;
typedef struct oraCursor {
int open;
Cda_Def cda;
text *query;
HashTable *params;
int nparams;
oraColumn *columns;
int ncols;
int fetched;
oraConnection *conn_ptr;
int conn_id;
} oraCursor;
typedef struct {
char *defDB;
char *defUser;
char *defPW;
long allow_persistent;
long max_persistent;
long max_links;
long num_persistent;
long num_links;
int le_conn, le_pconn, le_cursor;
HashTable *conns;
} oracle_module;
extern void php3_Ora_Bind(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Close(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Commit(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_CommitOff(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_CommitOn(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Do(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Error(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_ErrorCode(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Exec(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Fetch(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_FetchInto(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_ColumnType(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_ColumnName(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_ColumnSize(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_GetColumn(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_NumCols(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_NumRows(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Logoff(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Logon(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_PLogon(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Open(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Parse(INTERNAL_FUNCTION_PARAMETERS);
extern void php3_Ora_Rollback(INTERNAL_FUNCTION_PARAMETERS);
extern int php3_minit_oracle(INIT_FUNC_ARGS);
extern int php3_mshutdown_oracle(SHUTDOWN_FUNC_ARGS);
extern int php3_rshutdown_oracle(SHUTDOWN_FUNC_ARGS);
extern void php3_info_oracle(void);
extern int php3_rinit_oracle(INIT_FUNC_ARGS);
#else
#define oracle_module_ptr NULL
#endif /* HAVE_ORACLE */
#endif /* _PHP3_ORACLE_H */
/*
* Local Variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/
|