Core functions needed by most db-lib programs. More...
Defines | |
#define | DBCMDROW(x) dbcmdrow((x)) |
Sybase macro mapping to the Microsoft (lower-case) function. | |
#define | DBCOUNT(x) dbcount((x)) |
Sybase macro mapping to the Microsoft (lower-case) function. | |
#define | DBCURCMD(x) dbcurcmd((x)) |
Sybase macro mapping to the Microsoft (lower-case) function. | |
#define | DBCURROW(x) dbcurrow((x)) |
Sybase macro mapping to the Microsoft (lower-case) function. | |
#define | DBDEAD(x) dbdead((x)) |
Sybase macro mapping to the Microsoft (lower-case) function. | |
#define | DBFIRSTROW(x) dbfirstrow((x)) |
Sybase macro mapping to the Microsoft (lower-case) function. | |
#define | DBIORDESC(x) dbiordesc((x)) |
Sybase macro, maps to the internal (lower-case) function. | |
#define | DBIOWDESC(x) dbiowdesc((x)) |
Sybase macro, maps to the internal (lower-case) function. | |
#define | DBISAVAIL(x) dbisavail((x)) |
Sybase macro mapping to the Microsoft (lower-case) function. | |
#define | DBLASTROW(x) dblastrow((x)) |
Sybase macro mapping to the Microsoft (lower-case) function. | |
#define | DBMORECMDS(x) dbmorecmds((x)) |
Sybase macro mapping to the Microsoft (lower-case) function. | |
#define | DBROWS(x) dbrows((x)) |
Sybase macro mapping to the Microsoft (lower-case) function. | |
#define | DBROWTYPE(x) dbrowtype((x)) |
Sybase macro mapping to the Microsoft (lower-case) function. | |
#define | DBSETLCHARSET(x, y) dbsetlname((x), (y), DBSETCHARSET) |
Set the client character set in the login packet. | |
#define | DBSETLENCRYPT(x, y) dbsetlbool((x), (y), DBSETENCRYPT) |
Enable (or not) network password encryption for Sybase servers version 10.0 or above. | |
#define | dbsetlnatlang(x, y) dbsetlname((x), (y), DBSETNATLANG) |
Set the language the server should use for messages. | |
#define | DBSETLNATLANG(x, y) dbsetlname((x), (y), DBSETNATLANG) |
Set the language the server should use for messages. | |
#define | dbsetlpacket(x, y) dbsetllong((x), (y), DBSETPACKET) |
Set the packet size in the login packet for new connections. | |
#define | DBSETLPACKET(x, y) dbsetllong((x), (y), DBSETPACKET) |
Set the packet size in the login packet for new connections. | |
#define | DBTDS(a) dbtds(a) |
Sybase macro, maps to the internal (lower-case) function. | |
#define | SYBDBLIB 1 |
Functions | |
BYTE * | dbadata (DBPROCESS *dbproc, int computeid, int column) |
Get address of compute column data. | |
DBINT | dbadlen (DBPROCESS *dbproc, int computeid, int column) |
Get size of data in a compute column. | |
RETCODE | dbaltbind (DBPROCESS *dbproc, int computeid, int column, int vartype, DBINT varlen, BYTE *varaddr) |
Bind a compute column to a program variable. | |
int | dbaltcolid (DBPROCESS *dbproc, int computeid, int column) |
Get column ID of a compute column. | |
DBINT | dbaltlen (DBPROCESS *dbproc, int computeid, int column) |
Get size of data in compute column. | |
int | dbaltop (DBPROCESS *dbproc, int computeid, int column) |
Get aggregation operator for a compute column. | |
int | dbalttype (DBPROCESS *dbproc, int computeid, int column) |
Get datatype for a compute column. | |
DBINT | dbaltutype (DBPROCESS *dbproc, int computeid, int column) |
Get user-defined datatype of a compute column. | |
RETCODE | dbanullbind (DBPROCESS *dbproc, int computeid, int column, DBINT *indicator) |
Tie a null-indicator to a compute result column. | |
RETCODE | dbbind (DBPROCESS *dbproc, int column, int vartype, DBINT varlen, BYTE *varaddr) |
Tie a host variable to a resultset column. | |
BYTE * | dbbylist (DBPROCESS *dbproc, int computeid, int *size) |
Get bylist for a compute row. | |
RETCODE | dbcancel (DBPROCESS *dbproc) |
Cancel the current command batch. | |
RETCODE | dbcanquery (DBPROCESS *dbproc) |
Cancel the query currently being retrieved, discarding all pending rows. | |
char * | dbchange (DBPROCESS *dbproc) |
See if a command caused the current database to change. | |
void | dbclose (DBPROCESS *dbproc) |
Close a connection to the server and free associated resources. | |
void | dbclrbuf (DBPROCESS *dbproc, DBINT n) |
Clear n rows from the row buffer. | |
RETCODE | dbclropt (DBPROCESS *dbproc, int option, char *param) |
Reset an option. | |
RETCODE | dbcmd (DBPROCESS *dbproc, const char *cmdstring) |
Append SQL to the command buffer. | |
DBINT | dbcollen (DBPROCESS *dbproc, int column) |
Get size of a regular result column. | |
char * | dbcolname (DBPROCESS *dbproc, int column) |
Return name of a regular result column. | |
char * | dbcolsource (DBPROCESS *dbproc, int column) |
Get base database column name for a result set column. | |
int | dbcoltype (DBPROCESS *dbproc, int column) |
Get the datatype of a regular result set column. | |
DBTYPEINFO * | dbcoltypeinfo (DBPROCESS *dbproc, int column) |
Get precision and scale information for a regular result column. | |
int | dbcolutype (DBPROCESS *dbproc, int column) |
Get user-defined datatype of a regular result column. | |
DBINT | dbconvert (DBPROCESS *dbproc, int srctype, const BYTE *src, DBINT srclen, int desttype, BYTE *dest, DBINT destlen) |
Convert one datatype to another. | |
DBINT | dbconvert_ps (DBPROCESS *dbproc, int srctype, BYTE *src, DBINT srclen, int desttype, BYTE *dest, DBINT destlen, DBTYPEINFO *typeinfo) |
cf. | |
BYTE * | dbdata (DBPROCESS *dbproc, int column) |
Get address of data in a regular result column. | |
RETCODE | dbdatecrack (DBPROCESS *dbproc, DBDATEREC *di, DBDATETIME *datetime) |
Break a DBDATETIME value into useful pieces. | |
DBINT | dbdatlen (DBPROCESS *dbproc, int column) |
Get size of current row's data in a regular result column. | |
EHANDLEFUNC | dberrhandle (EHANDLEFUNC handler) |
Set an error handler, for messages from db-lib. | |
void | dbexit () |
Close server connections and free all related structures. | |
RETCODE | dbfcmd (DBPROCESS *dbproc, const char *fmt,...) |
printf-like way to form SQL to send to the server. | |
void | dbfreebuf (DBPROCESS *dbproc) |
Erase the command buffer, in case DBNOAUTOFREE was set with dbsetopt(). | |
char * | dbgetchar (DBPROCESS *dbproc, int pos) |
Get address of a position in the command buffer. | |
int | dbgetmaxprocs (void) |
get maximum simultaneous connections db-lib will open to the server. | |
int | dbgetpacket (DBPROCESS *dbproc) |
Get TDS packet size for the connection. | |
RETCODE | dbgetrow (DBPROCESS *dbproc, DBINT row) |
Read a row from the row buffer. | |
int | dbgettime (void) |
Get maximum seconds db-lib waits for a server response to query. | |
BYTE * | dbgetuserdata (DBPROCESS *dbproc) |
Get address of user-allocated data from a DBPROCESS . | |
RETCODE | dbinit (void) |
Initialize db-lib. | |
DBBOOL | dbisopt (DBPROCESS *dbproc, int option, char *param) |
Get value of an option. | |
LOGINREC * | dblogin (void) |
Allocate a LOGINREC structure. | |
void | dbloginfree (LOGINREC *login) |
free the LOGINREC | |
RETCODE | dbmorecmds (DBPROCESS *dbproc) |
See if more commands are to be processed. | |
RETCODE | dbmoretext (DBPROCESS *dbproc, DBINT size, BYTE *text) |
Send chunk of a text/image value to the server. | |
MHANDLEFUNC | dbmsghandle (MHANDLEFUNC handler) |
Set a message handler, for messages from the server. | |
char * | dbname (DBPROCESS *dbproc) |
Get name of current database. | |
RETCODE | dbnextrow (DBPROCESS *dbproc) |
Read result row into the row buffer and into any bound host variables. | |
RETCODE | dbnullbind (DBPROCESS *dbproc, int column, DBINT *indicator) |
Tie a null-indicator to a regular result column. | |
int | dbnumalts (DBPROCESS *dbproc, int computeid) |
Get count of columns in a compute row. | |
int | dbnumcols (DBPROCESS *dbproc) |
Return number of regular columns in a result set. | |
int | dbnumcompute (DBPROCESS *dbproc) |
Get count of COMPUTE clauses for a result set. | |
RETCODE | dbpoll (DBPROCESS *dbproc, long milliseconds, DBPROCESS **ready_dbproc, int *return_reason) |
See if a server response has arrived. | |
void | dbprhead (DBPROCESS *dbproc) |
Print result set headings to stdout. | |
RETCODE | dbprrow (DBPROCESS *dbproc) |
Print a result set to stdout. | |
const char * | dbprtype (int token) |
Print a token value's name to a buffer. | |
STATUS | dbreadtext (DBPROCESS *dbproc, void *buf, DBINT bufsize) |
Fetch part of a text or image value from the server. | |
void | dbrecftos (char *filename) |
Record to a file all SQL commands sent to the server. | |
RETCODE | dbregexec (DBPROCESS *dbproc, DBUSMALLINT options) |
Execute a registered procedure. | |
RETCODE | dbreginit (DBPROCESS *dbproc, DBCHAR *procedure_name, DBSMALLINT namelen) |
Ready execution of a registered procedure. | |
RETCODE | dbreglist (DBPROCESS *dbproc) |
Get names of Open Server registered procedures. | |
RETCODE | dbregparam (DBPROCESS *dbproc, char *param_name, int type, DBINT datalen, BYTE *data) |
Describe parameter of registered procedure . | |
RETCODE | dbresults (DBPROCESS *dbproc) |
Set up query results. | |
void | dbrpwclr (LOGINREC *login) |
Clear remote passwords from the LOGINREC structure. | |
RETCODE | dbrpwset (LOGINREC *login, char *srvname, char *password, int pwlen) |
Add a remote password to the LOGINREC structure. | |
RETCODE | dbsafestr (DBPROCESS *dbproc, const char *src, DBINT srclen, char *dest, DBINT destlen, int quotetype) |
safely quotes character values in SQL text. | |
char * | dbservcharset (DBPROCESS *dbproc) |
Get syscharset name of the server character set. | |
RETCODE | dbsetdefcharset (char *charset) |
Set the default character set. | |
RETCODE | dbsetdeflang (char *language) |
Set the default character set for an application. | |
void | dbsetifile (char *filename) |
set name and location of the interfaces file FreeTDS should use to look up a servername. | |
void | dbsetinterrupt (DBPROCESS *dbproc, DB_DBCHKINTR_FUNC chkintr, DB_DBHNDLINTR_FUNC hndlintr) |
Set interrupt handler for db-lib to use while blocked against a read from the server. | |
RETCODE | dbsetlogintime (int seconds) |
Set maximum seconds db-lib waits for a server response to a login attempt. | |
RETCODE | dbsetlversion (LOGINREC *login, BYTE version) |
Set TDS version for future connections. | |
RETCODE | dbsetmaxprocs (int maxprocs) |
Set maximum simultaneous connections db-lib will open to the server. | |
RETCODE | dbsetnull (DBPROCESS *dbproc, int bindtype, int bindlen, BYTE *bindval) |
Define substitution values to be used when binding null values. | |
RETCODE | dbsetopt (DBPROCESS *dbproc, int option, const char *char_param, int int_param) |
Set db-lib or server option. | |
RETCODE | dbsetrow (DBPROCESS *dbproc, DBINT row) |
Make a buffered row "current" without fetching it into bound variables. | |
RETCODE | dbsettime (int seconds) |
Set maximum seconds db-lib waits for a server response to query. | |
void | dbsetuserdata (DBPROCESS *dbproc, BYTE *ptr) |
Associate client-allocated (and defined) data with a DBPROCESS . | |
RETCODE | dbsetversion (DBINT version) |
Specify a db-lib version level. | |
int | dbspid (DBPROCESS *dbproc) |
Get server process ID for a DBPROCESS . | |
RETCODE | dbspr1row (DBPROCESS *dbproc, char *buffer, DBINT buf_len) |
Print a regular result row to a buffer. | |
DBINT | dbspr1rowlen (DBPROCESS *dbproc) |
Determine size buffer required to hold the results returned by dbsprhead(), dbsprline(), and dbspr1row(). | |
RETCODE | dbsprhead (DBPROCESS *dbproc, char *buffer, DBINT buf_len) |
Print result set headings to a buffer. | |
RETCODE | dbsprline (DBPROCESS *dbproc, char *buffer, DBINT buf_len, DBCHAR line_char) |
Get formatted string for underlining dbsprhead() column names. | |
RETCODE | dbsqlexec (DBPROCESS *dbproc) |
send the SQL command to the server and wait for an answer. | |
RETCODE | dbsqlok (DBPROCESS *dbproc) |
Wait for results of a query from the server. | |
RETCODE | dbsqlsend (DBPROCESS *dbproc) |
Transmit the command buffer to the server. | |
int | dbstrbuild (DBPROCESS *dbproc, char *charbuf, int bufsize, char *text, char *formats,...) |
Build a printable string from text containing placeholders for variables. | |
RETCODE | dbstrcpy (DBPROCESS *dbproc, int start, int numbytes, char *dest) |
Get a copy of a chunk of the command buffer. | |
int | dbstrlen (DBPROCESS *dbproc) |
Get size of the command buffer, in bytes. | |
RETCODE | dbtablecolinfo (DBPROCESS *dbproc, DBINT column, DBCOL *pdbcol) |
describe table column attributes with a single call (Freetds-only API function modelled on dbcolinfo) | |
DBBINARY * | dbtxptr (DBPROCESS *dbproc, int column) |
Get text pointer for a column in the current row. | |
DBBINARY * | dbtxtimestamp (DBPROCESS *dbproc, int column) |
Get text timestamp for a column in the current row. | |
RETCODE | dbuse (DBPROCESS *dbproc, const char *name) |
Change current database. | |
DBINT | dbvarylen (DBPROCESS *dbproc, int column) |
Determine whether a column can vary in size. | |
const char * | dbversion () |
See which version of db-lib is in use. | |
DBBOOL | dbwillconvert (int srctype, int desttype) |
Test whether or not a datatype can be converted to another datatype. | |
RETCODE | dbwritetext (DBPROCESS *dbproc, char *objname, DBBINARY *textptr, DBTINYINT textptrlen, DBBINARY *timestamp, DBBOOL log, DBINT size, BYTE *text) |
Send text or image data to the server. |
Core functions needed by most db-lib programs.
DBCMDROW | ( | x | ) | dbcmdrow((x)) |
Sybase macro mapping to the Microsoft (lower-case) function.
DBCOUNT | ( | x | ) | dbcount((x)) |
Sybase macro mapping to the Microsoft (lower-case) function.
DBCURCMD | ( | x | ) | dbcurcmd((x)) |
Sybase macro mapping to the Microsoft (lower-case) function.
DBCURROW | ( | x | ) | dbcurrow((x)) |
Sybase macro mapping to the Microsoft (lower-case) function.
DBDEAD | ( | x | ) | dbdead((x)) |
Sybase macro mapping to the Microsoft (lower-case) function.
DBFIRSTROW | ( | x | ) | dbfirstrow((x)) |
Sybase macro mapping to the Microsoft (lower-case) function.
DBIORDESC | ( | x | ) | dbiordesc((x)) |
Sybase macro, maps to the internal (lower-case) function.
DBIOWDESC | ( | x | ) | dbiowdesc((x)) |
Sybase macro, maps to the internal (lower-case) function.
DBISAVAIL | ( | x | ) | dbisavail((x)) |
Sybase macro mapping to the Microsoft (lower-case) function.
DBLASTROW | ( | x | ) | dblastrow((x)) |
Sybase macro mapping to the Microsoft (lower-case) function.
DBMORECMDS | ( | x | ) | dbmorecmds((x)) |
Sybase macro mapping to the Microsoft (lower-case) function.
DBROWS | ( | x | ) | dbrows((x)) |
Sybase macro mapping to the Microsoft (lower-case) function.
DBROWTYPE | ( | x | ) | dbrowtype((x)) |
Sybase macro mapping to the Microsoft (lower-case) function.
DBSETLCHARSET | ( | x, | |||
y | ) | dbsetlname((x), (y), DBSETCHARSET) |
Set the client character set in the login packet.
DBSETLENCRYPT | ( | x, | |||
y | ) | dbsetlbool((x), (y), DBSETENCRYPT) |
Enable (or not) network password encryption for Sybase servers version 10.0 or above.
dbsetlnatlang | ( | x, | |||
y | ) | dbsetlname((x), (y), DBSETNATLANG) |
Set the language the server should use for messages.
DBSETLNATLANG | ( | x, | |||
y | ) | dbsetlname((x), (y), DBSETNATLANG) |
Set the language the server should use for messages.
dbsetlpacket | ( | x, | |||
y | ) | dbsetllong((x), (y), DBSETPACKET) |
Set the packet size in the login packet for new connections.
DBSETLPACKET | ( | x, | |||
y | ) | dbsetllong((x), (y), DBSETPACKET) |
Set the packet size in the login packet for new connections.
DBTDS | ( | a | ) | dbtds(a) |
Sybase macro, maps to the internal (lower-case) function.
#define SYBDBLIB 1 |
BYTE* dbadata | ( | DBPROCESS * | dbproc, | |
int | computeid, | |||
int | column | |||
) |
Get address of compute column data.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
computeid | of COMPUTE clause to which we're referring. | |
column | Nth column in computeid, starting from 1. |
NULL | no such computeid or column. |
DBINT dbadlen | ( | DBPROCESS * | dbproc, | |
int | computeid, | |||
int | column | |||
) |
Get size of data in a compute column.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
computeid | of COMPUTE clause to which we're referring. | |
column | Nth column in computeid, starting from 1. |
-1 | no such column or computeid. | |
0 | data are NULL. |
RETCODE dbaltbind | ( | DBPROCESS * | dbproc, | |
int | computeid, | |||
int | column, | |||
int | vartype, | |||
DBINT | varlen, | |||
BYTE * | varaddr | |||
) |
Bind a compute column to a program variable.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
computeid | of COMPUTE clause to which we're referring. | |
column | Nth column in computeid, starting from 1. | |
vartype | datatype of the host variable that will receive the data | |
varlen | size of host variable pointed to varaddr | |
varaddr | address of host variable |
SUCCEED | everything worked. | |
FAIL | no such computeid or column, or no such conversion possible, or target buffer too small. |
int dbaltcolid | ( | DBPROCESS * | dbproc, | |
int | computeid, | |||
int | column | |||
) |
Get column ID of a compute column.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
computeid | of COMPUTE clause to which we're referring. | |
column | Nth column in computeid, starting from 1. |
DBINT dbaltlen | ( | DBPROCESS * | dbproc, | |
int | computeid, | |||
int | column | |||
) |
Get size of data in compute column.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
computeid | of COMPUTE clause to which we're referring. | |
column | Nth column in computeid, starting from 1. |
int dbaltop | ( | DBPROCESS * | dbproc, | |
int | computeid, | |||
int | column | |||
) |
Get aggregation operator for a compute column.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
computeid | of COMPUTE clause to which we're referring. | |
column | Nth column in computeid, starting from 1. |
-1 | no such computeid or column. |
int dbalttype | ( | DBPROCESS * | dbproc, | |
int | computeid, | |||
int | column | |||
) |
Get datatype for a compute column.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
computeid | of COMPUTE clause to which we're referring. | |
column | Nth column in computeid, starting from 1. |
SYB*
dataype token. -1 | no such column or computeid. |
DBINT dbaltutype | ( | DBPROCESS * | dbproc, | |
int | computeid, | |||
int | column | |||
) |
Get user-defined datatype of a compute column.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
computeid | of COMPUTE clause to which we're referring. | |
column | Nth column in computeid, starting from 1. |
RETCODE dbanullbind | ( | DBPROCESS * | dbproc, | |
int | computeid, | |||
int | column, | |||
DBINT * | indicator | |||
) |
Tie a null-indicator to a compute result column.
When a row is fetched, the indicator variable tells the state of the column's data.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
computeid | identifies which one of potientially many compute rows is meant. The first compute clause has computeid == 1. | |
column | Nth column in the result set, starting with 1. | |
indicator | address of host variable. |
SUCCEED | variable accepted. | |
FAIL | indicator is NULL or column is out of range. |
dbnextrow()
. Possible values are:RETCODE dbbind | ( | DBPROCESS * | dbproc, | |
int | column, | |||
int | vartype, | |||
DBINT | varlen, | |||
BYTE * | varaddr | |||
) |
Tie a host variable to a resultset column.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
column | Nth column, starting at 1. | |
vartype | datatype of the host variable that will receive the data | |
varlen | size of host variable pointed to varaddr | |
varaddr | address of host variable |
SUCCEED | everything worked. | |
FAIL | no such column or no such conversion possible, or target buffer too small. |
BYTE* dbbylist | ( | DBPROCESS * | dbproc, | |
int | computeid, | |||
int * | size | |||
) |
Get bylist
for a compute row.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
computeid | of COMPUTE clause to which we're referring. | |
size | output: size of bylist buffer whose address is returned, possibly zero. |
bylist
for computeid. NULL | no such computeid. |
RETCODE dbcancel | ( | DBPROCESS * | dbproc | ) |
Cancel the current command batch.
dbproc | contains all information needed by db-lib to manage communications with the server. |
SUCCEED | always. |
RETCODE dbcanquery | ( | DBPROCESS * | dbproc | ) |
Cancel the query currently being retrieved, discarding all pending rows.
dbproc | contains all information needed by db-lib to manage communications with the server. |
char* dbchange | ( | DBPROCESS * | dbproc | ) |
See if a command caused the current database to change.
dbproc | contains all information needed by db-lib to manage communications with the server. |
NULL
.void dbclose | ( | DBPROCESS * | dbproc | ) |
Close a connection to the server and free associated resources.
dbproc | contains all information needed by db-lib to manage communications with the server. |
void dbclrbuf | ( | DBPROCESS * | dbproc, | |
DBINT | n | |||
) |
Clear n rows from the row buffer.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
n | number of rows to remove, >= 0. |
RETCODE dbclropt | ( | DBPROCESS * | dbproc, | |
int | option, | |||
char * | param | |||
) |
Reset an option.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
option | to be turned off. | |
param | clearing some options requires a parameter, believe it or not. |
SUCCEED | option and parameter seem sane. | |
FAIL | no such option. |
RETCODE dbcmd | ( | DBPROCESS * | dbproc, | |
const char * | cmdstring | |||
) |
Append
SQL to the command buffer.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
cmdstring | SQL to append to the command buffer. |
SUCCEED | success. | |
FAIL | insufficient memory. |
DBCMDPEND
unless the command state is DBCMDSENT, in which case it frees the command buffer. This latter may or may not be the Right Thing to do. DBINT dbcollen | ( | DBPROCESS * | dbproc, | |
int | column | |||
) |
Get size of a regular result column.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
column | Nth in the result set, starting from 1. |
char* dbcolname | ( | DBPROCESS * | dbproc, | |
int | column | |||
) |
Return name of a regular result column.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
column | Nth in the result set, starting with 1. |
NULL | column is not in range. |
char* dbcolsource | ( | DBPROCESS * | dbproc, | |
int | column | |||
) |
Get base database column name for a result set column.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
column | Nth in the result set, starting from 1. |
int dbcoltype | ( | DBPROCESS * | dbproc, | |
int | column | |||
) |
Get the datatype of a regular result set column.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
column | Nth in the result set, starting from 1. |
SYB*
datetype token value, or zero if column out of range DBTYPEINFO* dbcoltypeinfo | ( | DBPROCESS * | dbproc, | |
int | column | |||
) |
Get precision and scale information for a regular result column.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
column | Nth in the result set, starting from 1. |
int dbcolutype | ( | DBPROCESS * | dbproc, | |
int | column | |||
) |
Get user-defined datatype of a regular result column.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
column | Nth in the result set, starting from 1. |
SYB*
datetype token value, or -1 if column out of range DBINT dbconvert | ( | DBPROCESS * | dbproc, | |
int | srctype, | |||
const BYTE * | src, | |||
DBINT | srclen, | |||
int | desttype, | |||
BYTE * | dest, | |||
DBINT | destlen | |||
) |
Convert one datatype to another.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
srctype | datatype of the data to convert. | |
src | buffer to convert | |
srclen | length of src | |
desttype | target datatype | |
dest | output buffer | |
destlen | size of dest |
Conversion functions are handled in the TDS layer.
The main reason for this is that ct-lib
and ODBC
(and presumably DBI
) need to be able to do conversions between datatypes. This is possible because the format of complex data (dates, money, numeric, decimal) is defined by its representation on the wire; thus what we call DBMONEY
is exactly its format on the wire. CLIs that need a different representation (ODBC?) need to convert from this format anyway, so the code would already be in place.
Each datatype is also defined by its Server-type so all CLIs should be able to map native types to server types as well.
tds_convert() copies from src to dest and returns the output data length, period. All padding and termination is the responsibility of the API library and is done post-conversion. The peculiar rule in dbconvert() is that a destlen of -1 and a desttype of SYBCHAR
means the output buffer should be null-terminated.
What happens if client does not reset values?
Microsoft and Sybase define this function differently.
DBINT dbconvert_ps | ( | DBPROCESS * | dbproc, | |
int | srctype, | |||
BYTE * | src, | |||
DBINT | srclen, | |||
int | desttype, | |||
BYTE * | dest, | |||
DBINT | destlen, | |||
DBTYPEINFO * | typeinfo | |||
) |
cf.
dbconvert(), above
Sybase: Convert numeric types.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
srctype | datatype of the data to convert. | |
src | buffer to convert | |
srclen | length of src | |
desttype | target datatype | |
dest | output buffer | |
destlen | size of dest | |
typeinfo | address of a DBTYPEINFO structure that governs the precision & scale of the output, may be NULL . |
BYTE* dbdata | ( | DBPROCESS * | dbproc, | |
int | column | |||
) |
Get address of data in a regular result column.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
column | Nth in the result set, starting from 1. |
RETCODE dbdatecrack | ( | DBPROCESS * | dbproc, | |
DBDATEREC * | di, | |||
DBDATETIME * | datetime | |||
) |
Break a DBDATETIME value into useful pieces.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
di | output: structure to contain the exploded parts of datetime. | |
datetime | input: DBDATETIME to be converted. |
SUCCEED | always. |
--with-msdblib
was configured. DBINT dbdatlen | ( | DBPROCESS * | dbproc, | |
int | column | |||
) |
Get size of current row's data in a regular result column.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
column | Nth in the result set, starting from 1. |
EHANDLEFUNC dberrhandle | ( | EHANDLEFUNC | handler | ) |
Set an error handler, for messages from db-lib.
handler | pointer to callback function that will handle errors. Pass NULL to restore the default handler. |
void dbexit | ( | void | ) |
RETCODE dbfcmd | ( | DBPROCESS * | dbproc, | |
const char * | fmt, | |||
... | ||||
) |
printf-like
way to form SQL to send to the server.
Forms a command string and writes to the command buffer with dbcmd().
dbproc | contains all information needed by db-lib to manage communications with the server. | |
fmt | man vasprintf for details. |
SUCCEED | success. | |
FAIL | insufficient memory, or dbcmd() failed. |
void dbfreebuf | ( | DBPROCESS * | dbproc | ) |
Erase the command buffer, in case DBNOAUTOFREE
was set with dbsetopt().
dbproc | contains all information needed by db-lib to manage communications with the server. |
char* dbgetchar | ( | DBPROCESS * | dbproc, | |
int | pos | |||
) |
Get address of a position in the command buffer.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
pos | offset within the command buffer, starting at 0. |
int dbgetmaxprocs | ( | void | ) |
get maximum simultaneous connections db-lib will open to the server.
int dbgetpacket | ( | DBPROCESS * | dbproc | ) |
Get TDS packet size for the connection.
dbproc | contains all information needed by db-lib to manage communications with the server. |
RETCODE dbgetrow | ( | DBPROCESS * | dbproc, | |
DBINT | row | |||
) |
Read a row from the row buffer.
When row buffering is enabled (DBBUFFER option is on), the client can use dbgetrow() to re-read a row previously fetched with dbnextrow(). The effect is to move the row pointer -- analogous to fseek() -- back to row. Calls to dbnextrow() read from row + 1 until the buffer is exhausted, at which point it resumes its normal behavior, except that as each row is fetched from the server, it is added to the row buffer (in addition to being returned to the client). When the buffer is filled, dbnextrow() returns FAIL
until the buffer is at least partially emptied with dbclrbuf().
dbproc | contains all information needed by db-lib to manage communications with the server. | |
row | Nth row to read, starting with 1. |
REG_ROW | returned row is a regular row. |
NO_MORE_ROWS | no such row in the row buffer. Current row is unchanged. | |
FAIL | unsuccessful; row buffer may be full. |
int dbgettime | ( | void | ) |
Get maximum seconds db-lib waits for a server response to query.
query | timeout limit, in seconds |
BYTE* dbgetuserdata | ( | DBPROCESS * | dbproc | ) |
Get address of user-allocated data from a DBPROCESS
.
dbproc | contains all information needed by db-lib to manage communications with the server. |
db-lib
associated with dbproc when the client called dbsetuserdata(). undefined | (probably NULL ) dbsetuserdata() was not previously called. |
RETCODE dbinit | ( | void | ) |
Initialize db-lib.
locales.conf
(if any) to determine the default date format. SUCCEED | normal. | |
FAIL | cannot allocate an array of TDS_MAX_CONN TDSSOCKET pointers. |
DBBOOL dbisopt | ( | DBPROCESS * | dbproc, | |
int | option, | |||
char * | param | |||
) |
Get value of an option.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
option | the option | |
param | a parameter to option. |
LOGINREC* dblogin | ( | void | ) |
RETCODE dbmorecmds | ( | DBPROCESS * | dbproc | ) |
See if more commands are to be processed.
dbproc | contains all information needed by db-lib to manage communications with the server. |
RETCODE dbmoretext | ( | DBPROCESS * | dbproc, | |
DBINT | size, | |||
BYTE * | text | |||
) |
Send chunk of a text/image value to the server.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
size | count of bytes to send. | |
text | textpointer, obtained from dbtxptr. |
SUCCEED | always. |
FAIL
if appropriate. MHANDLEFUNC dbmsghandle | ( | MHANDLEFUNC | handler | ) |
Set a message handler, for messages from the server.
handler | address of the function that will process the messages. |
char* dbname | ( | DBPROCESS * | dbproc | ) |
Get name of current database.
dbproc | contains all information needed by db-lib to manage communications with the server. |
RETCODE dbnextrow | ( | DBPROCESS * | dbproc | ) |
Read result row into the row buffer and into any bound host variables.
dbproc | contains all information needed by db-lib to manage communications with the server. |
REG_ROW | regular row has been read. |
BUF_FULL | reading next row would cause the buffer to be exceeded (and buffering is turned on). No row was read from the server |
RETCODE dbnullbind | ( | DBPROCESS * | dbproc, | |
int | column, | |||
DBINT * | indicator | |||
) |
Tie a null-indicator to a regular result column.
When a row is fetched, the indicator variable tells the state of the column's data.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
column | Nth column in the result set, starting with 1. | |
indicator | address of host variable. |
SUCCEED | variable accepted. | |
FAIL | indicator is NULL or column is out of range. |
dbnextrow()
. Possible values are:int dbnumalts | ( | DBPROCESS * | dbproc, | |
int | computeid | |||
) |
Get count of columns in a compute row.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
computeid | of COMPUTE clause to which we're referring. |
int dbnumcols | ( | DBPROCESS * | dbproc | ) |
Return number of regular columns in a result set.
dbproc | contains all information needed by db-lib to manage communications with the server. |
int dbnumcompute | ( | DBPROCESS * | dbproc | ) |
Get count of COMPUTE
clauses for a result set.
dbproc | contains all information needed by db-lib to manage communications with the server. |
RETCODE dbpoll | ( | DBPROCESS * | dbproc, | |
long | milliseconds, | |||
DBPROCESS ** | ready_dbproc, | |||
int * | return_reason | |||
) |
See if a server response has arrived.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
milliseconds | how long to wait for the server before returning:
| |
ready_dbproc | output: DBPROCESS for which a response arrived, of NULL . | |
return_reason | output:
|
SUCCEED | everything worked. | |
FAIL | a server connection died. |
void dbprhead | ( | DBPROCESS * | dbproc | ) |
Print result set headings to stdout.
dbproc | contains all information needed by db-lib to manage communications with the server. |
RETCODE dbprrow | ( | DBPROCESS * | dbproc | ) |
Print a result set to stdout.
dbproc | contains all information needed by db-lib to manage communications with the server. |
const char* dbprtype | ( | int | token | ) |
Print a token value's name to a buffer.
token | server SYB* value, e.g. SYBINT. |
STATUS dbreadtext | ( | DBPROCESS * | dbproc, | |
void * | buf, | |||
DBINT | bufsize | |||
) |
Fetch part of a text or image value from the server.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
buf | output: buffer into which text will be placed. | |
bufsize | size of buf, in bytes. |
>0
count of bytes placed in buf.0
end of row.-1
error, no result set ready for dbproc.NO_MORE_ROWS
all rows read, no further data. void dbrecftos | ( | char * | filename | ) |
Record to a file all SQL commands sent to the server.
filename | name of file to write to. |
RETCODE dbregexec | ( | DBPROCESS * | dbproc, | |
DBUSMALLINT | options | |||
) |
Execute a registered procedure.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
options |
RETCODE dbreginit | ( | DBPROCESS * | dbproc, | |
DBCHAR * | procedure_name, | |||
DBSMALLINT | namelen | |||
) |
Ready execution of a registered procedure.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
procedure_name | to call. | |
namelen | size of procedure_name, in bytes. |
RETCODE dbreglist | ( | DBPROCESS * | dbproc | ) |
Get names of Open Server registered procedures.
dbproc | contains all information needed by db-lib to manage communications with the server. |
RETCODE dbregparam | ( | DBPROCESS * | dbproc, | |
char * | param_name, | |||
int | type, | |||
DBINT | datalen, | |||
BYTE * | data | |||
) |
Describe parameter of registered procedure .
dbproc | contains all information needed by db-lib to manage communications with the server. | |
param_name | ||
type | SYB* datatype. | |
datalen | size of data. | |
data | address of buffer holding value for the parameter. |
RETCODE dbresults | ( | DBPROCESS * | dbproc | ) |
Set up query results.
dbproc | contains all information needed by db-lib to manage communications with the server. |
SUCCEED | Some results are available. | |
FAIL | query was not processed successfully by the server | |
NO_MORE_RESULTS | query produced no results. |
The meaning of results is very specific and not very intuitive. Results are created by either
When dbresults returns SUCCEED, therefore, it indicates the server processed the query successfully and that one or more of these is present:
If none of the above are present, dbresults() returns NO_MORE_RESULTS.
SUCCEED does not imply that DBROWS() will return TRUE or even that dbnumcols() will return nonzero. A general algorithm for reading results will call dbresults() until it return NO_MORE_RESULTS (or FAIL). An application should check for all the above kinds of results within the dbresults() loop.
void dbrpwclr | ( | LOGINREC * | login | ) |
Clear remote passwords from the LOGINREC structure.
login | structure to pass to dbopen(). |
RETCODE dbrpwset | ( | LOGINREC * | login, | |
char * | srvname, | |||
char * | password, | |||
int | pwlen | |||
) |
Add a remote password to the LOGINREC structure.
login | structure to pass to dbopen(). | |
srvname | server for which password should be used. | |
password | you guessed it, let's hope no else does. | |
pwlen | count of password, in bytes. |
RETCODE dbsafestr | ( | DBPROCESS * | dbproc, | |
const char * | src, | |||
DBINT | srclen, | |||
char * | dest, | |||
DBINT | destlen, | |||
int | quotetype | |||
) |
safely quotes character values in SQL text.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
src | input string. | |
srclen | length of src in bytes, or -1 to indicate it's null-terminated. | |
dest | output: client-provided output buffer. | |
destlen | size of dest in bytes, or -1 to indicate it's "big enough" and the data should be null-terminated. | |
quotetype |
|
SUCCEED | everything worked. | |
FAIL | no such quotetype, or insufficient room in dest. |
char* dbservcharset | ( | DBPROCESS * | dbproc | ) |
Get syscharset
name of the server character set.
dbproc | contains all information needed by db-lib to manage communications with the server. |
RETCODE dbsetdefcharset | ( | char * | charset | ) |
Set the default character set.
charset | null-terminated ASCII string, matching a row in master..syscharsets. |
RETCODE dbsetdeflang | ( | char * | language | ) |
Set the default character set for an application.
language | ASCII null-terminated string. |
SUCCEED | Always. |
void dbsetifile | ( | char * | filename | ) |
set name and location of the interfaces
file FreeTDS should use to look up a servername.
Does not affect lookups or location of freetds.conf
.
filename | name of interfaces |
void dbsetinterrupt | ( | DBPROCESS * | dbproc, | |
DB_DBCHKINTR_FUNC | chkintr, | |||
DB_DBHNDLINTR_FUNC | hndlintr | |||
) |
Set interrupt handler for db-lib to use while blocked against a read from the server.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
chkintr | ||
hndlintr |
RETCODE dbsetlogintime | ( | int | seconds | ) |
Set maximum seconds db-lib waits for a server response to a login attempt.
seconds | New limit for application. |
SUCCEED | Always. |
RETCODE dbsetlversion | ( | LOGINREC * | login, | |
BYTE | version | |||
) |
Set TDS version for future connections.
RETCODE dbsetmaxprocs | ( | int | maxprocs | ) |
Set maximum simultaneous connections db-lib will open to the server.
maxprocs | Limit for process. |
SUCCEED | Always. |
RETCODE dbsetnull | ( | DBPROCESS * | dbproc, | |
int | bindtype, | |||
int | bindlen, | |||
BYTE * | bindval | |||
) |
Define substitution values to be used when binding null values.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
bindtype | type of binding to which the substitute value will apply. | |
bindlen | size of the substitute value you are supplying, in bytes. Ignored except for CHARBIND and BINARYBIND. | |
bindval | pointer to a buffer containing the substitute value. |
SUCCEED | query was processed without errors. | |
FAIL | query was not processed |
RETCODE dbsetopt | ( | DBPROCESS * | dbproc, | |
int | option, | |||
const char * | char_param, | |||
int | int_param | |||
) |
Set db-lib or server option.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
option | option to set. | |
char_param | value to set option to, if it wants a null-teminated ASCII string. | |
int_param | value to set option to, if it wants an integer value. |
SUCCEED | everything worked. | |
FAIL | no such option, or insufficient memory, or unimplemented. |
RETCODE dbsetrow | ( | DBPROCESS * | dbproc, | |
DBINT | row | |||
) |
Make a buffered row "current" without fetching it into bound variables.
dbproc | contains all information needed by db-lib to manage communications with the server. |
MORE_ROWS | row found | |
NO_MORE_ROWS | row not found | |
FAIL | dbproc is dead or not enabled |
RETCODE dbsettime | ( | int | seconds | ) |
Set maximum seconds db-lib waits for a server response to query.
seconds | New limit for application. |
SUCCEED | Always. |
void dbsetuserdata | ( | DBPROCESS * | dbproc, | |
BYTE * | ptr | |||
) |
Associate client-allocated (and defined) data with a DBPROCESS
.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
ptr | address of client-defined data. |
db-lib
will associate with dbproc. The client allocates the buffer addressed by ptr. db-lib
never examines or uses the information; it just stashes the pointer for later retrieval by the application with dbgetuserdata()
. RETCODE dbsetversion | ( | DBINT | version | ) |
Specify a db-lib version level.
version | anything, really. |
SUCCEED | Always. |
db-lib
in FreeTDS
. int dbspid | ( | DBPROCESS * | dbproc | ) |
Get server process ID for a DBPROCESS
.
dbproc | contains all information needed by db-lib to manage communications with the server. |
RETCODE dbspr1row | ( | DBPROCESS * | dbproc, | |
char * | buffer, | |||
DBINT | buf_len | |||
) |
Print a regular result row to a buffer.
Fills a buffer with one data row, represented as a null-terminated ASCII string. Helpful for debugging.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
buffer | output: Address of a buffer to hold ASCII null-terminated string. | |
buf_len | size of buffer, in bytes. |
SUCCEED | on success. | |
FAIL | trouble encountered. |
DBINT dbspr1rowlen | ( | DBPROCESS * | dbproc | ) |
Determine size buffer required to hold the results returned by dbsprhead(), dbsprline(), and dbspr1row().
dbproc | contains all information needed by db-lib to manage communications with the server. |
RETCODE dbsprhead | ( | DBPROCESS * | dbproc, | |
char * | buffer, | |||
DBINT | buf_len | |||
) |
Print result set headings to a buffer.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
buffer | output buffer | |
buf_len | size of buffer |
SUCCEED | buffer filled. | |
FAIL | insufficient spaace in buffer, usually. |
RETCODE dbsprline | ( | DBPROCESS * | dbproc, | |
char * | buffer, | |||
DBINT | buf_len, | |||
DBCHAR | line_char | |||
) |
Get formatted string for underlining dbsprhead() column names.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
buffer | output buffer | |
buf_len | size of buffer | |
line_char | character to use to represent underlining. |
SUCCEED | buffer filled. | |
FAIL | insufficient space in buffer, usually. |
RETCODE dbsqlexec | ( | DBPROCESS * | dbproc | ) |
send the SQL command to the server and wait for an answer.
Please be patient. This function waits for the server to respond. dbsqlexec
is equivalent to dbsqlsend() followed by dbsqlok().
dbproc | contains all information needed by db-lib to manage communications with the server. |
SUCCEED | query was processed without errors. | |
FAIL | was returned by dbsqlsend() or dbsqlok(). |
RETCODE dbsqlok | ( | DBPROCESS * | dbproc | ) |
Wait for results of a query from the server.
dbproc | contains all information needed by db-lib to manage communications with the server. |
SUCCEED | everything worked, fetch results with dbnextresults() . | |
FAIL | SQL syntax error, typically. |
RETCODE dbsqlsend | ( | DBPROCESS * | dbproc | ) |
Transmit the command buffer to the server.
Non-blocking, does not wait for a response.
dbproc | contains all information needed by db-lib to manage communications with the server. |
SUCCEED | SQL sent. | |
FAIL | protocol problem, unless dbsqlsend() when it's not supposed to be (in which case a db-lib error message will be emitted). |
int dbstrbuild | ( | DBPROCESS * | dbproc, | |
char * | charbuf, | |||
int | bufsize, | |||
char * | text, | |||
char * | formats, | |||
... | ||||
) |
Build a printable string from text containing placeholders for variables.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
charbuf | output: buffer that will contain the ASCII null-terminated string built by dbstrbuild() . | |
bufsize | size of charbuf, in bytes. | |
text | null-terminated ASCII string, with placeholders for variables. A Placeholder is a three-byte string, made up of:
| |
formats | null-terminated ASCII sprintf-style string. Has one format specifier for each placeholder in text. |
RETCODE dbstrcpy | ( | DBPROCESS * | dbproc, | |
int | start, | |||
int | numbytes, | |||
char * | dest | |||
) |
Get a copy of a chunk of the command buffer.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
start | position in the command buffer to start copying from, starting from 0. If start is past the end of the command buffer, dbstrcpy() inserts a null terminator at dest[0]. | |
numbytes | number of bytes to copy.
| |
dest | output: the buffer to write to. Make sure it's big enough. |
SUCCEED | the inputs were valid and dest was affected. | |
FAIL | start < 0 or numbytes < -1. |
int dbstrlen | ( | DBPROCESS * | dbproc | ) |
Get size of the command buffer, in bytes.
dbproc | contains all information needed by db-lib to manage communications with the server. |
describe table column attributes with a single call (Freetds-only API function modelled on dbcolinfo)
dbproc | contains all information needed by db-lib to manage communications with the server. | |
column | Nth in the result set, starting from 1. | |
pdbcol | address of structure to be populated by this function. |
DBBINARY* dbtxptr | ( | DBPROCESS * | dbproc, | |
int | column | |||
) |
Get text pointer for a column in the current row.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
column | number of the column in the SELECT statement, starting at 1. |
DBBINARY* dbtxtimestamp | ( | DBPROCESS * | dbproc, | |
int | column | |||
) |
Get text timestamp for a column in the current row.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
column | number of the column in the SELECT statement, starting at 1. |
RETCODE dbuse | ( | DBPROCESS * | dbproc, | |
const char * | name | |||
) |
Change current database.
Analagous to the unix command cd
, dbuse() makes name the default database. Waits for an answer from the server.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
name | database to use. |
SUCCEED | query was processed without errors. | |
FAIL | query was not processed |
DBINT dbvarylen | ( | DBPROCESS * | dbproc, | |
int | column | |||
) |
Determine whether a column can vary in size.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
column | Nth in the result set, starting from 1. |
TRUE | datatype of column can vary in size, or is nullable. | |
FALSE | datatype of column is fixed and is not nullable. |
const char* dbversion | ( | void | ) |
See which version of db-lib is in use.
DBBOOL dbwillconvert | ( | int | srctype, | |
int | desttype | |||
) |
Test whether or not a datatype can be converted to another datatype.
srctype | type converting from | |
desttype | type converting to |
TRUE | convertible, or should be. Legal unimplemented conversions return TRUE. | |
FAIL | not convertible. |
src/dblib/unittests/convert
().c(). RETCODE dbwritetext | ( | DBPROCESS * | dbproc, | |
char * | objname, | |||
DBBINARY * | textptr, | |||
DBTINYINT | textptrlen, | |||
DBBINARY * | timestamp, | |||
DBBOOL | log, | |||
DBINT | size, | |||
BYTE * | text | |||
) |
Send text or image data to the server.
dbproc | contains all information needed by db-lib to manage communications with the server. | |
objname | table name | |
textptr | text pointer to be modified, obtained from dbtxptr(). | |
textptrlen | Ignored. Supposed to be DBTXPLEN . | |
timestamp | text timestamp to be modified, obtained from dbtxtimestamp() or dbtxtsnewval(), may be NULL . | |
log | TRUE if the operation is to be recorded in the transaction log. | |
size | overall size of the data (in total, not just for this call), in bytes. A guideline, must not overstate the case. | |
text | the chunk of data to write. |
SUCCEED | everything worked. | |
FAIL | not sent, possibly because timestamp is invalid or was changed in the database since it was fetched. |