rpm  5.4.15
Macros | Typedefs | Functions | Variables
rpmodbc.h File Reference
This graph shows which files directly or indirectly include this file:

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
 

Macro Definition Documentation

#define odbcFree (   _odbc)    ((ODBC_t)rpmioFreePoolItem((rpmioItem)(_odbc), __FUNCTION__, __FILE__, __LINE__))

Definition at line 114 of file rpmodbc.h.

#define odbcLink (   _odbc)    ((ODBC_t)rpmioLinkPoolItem((rpmioItem)(_odbc), __FUNCTION__, __FILE__, __LINE__))

Definition at line 102 of file rpmodbc.h.

#define odbcUnlink (   _odbc)    ((ODBC_t)rpmioUnlinkPoolItem((rpmioItem)(_odbc), __FUNCTION__, __FILE__, __LINE__))

Definition at line 91 of file rpmodbc.h.

Typedef Documentation

typedef struct _PARAM_s* _PARAM_t

Definition at line 19 of file rpmodbc.h.

typedef struct _STMT_s* _STMT_t

Definition at line 18 of file rpmodbc.h.

typedef struct HNDL_s* HNDL_t

Definition at line 16 of file rpmodbc.h.

typedef struct ODBC_s* ODBC_t

Definition at line 15 of file rpmodbc.h.

Function Documentation

int odbcBindCol ( ODBC_t  odbc,
unsigned short  ColumnNumber,
short  TargetType,
void *  TargetValuePtr,
long  BufferLength,
long *  StrLen_or_Ind 
)

Definition at line 1159 of file rpmodbc.c.

References CHECK, and SPEW.

int odbcBindParameter ( ODBC_t  odbc,
_PARAM_t  param 
)

Definition at line 1176 of file rpmodbc.c.

References CHECK, and SPEW.

int odbcCancel ( ODBC_t  odbc)

Definition at line 927 of file rpmodbc.c.

References CHECK, hFree(), SPEW, and SQL_NO_DATA.

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.

References CHECK, and SPEW.

Referenced by odbcDumpColAttrs(), and odbcPrint().

int odbcColumns ( ODBC_t  odbc,
const char *  tblname,
const char *  colname 
)

Definition at line 1074 of file rpmodbc.c.

References CHECK, hAlloc(), and SPEW.

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 
)
int odbcDisconnect ( ODBC_t  odbc)

Definition at line 814 of file rpmodbc.c.

References CHECK, hFree(), and SPEW.

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 
)

Definition at line 1114 of file rpmodbc.c.

References CHECK, DBG, hAlloc(), and SPEW.

int odbcExecute ( ODBC_t  odbc)

Definition at line 1196 of file rpmodbc.c.

References CHECK, and SPEW.

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.

ODBC_t odbcFree ( ODBC_t  odbc)

Destroy a odbc wrapper.

Parameters
odbcodbc wrapper
Returns
NULL on last dereference
const char* odbcGetCursorName ( ODBC_t  odbc)

Definition at line 700 of file rpmodbc.c.

References b, CHECK, ns, SPEW, SQL_NO_DATA, and xstrdup().

int odbcGetData ( ODBC_t  odbc,
unsigned short  Col_or_Param_Num,
short  TargetType,
void *  TargetValuePtr,
long  BufferLength,
long *  StrLen_or_IndPtr 
)

Definition at line 967 of file rpmodbc.c.

References CHECK, and SPEW.

Referenced by odbcPrint().

int odbcGetEnvAttr ( ODBC_t  odbc,
int  _type,
void *  _bp,
int  _nb,
int *  nsp 
)

Definition at line 569 of file rpmodbc.c.

References CHECK.

Referenced by odbcDumpEnvAttr().

int odbcGetInfo ( ODBC_t  odbc,
int  _type,
void *  _bp,
int  _nb,
short *  nsp 
)

Definition at line 513 of file rpmodbc.c.

References CHECK.

Referenced by odbcDumpInfo().

int odbcGetStmtAttr ( ODBC_t  odbc,
int  _attr,
void *  _bp,
int  _nb,
int *  nsp 
)

Definition at line 258 of file rpmodbc.c.

References CHECK.

Referenced by odbcDumpStmt().

ODBC_t odbcLink ( ODBC_t  odbc)

Reference a odbc wrapper instance.

Parameters
odbcodbc wrapper
Returns
new odbc wrapper reference

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)

Definition at line 912 of file rpmodbc.c.

References CHECK, columns, and SPEW.

Referenced by odbcPrint().

ODBC_t odbcNew ( const char *  fn,
int  flags 
)

Create and load a odbc wrapper.

Parameters
fnodbc file
flagsodbc flags
Returns
new odbc wrapper

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 odbcNRows ( ODBC_t  odbc)

Definition at line 897 of file rpmodbc.c.

References CHECK, and SPEW.

int odbcPrepare ( ODBC_t  odbc,
const char *  s,
size_t  ns 
)

Definition at line 1135 of file rpmodbc.c.

References CHECK, DBG, hAlloc(), hFree(), and SPEW.

int odbcPrint ( ODBC_t  odbc,
void *  _fp 
)
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 
)

Definition at line 579 of file rpmodbc.c.

References CHECK.

Referenced by odbcNew().

int odbcSetStmtAttr ( ODBC_t  odbc,
int  _attr,
void *  _bp,
int  ns 
)

Definition at line 269 of file rpmodbc.c.

References CHECK.

int odbcStatistics ( ODBC_t  odbc,
const char *  tblname 
)

Definition at line 1094 of file rpmodbc.c.

References CHECK, hAlloc(), and SPEW.

int odbcTables ( ODBC_t  odbc,
const char *  tblname 
)

Definition at line 1054 of file rpmodbc.c.

References CHECK, hAlloc(), and SPEW.

ODBC_t odbcUnlink ( ODBC_t  odbc)

Unreference a odbc wrapper instance.

Parameters
odbcodbc wrapper
Returns
NULL on last dereference

Variable Documentation

int _odbc_debug

Definition at line 24 of file rpmodbc.c.

Referenced by odbcGetPool(), odbcNew(), and odbcPrint().