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

📄 sqlrclient.h

📁 适合于Unix/Linux下的一个持久数据库连接池
💻 H
📖 第 1 页 / 共 2 页
字号:
		void	defineOutputBindInteger(const char *variable);				// Define an integer output bind variable.		void	defineOutputBindDouble(const char *variable);				// Define a double precision floating				// point output bind variable.		void	defineOutputBindBlob(const char *variable);				// Define a BLOB output bind variable.		void	defineOutputBindClob(const char *variable);				// Define a CLOB output bind variable.		void	defineOutputBindCursor(const char *variable);				// Define a cursor output bind variable.		void	substitutions(const char **variables,						const char **values);		void	substitutions(const char **variables,						const int64_t *values);		void	substitutions(const char **variables,					const double *values,					const uint32_t *precisions, 					const uint32_t *scales);				// Define an array of substitution variables.		void	inputBinds(const char **variables, const char **values);		void	inputBinds(const char **variables,					const int64_t *values);		void	inputBinds(const char **variables,					const double *values, 					const uint32_t *precisions, 					const uint32_t *scales);				// Define an array of input bind variables.		void	validateBinds();				// 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 method.		bool	validBind(const char *variable);				// Returns true if "variable" was a valid				// bind variable of the query.		bool	executeQuery();				// Execute the query that was previously 				// prepared and bound.		bool	fetchFromBindCursor();				// Fetch from a cursor that was returned as				// an output bind variable.		const char	*getOutputBindString(const char *variable);		const char	*getOutputBindBlob(const char *variable);		const char	*getOutputBindClob(const char *variable);		int64_t		getOutputBindInteger(const char *variable);		double		getOutputBindDouble(const char *variable);				// Get the value stored in a previously				// defined output bind variable.		uint32_t	getOutputBindLength(const char *variable);				// Get the length of the value stored in a				// previously defined output bind variable.		sqlrcursor	*getOutputBindCursor(const char *variable);				// Get the cursor associated with a previously				// defined output bind variable.				bool	openCachedResultSet(const char *filename);				// Opens a cached result set.				// Returns true on success and false on failure.		uint32_t	colCount();				// Returns the number of columns in the current				// result set.		uint64_t	rowCount();				// Returns the number of rows in the current 				// result set (if the result set is being				// stepped through, this returns the number				// of rows processed so far).		uint64_t	totalRows();				// 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.  0 is returned				// by databases which don't support this option.		uint64_t	affectedRows();				// 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.  0 is 				// returned by databases which don't support 				// this option.		uint64_t	firstRowIndex();				// Returns the index of the first buffered row.				// This is useful when buffering only part of				// the result set at a time.		bool	endOfResultSet();				// Returns false if part of the result set is				// still pending on the server and true if not.				// This method can only return false if 				// setResultSetBufferSize() has been called				// with a parameter other than 0.						const char	*errorMessage();				// If a query failed and generated an error, 				// the error message is available here.  If 				// the query succeeded then this method 				// returns a NULL.		void	getNullsAsEmptyStrings();				// Tells the connection to return NULL fields				// and output bind variables as empty strings. 				// This is the default.		void	getNullsAsNulls();				// Tells the connection to return NULL fields				// and output bind variables as NULL's rather				// than as empty strings.		const char	*getField(uint64_t row, uint32_t col);		const char	*getField(uint64_t row, const char *col);				// Returns a pointer to the value of the 				// specified row and column.		int64_t	getFieldAsInteger(uint64_t row, uint32_t col);		int64_t	getFieldAsInteger(uint64_t row, const char *col);				// Returns the specified field as a long				// integer.		double	getFieldAsDouble(uint64_t row, uint32_t col);		double	getFieldAsDouble(uint64_t row, const char *col);				// Returns the specified field as a double				// precision floating point number.		uint32_t	getFieldLength(uint64_t row, uint32_t col);		uint32_t	getFieldLength(uint64_t row, const char *col);				// Returns the length of the 				// specified row and column.		const char * const *getRow(uint64_t row);				// Returns a null terminated array of the 				// values of the fields in the specified row.		uint32_t	*getRowLengths(uint64_t row);				// Returns a null terminated array of the 				// lengths of the fields in the specified row.		const char * const *getColumnNames();				// Returns a null terminated array of the 				// column names of the current result set.		const char	*getColumnName(uint32_t col);				// Returns the name of the specified column.		const char	*getColumnType(uint32_t col);		const char	*getColumnType(const char *col);				// Returns the type of the specified column.		uint32_t	getColumnLength(uint32_t col);		uint32_t	getColumnLength(const char *col);				// Returns the number of bytes required on				// the server to store the data.		uint32_t	getColumnPrecision(uint32_t col);		uint32_t	getColumnPrecision(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	getColumnScale(uint32_t col);		uint32_t	getColumnScale(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.		bool		getColumnIsNullable(uint32_t col);		bool		getColumnIsNullable(const char *col);				// Returns 1 if the specified column can				// contain nulls and 0 otherwise.		bool		getColumnIsPrimaryKey(uint32_t col);		bool		getColumnIsPrimaryKey(const char *col);				// Returns 1 if the specified column is a				// primary key and 0 otherwise.		bool		getColumnIsUnique(uint32_t col);		bool		getColumnIsUnique(const char *col);				// Returns 1 if the specified column is				// unique and 0 otherwise.		bool		getColumnIsPartOfKey(uint32_t col);		bool		getColumnIsPartOfKey(const char *col);				// Returns 1 if the specified column is				// part of a composite key and 0 otherwise.		bool		getColumnIsUnsigned(uint32_t col);		bool		getColumnIsUnsigned(const char *col);				// Returns 1 if the specified column is				// an unsigned number and 0 otherwise.		bool		getColumnIsZeroFilled(uint32_t col);		bool		getColumnIsZeroFilled(const char *col);				// Returns 1 if the specified column was				// created with the zero-fill flag and 0				// otherwise.		bool		getColumnIsBinary(uint32_t col);		bool		getColumnIsBinary(const char *col);				// Returns 1 if the specified column				// contains binary data and 0				// otherwise.		bool		getColumnIsAutoIncrement(uint32_t col);		bool		getColumnIsAutoIncrement(const char *col);				// Returns 1 if the specified column				// auto-increments and 0 otherwise.		uint32_t	getLongest(uint32_t col);		uint32_t	getLongest(const char *col);				// Returns the length of the longest field				// in the specified column.		void	suspendResultSet();				// 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	getResultSetId();				// Returns the internal ID of this result set.				// This parameter may be passed to another 				// cursor for use in the resumeResultSet() 				// method.				// Note: The value this method returns is only				// valid after a call to suspendResultSet().		bool	resumeResultSet(uint16_t id);				// Resumes a result set previously left open 				// using suspendSession().				// Returns true on success and false on failure.		bool	resumeCachedResultSet(uint16_t id,						const char *filename);				// Resumes a result set previously left open				// using suspendSession() and continues caching				// the result set to "filename".				// Returns true on success and false on failure.	#include <sqlrelay/private/sqlrcursor.h>};#endif

⌨️ 快捷键说明

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