⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sqlrclientwrapper.h

📁 适合于Unix/Linux下的一个持久数据库连接池
💻 H
📖 第 1 页 / 共 2 页
字号:
					const int64_t *values);void	sqlrcur_inputBindDoubles(sqlrcur sqlrcurref, 					const char **variables,					const double *values,					const uint32_t *precisions, 					const uint32_t *scales);			/* Define an array of input bind variables. */void	sqlrcur_validateBinds(sqlrcur sqlrcurref);			/* If you are binding to any variables that 			   might not actually be in your query, call 			   this to ensure that the database won't try 			   to bind them unless they really are in the 			   query.  There is a performance penalty for			   calling this function */int	sqlrcur_validBind(sqlrcur sqlrcurref, const char *variable);			/* Returns true if "variable" was a valid			   bind variable of the query. */int	sqlrcur_executeQuery(sqlrcur sqlrcurref);			/* Execute the query that was previously prepared 			   and bound. */int	sqlrcur_fetchFromBindCursor(sqlrcur sqlrcurref);			/* Fetch from a cursor that was returned as			   an output bind variable. */const char	*sqlrcur_getOutputBindString(sqlrcur sqlrcurref,						const char *variable);			/* Get the value stored in a previously			   defined output bind variable. */const char	*sqlrcur_getOutputBindBlob(sqlrcur sqlrcurref,						const char *variable);			/* Get the value stored in a previously			   defined output bind variable. */const char	*sqlrcur_getOutputBindClob(sqlrcur sqlrcurref,						const char *variable);			/* Get the value stored in a previously			   defined output bind variable. */int64_t	sqlrcur_getOutputBindInteger(sqlrcur sqlrcurref,						const char *variable);			/* Get the value stored in a previously			   defined output bind variable as a 			   long integer. */double	sqlrcur_getOutputBindDouble(sqlrcur sqlrcurref,						const char *variable);			/* Get the value stored in a previously			   defined output bind variable as a 			   double precision floating point			   number. */uint32_t	sqlrcur_getOutputBindLength(sqlrcur sqlrcurref,						const char *variable);			/* Get the length of the value stored in a previously			   defined output bind variable. */sqlrcur	sqlrcur_getOutputBindCursor(sqlrcur sqlrcurref, const char *variable);			/* Get the cursor associated with a previously			   defined output bind variable. */int	sqlrcur_openCachedResultSet(sqlrcur sqlrcurref, const char *filename); 			/* Opens a cached result set.			   Returns 1 on success and 0 on failure. */uint32_t	sqlrcur_colCount(sqlrcur sqlrcurref); 			/* Returns the number of columns in the current			   result set. */uint64_t	sqlrcur_rowCount(sqlrcur sqlrcurref); 			/* Returns the number of rows in the current 			   result set. */uint64_t	sqlrcur_totalRows(sqlrcur sqlrcurref);			/* Returns the total number of rows that will 			   be returned in the result set.  Not all 			   databases support this call.  Don't use it 			   for applications which are designed to be 			   portable across databases.  -1 is returned			   by databases which don't support this option. */uint64_t	sqlrcur_affectedRows(sqlrcur sqlrcurref);			/* Returns the number of rows that were 			   updated, inserted or deleted by the query.			   Not all databases support this call.  Don't 			   use it for applications which are designed 			   to be portable across databases.  -1 is 			   returned by databases which don't support 			   this option. */uint64_t	sqlrcur_firstRowIndex(sqlrcur sqlrcurref);			/* Returns the index of the first buffered row.			   This is useful when buffering only part of			   the result set at a time. */int	sqlrcur_endOfResultSet(sqlrcur sqlrcurref);			/* Returns 0 if part of the result set is still			   pending on the server and 1 if not.  This			   function can only return 0 if 			   setResultSetBufferSize() has been called			   with a parameter other than 0. */  const char	*sqlrcur_errorMessage(sqlrcur sqlrcurref); 			/* If a query failed and generated an error, the			   error message is available here.  If the 			   query succeeded then this function returns a 			   NULL. */void	sqlrcur_getNullsAsEmptyStrings(sqlrcur sqlrcurref);			/* Tells the connection to return NULL fields and			   output bind variables as empty strings.			   This is the default. */void	sqlrcur_getNullsAsNulls(sqlrcur sqlrcurref);			/* Tells the connection to return NULL fields and			   output bind variables as NULL's. */const char	*sqlrcur_getFieldByIndex(sqlrcur sqlrcurref,						uint64_t row, uint32_t col); const char	*sqlrcur_getFieldByName(sqlrcur sqlrcurref, uint64_t row,							const char *col); 			/* Returns a pointer to the value of the 			   specified row and column. */int64_t	sqlrcur_getFieldAsIntegerByIndex(sqlrcur sqlrcurref,						uint64_t row, uint32_t col); int64_t	sqlrcur_getFieldAsIntegerByName(sqlrcur sqlrcurref, uint64_t row,							const char *col); 			/* Returns the specified field as a long integer. */double	sqlrcur_getFieldAsDoubleByIndex(sqlrcur sqlrcurref,						uint64_t row, uint32_t col); double	sqlrcur_getFieldAsDoubleByName(sqlrcur sqlrcurref, uint64_t row,							const char *col); 			/* Returns the specified field as a double precision			   floating point number. */const char	*sqlrcur_getFieldByIndex(sqlrcur sqlrcurref,						uint64_t row, uint32_t col); const char	*sqlrcur_getFieldByName(sqlrcur sqlrcurref, uint64_t row,							const char *col); 			/* Returns a pointer to the value of the 			   specified row and column. */uint32_t	sqlrcur_getFieldLengthByIndex(sqlrcur sqlrcurref,						uint64_t row, uint32_t col); uint32_t	sqlrcur_getFieldLengthByName(sqlrcur sqlrcurref, uint64_t row,							const char *col); 			/* Returns the length of the 			   specified row and column. */const char * const *sqlrcur_getRow(sqlrcur sqlrcurref, uint64_t row); 			/* Returns a null terminated array of the 			   values of the fields in the specified row. */uint32_t	*sqlrcur_getRowLengths(sqlrcur sqlrcurref, uint64_t row); 			/* Returns a null terminated array of the 			   lengths of the fields in the specified row. */const char * const *sqlrcur_getColumnNames(sqlrcur sqlrcurref); 			/* Returns a null terminated array of the 			   column names of the current result set. */const char	*sqlrcur_getColumnName(sqlrcur sqlrcurref, uint32_t col); 			/* Returns the name of the specified column. */const char	*sqlrcur_getColumnTypeByIndex(sqlrcur sqlrcurref, uint32_t col); const char	*sqlrcur_getColumnTypeByName(sqlrcur sqlrcurref,							const char *col); 			/* Returns the type of the specified column. */uint32_t	sqlrcur_getColumnLengthByIndex(sqlrcur sqlrcurref,							uint32_t col); uint32_t	sqlrcur_getColumnLengthByName(sqlrcur sqlrcurref,							const char *col); 			/* Returns the length of the specified column. */uint32_t	sqlrcur_getColumnPrecisionByIndex(sqlrcur sqlrcurref,							uint32_t col);uint32_t	sqlrcur_getColumnPrecisionByName(sqlrcur sqlrcurref,							const char *col);			/* Returns the precision of the specified			   column.			   Precision is the total number of digits in			   a number.  eg: 123.45 has a precision of 5.			   For non-numeric types, it's the number of			   characters in the string. */uint32_t	sqlrcur_getColumnScaleByIndex(sqlrcur sqlrcurref,							uint32_t col);uint32_t	sqlrcur_getColumnScaleByName(sqlrcur sqlrcurref,							const char *col);			/* Returns the scale of the specified column.			   Scale is the total number of digits to the			   right of the decimal point in a number.			   eg: 123.45 has a scale of 2. */int		sqlrcur_getColumnIsNullableByIndex(sqlrcur sqlrcurref,							uint32_t col);int		sqlrcur_getColumnIsNullableByName(sqlrcur sqlrcurref,							const char *col);			/* Returns 1 if the specified column can			   contain nulls and 0 otherwise. */int		sqlrcur_getColumnIsPrimaryKeyByIndex(sqlrcur sqlrcurref,							uint32_t col);int		sqlrcur_getColumnIsPrimaryKeyByName(sqlrcur sqlrcurref,							const char *col);			/* Returns 1 if the specified column is a			   primary key and 0 otherwise. */int		sqlrcur_getColumnIsUniqueByIndex(sqlrcur sqlrcurref,							uint32_t col);int		sqlrcur_getColumnIsUniqueByName(sqlrcur sqlrcurref,							const char *col);			/* Returns 1 if the specified column is			   unique and 0 otherwise. */int		sqlrcur_getColumnIsPartOfKeyByIndex(sqlrcur sqlrcurref,							uint32_t col);int		sqlrcur_getColumnIsPartOfKeyByName(sqlrcur sqlrcurref,							const char *col);			/* Returns 1 if the specified column is			   part of a composite key and 0 otherwise. */int		sqlrcur_getColumnIsUnsignedByIndex(sqlrcur sqlrcurref,							uint32_t col);int		sqlrcur_getColumnIsUnsignedByName(sqlrcur sqlrcurref,							const char *col);			/* Returns 1 if the specified column is			   an unsigned number and 0 otherwise. */int		sqlrcur_getColumnIsZeroFilledByIndex(sqlrcur sqlrcurref,							uint32_t col);int		sqlrcur_getColumnIsZeroFilledByName(sqlrcur sqlrcurref,							const char *col);			/* Returns 1 if the specified column was			   created with the zero-fill flag and 0			   otherwise. */int		sqlrcur_getColumnIsBinaryByIndex(sqlrcur sqlrcurref,							uint32_t col);int		sqlrcur_getColumnIsBinaryByName(sqlrcur sqlrcurref,							const char *col);			/* Returns 1 if the specified column			   contains binary data and 0			   otherwise. */int		sqlrcur_getColumnIsAutoIncrementByIndex(sqlrcur sqlrcurref,							uint32_t col);int		sqlrcur_getColumnIsAutoIncrementByName(sqlrcur sqlrcurref,							const char *col);			/* Returns 1 if the specified column			   auto-increments and 0 otherwise. */uint32_t	sqlrcur_getLongestByIndex(sqlrcur sqlrcurref, uint32_t col);uint32_t	sqlrcur_getLongestByName(sqlrcur sqlrcurref, const char *col);			/* Returns the length of the longest field in the			   specified column. */void	sqlrcur_suspendResultSet(sqlrcur sqlrcurref);			/* Tells the server to leave this result			   set open when the connection calls 			   suspendSession() so that another connection can 			   connect to it using resumeResultSet() after 			   it calls resumeSession(). */uint16_t	sqlrcur_getResultSetId(sqlrcur sqlrcurref);			/* Returns the internal ID of this result set.			   This parameter may be passed to another 			   statement for use in the resumeResultSet() 			   function.			   Note: The value this function returns is only			   valid after a call to suspendResultSet().*/int	sqlrcur_resumeResultSet(sqlrcur sqlrcurref, uint16_t id);			/* Resumes a result set previously left open 			   using suspendSession().			   Returns 1 on success and 0 on failure. */int	sqlrcur_resumeCachedResultSet(sqlrcur sqlrcurref, 					uint16_t id, const char *filename);			/* Resumes a result set previously left open			   using suspendSession() and continues caching			   the result set to "filename".			   Returns 1 on success and 0 on failure. */#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -