rpm
5.4.15
|
Go to the source code of this file.
Macros | |
#define | odbcUnlink(_odbc) ((ODBC_t)rpmioUnlinkPoolItem((rpmioItem)(_odbc), __FUNCTION__, __FILE__, __LINE__)) |
#define | odbcLink(_odbc) ((ODBC_t)rpmioLinkPoolItem((rpmioItem)(_odbc), __FUNCTION__, __FILE__, __LINE__)) |
#define | odbcFree(_odbc) ((ODBC_t)rpmioFreePoolItem((rpmioItem)(_odbc), __FUNCTION__, __FILE__, __LINE__)) |
Typedefs | |
typedef struct ODBC_s * | ODBC_t |
typedef struct HNDL_s * | HNDL_t |
typedef struct _STMT_s * | _STMT_t |
typedef struct _PARAM_s * | _PARAM_t |
Functions | |
ODBC_t | odbcUnlink (ODBC_t odbc) |
Unreference a odbc wrapper instance. More... | |
ODBC_t | odbcLink (ODBC_t odbc) |
Reference a odbc wrapper instance. More... | |
ODBC_t | odbcFree (ODBC_t odbc) |
Destroy a odbc wrapper. More... | |
ODBC_t | odbcNew (const char *fn, int flags) |
Create and load a odbc wrapper. More... | |
int | odbcGetEnvAttr (ODBC_t odbc, int _type, void *_bp, int _nb, int *nsp) |
int | odbcSetEnvAttr (ODBC_t odbc, int _type, void *_bp, int ns) |
int | odbcGetInfo (ODBC_t odbc, int _type, void *_bp, int _nb, short *nsp) |
int | odbcGetStmtAttr (ODBC_t odbc, int _attr, void *_bp, int _nb, int *nsp) |
int | odbcSetStmtAttr (ODBC_t odbc, int _attr, void *_bp, int ns) |
int | odbcConnect (ODBC_t odbc, const char *uri) |
int | odbcDisconnect (ODBC_t odbc) |
int | odbcListDataSources (ODBC_t odbc, void *_fp) |
int | odbcListDrivers (ODBC_t odbc, void *_fp) |
int | odbcTables (ODBC_t odbc, const char *tblname) |
int | odbcColumns (ODBC_t odbc, const char *tblname, const char *colname) |
int | odbcStatistics (ODBC_t odbc, const char *tblname) |
int | odbcCloseCursor (ODBC_t odbc) |
const char * | odbcGetCursorName (ODBC_t odbc) |
int | odbcSetCursorName (ODBC_t odbc, const char *s, size_t ns) |
int | odbcEndTran (ODBC_t odbc, int _rollback) |
int | odbcCommit (ODBC_t odbc) |
int | odbcRollback (ODBC_t odbc) |
int | odbcNRows (ODBC_t odbc) |
int | odbcNCols (ODBC_t odbc) |
int | odbcCancel (ODBC_t odbc) |
int | odbcFetch (ODBC_t odbc) |
int | odbcFetchScroll (ODBC_t odbc, short FetchOrientation, long FetchOffset) |
int | odbcGetData (ODBC_t odbc, unsigned short Col_or_Param_Num, short TargetType, void *TargetValuePtr, long BufferLength, long *StrLen_or_IndPtr) |
int | odbcColAttribute (ODBC_t odbc, unsigned short ColumnNumber, unsigned short FieldIdentifier, void *CharacterAttributePtr, short BufferLength, short *StringLengthPtr, long *NumericAttributePtr) |
int | odbcPrint (ODBC_t odbc, void *_fp) |
int | odbcExecDirect (ODBC_t odbc, const char *s, size_t ns) |
int | odbcPrepare (ODBC_t odbc, const char *s, size_t ns) |
int | odbcBindCol (ODBC_t odbc, unsigned short ColumnNumber, short TargetType, void *TargetValuePtr, long BufferLength, long *StrLen_or_Ind) |
int | odbcBindParameter (ODBC_t odbc, _PARAM_t param) |
int | odbcExecute (ODBC_t odbc) |
Variables | |
int | _odbc_debug |
#define odbcFree | ( | _odbc | ) | ((ODBC_t)rpmioFreePoolItem((rpmioItem)(_odbc), __FUNCTION__, __FILE__, __LINE__)) |
#define odbcLink | ( | _odbc | ) | ((ODBC_t)rpmioLinkPoolItem((rpmioItem)(_odbc), __FUNCTION__, __FILE__, __LINE__)) |
#define odbcUnlink | ( | _odbc | ) | ((ODBC_t)rpmioUnlinkPoolItem((rpmioItem)(_odbc), __FUNCTION__, __FILE__, __LINE__)) |
int odbcBindCol | ( | ODBC_t | odbc, |
unsigned short | ColumnNumber, | ||
short | TargetType, | ||
void * | TargetValuePtr, | ||
long | BufferLength, | ||
long * | StrLen_or_Ind | ||
) |
int odbcCancel | ( | ODBC_t | odbc | ) |
int odbcCloseCursor | ( | ODBC_t | odbc | ) |
Definition at line 687 of file rpmodbc.c.
References CHECK, SPEW, and SQL_NO_DATA.
int odbcColAttribute | ( | ODBC_t | odbc, |
unsigned short | ColumnNumber, | ||
unsigned short | FieldIdentifier, | ||
void * | CharacterAttributePtr, | ||
short | BufferLength, | ||
short * | StringLengthPtr, | ||
long * | NumericAttributePtr | ||
) |
Definition at line 660 of file rpmodbc.c.
Referenced by odbcDumpColAttrs(), and odbcPrint().
int odbcColumns | ( | ODBC_t | odbc, |
const char * | tblname, | ||
const char * | colname | ||
) |
int odbcCommit | ( | ODBC_t | odbc | ) |
Definition at line 752 of file rpmodbc.c.
References odbcEndTran(), and SQL_COMMIT.
int odbcConnect | ( | ODBC_t | odbc, |
const char * | uri | ||
) |
Definition at line 764 of file rpmodbc.c.
References _free(), CHECK, db, DBG, hAlloc(), odbcDumpInfo(), urlinfo_s::password, rpmExpand(), urlinfo_s::scheme, SPEW, URL_IS_MYSQL, URL_IS_POSTGRES, URL_IS_SQLSERVER, urlPath(), urlSplit(), urlinfo_s::user, and xstrdup().
int odbcDisconnect | ( | ODBC_t | odbc | ) |
int odbcEndTran | ( | ODBC_t | odbc, |
int | _rollback | ||
) |
Definition at line 738 of file rpmodbc.c.
References CHECK, SPEW, SQL_COMMIT, and SQL_ROLLBACK.
Referenced by odbcCommit(), and odbcRollback().
int odbcExecDirect | ( | ODBC_t | odbc, |
const char * | s, | ||
size_t | ns | ||
) |
int odbcExecute | ( | ODBC_t | odbc | ) |
int odbcFetch | ( | ODBC_t | odbc | ) |
Definition at line 941 of file rpmodbc.c.
References CHECK, SPEW, and SQL_NO_DATA.
Referenced by odbcPrint().
int odbcFetchScroll | ( | ODBC_t | odbc, |
short | FetchOrientation, | ||
long | FetchOffset | ||
) |
Definition at line 954 of file rpmodbc.c.
References CHECK, SPEW, and SQL_NO_DATA.
Destroy a odbc wrapper.
odbc | odbc wrapper |
const char* odbcGetCursorName | ( | ODBC_t | odbc | ) |
int odbcGetData | ( | ODBC_t | odbc, |
unsigned short | Col_or_Param_Num, | ||
short | TargetType, | ||
void * | TargetValuePtr, | ||
long | BufferLength, | ||
long * | StrLen_or_IndPtr | ||
) |
int odbcGetEnvAttr | ( | ODBC_t | odbc, |
int | _type, | ||
void * | _bp, | ||
int | _nb, | ||
int * | nsp | ||
) |
int odbcGetInfo | ( | ODBC_t | odbc, |
int | _type, | ||
void * | _bp, | ||
int | _nb, | ||
short * | nsp | ||
) |
int odbcGetStmtAttr | ( | ODBC_t | odbc, |
int | _attr, | ||
void * | _bp, | ||
int | _nb, | ||
int * | nsp | ||
) |
Reference a odbc wrapper instance.
odbc | odbc wrapper |
Referenced by odbcNew().
int odbcListDataSources | ( | ODBC_t | odbc, |
void * | _fp | ||
) |
Definition at line 831 of file rpmodbc.c.
References CHECK, SPEW, SQL_FETCH_FIRST, SQL_FETCH_NEXT, and SQL_SUCCEEDED.
int odbcListDrivers | ( | ODBC_t | odbc, |
void * | _fp | ||
) |
Definition at line 864 of file rpmodbc.c.
References CHECK, SPEW, SQL_FETCH_FIRST, SQL_FETCH_NEXT, and SQL_SUCCEEDED.
int odbcNCols | ( | ODBC_t | odbc | ) |
ODBC_t odbcNew | ( | const char * | fn, |
int | flags | ||
) |
Create and load a odbc wrapper.
fn | odbc file |
flags | odbc flags |
Definition at line 1246 of file rpmodbc.c.
References _odbc_debug, _odbc_uri, flags, hAlloc(), odbcDumpEnvAttr(), odbcGetPool(), odbcLink(), odbcSetEnvAttr(), rpmExpand(), urlinfo_s::scheme, URL_IS_MYSQL, URL_IS_POSTGRES, URL_IS_SQLSERVER, urlLink(), urlPath(), urlSplit(), and xstrdup().
int odbcPrepare | ( | ODBC_t | odbc, |
const char * | s, | ||
size_t | ns | ||
) |
int odbcPrint | ( | ODBC_t | odbc, |
void * | _fp | ||
) |
Definition at line 990 of file rpmodbc.c.
References _odbc_debug, argvAdd(), argvFree(), b, DBG, hFree(), i, ns, odbcColAttribute(), odbcDumpColAttrs(), odbcDumpStmt(), odbcFetch(), odbcGetData(), odbcNCols(), snprintf(), SPEW, SQL_C_CHAR, SQL_COLUMN_LABEL, and SQL_SUCCEEDED.
int odbcRollback | ( | ODBC_t | odbc | ) |
Definition at line 757 of file rpmodbc.c.
References odbcEndTran(), and SQL_ROLLBACK.
int odbcSetCursorName | ( | ODBC_t | odbc, |
const char * | s, | ||
size_t | ns | ||
) |
Definition at line 721 of file rpmodbc.c.
References CHECK, SPEW, and SQL_NO_DATA.
int odbcSetEnvAttr | ( | ODBC_t | odbc, |
int | _type, | ||
void * | _bp, | ||
int | ns | ||
) |
int odbcSetStmtAttr | ( | ODBC_t | odbc, |
int | _attr, | ||
void * | _bp, | ||
int | ns | ||
) |
int odbcStatistics | ( | ODBC_t | odbc, |
const char * | tblname | ||
) |
int odbcTables | ( | ODBC_t | odbc, |
const char * | tblname | ||
) |
Unreference a odbc wrapper instance.
odbc | odbc wrapper |
int _odbc_debug |
Definition at line 24 of file rpmodbc.c.
Referenced by odbcGetPool(), odbcNew(), and odbcPrint().