FreeTDS API
edit.h
1 /* Free ISQL - An isql for DB-Library (C) 2007 Nicholas S. Castellano
2  *
3  * This program is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU General Public
5  * License as published by the Free Software Foundation; either
6  * version 2 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Library General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public
14  * License along with this library; if not, write to the
15  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16  * Boston, MA 02111-1307, USA.
17  */
18 
19 /* $Id: edit.h,v 1.3 2007-01-20 06:32:27 castellano Exp $ */
20 int edit(const char *editor, const char *arg);
dbopen
DBPROCESS * dbopen(LOGINREC *login, const char *server)
Normally not used.
Definition: dbopen.c:36
dbmsghandle
MHANDLEFUNC dbmsghandle(MHANDLEFUNC handler)
Set a message handler, for messages from the server.
Definition: dblib.c:5121
dbsqlexec
RETCODE dbsqlexec(DBPROCESS *dbproc)
send the SQL command to the server and wait for an answer.
Definition: dblib.c:1401
dbretname
char * dbretname(DBPROCESS *dbproc, int retnum)
Get name of an output parameter filled by a stored procedure.
Definition: dblib.c:4705
dbbylist
BYTE * dbbylist(DBPROCESS *dbproc, int computeid, int *size)
Get bylist for a compute row.
Definition: dblib.c:4980
dbfcmd
RETCODE dbfcmd(DBPROCESS *dbproc, const char *fmt,...)
printf-like way to form SQL to send to the server.
Definition: dblib.c:1316
tds_dblib_dbprocess
Definition: dblib.h:120
bcp_init
RETCODE bcp_init(DBPROCESS *dbproc, const char *tblname, const char *hfile, const char *errfile, int direction)
Prepare for bulk copy operation on a table.
Definition: bcp.c:164
dbaltbind
RETCODE dbaltbind(DBPROCESS *dbproc, int computeid, int column, int vartype, DBINT varlen, BYTE *varaddr)
Bind a compute column to a program variable.
Definition: dblib.c:4350
bcp_batch
DBINT bcp_batch(DBPROCESS *dbproc)
Commit a set of rows to the table.
Definition: bcp.c:1957
dbcmd
RETCODE dbcmd(DBPROCESS *dbproc, const char cmdstring[])
Append SQL to the command buffer.
Definition: dblib.c:1355
METACOMP
Definition: bsqldb.c:75
sybdb.h
Primary include file for db-lib applications.
dbclose
void dbclose(DBPROCESS *dbproc)
Close a connection to the server and free associated resources.
Definition: dblib.c:1467
dbbind
RETCODE dbbind(DBPROCESS *dbproc, int column, int vartype, DBINT varlen, BYTE *varaddr)
Tie a host variable to a resultset column.
Definition: dblib.c:2615
dbsqlsend
RETCODE dbsqlsend(DBPROCESS *dbproc)
Transmit the command buffer to the server. Non-blocking, does not wait for a response.
Definition: dblib.c:7025
dberrhandle
EHANDLEFUNC dberrhandle(EHANDLEFUNC handler)
Set an error handler, for messages from db-lib.
Definition: dblib.c:5102
dbsqlok
RETCODE dbsqlok(DBPROCESS *dbproc)
Wait for results of a query from the server.
Definition: dblib.c:4795
dbnullbind
RETCODE dbnullbind(DBPROCESS *dbproc, int column, DBINT *indicator)
Tie a null-indicator to a regular result column.
Definition: dblib.c:2721
dbcoltype
int dbcoltype(DBPROCESS *dbproc, int column)
Get the datatype of a regular result set column.
Definition: dblib.c:2951
dbdatlen
DBINT dbdatlen(DBPROCESS *dbproc, int column)
Get size of current row's data in a regular result column.
Definition: dblib.c:3305
dbrettype
int dbrettype(DBPROCESS *dbproc, int retnum)
Get datatype of a stored procedure's return parameter.
Definition: dblib.c:6247
DATA
Definition: bsqldb.c:74
bcp_control
RETCODE bcp_control(DBPROCESS *dbproc, int field, DBINT value)
Set BCP options for uploading a datafile.
Definition: bcp.c:539
dbtablecolinfo
RETCODE dbtablecolinfo(DBPROCESS *dbproc, DBINT column, DBCOL *pdbcol)
describe table column attributes with a single call (Freetds-only API function modelled on dbcolinfo)
Definition: dblib.c:6446
dbcollen
DBINT dbcollen(DBPROCESS *dbproc, int column)
Get size of a regular result column.
Definition: dblib.c:3150
dbvarylen
DBINT dbvarylen(DBPROCESS *dbproc, int column)
Determine whether a column can vary in size.
Definition: dblib.c:3199
dbinit
RETCODE dbinit(void)
Initialize db-lib.
Definition: dblib.c:665
dbaltop
int dbaltop(DBPROCESS *dbproc, int computeid, int column)
Get aggregation operator for a compute column.
Definition: dblib.c:4425
dbretstatus
DBINT dbretstatus(DBPROCESS *dbproc)
Fetch status value returned by query or remote procedure call.
Definition: dblib.c:4655
dbnumalts
int dbnumalts(DBPROCESS *dbproc, int computeid)
Get count of columns in a compute row.
Definition: dblib.c:4921
tds_willconvert
unsigned char tds_willconvert(int srctype, int desttype)
Test if a conversion is possible.
Definition: convert.c:3058
bcp_done
DBINT bcp_done(DBPROCESS *dbproc)
Conclude the transfer of data from program variables.
Definition: bcp.c:1984
bcp_collen
RETCODE bcp_collen(DBPROCESS *dbproc, DBINT varlen, int table_column)
Set the length of a host variable to be written to a table.
Definition: bcp.c:261
dbresults
RETCODE dbresults(DBPROCESS *dbproc)
Set up query results.
Definition: dblib.c:1675
dbaltlen
DBINT dbaltlen(DBPROCESS *dbproc, int computeid, int column)
Get size of data in compute column.
Definition: dblib.c:7119
dbnumrets
int dbnumrets(DBPROCESS *dbproc)
Get count of output parameters filled by a stored procedure.
Definition: dblib.c:4673
dbprtype
const char * dbprtype(int token)
Print a token value's name to a buffer.
Definition: dblib.c:6429
dbnumcompute
int dbnumcompute(DBPROCESS *dbproc)
Get count of COMPUTE clauses for a result set.
Definition: dblib.c:4954
bcp_sendrow
RETCODE bcp_sendrow(DBPROCESS *dbproc)
Write data in host variables to the table.
Definition: bcp.c:1337
dbconvert
DBINT dbconvert(DBPROCESS *dbproc, int srctype, const BYTE *src, DBINT srclen, int desttype, BYTE *dest, DBINT destlen)
cf. dbconvert_ps(), above
Definition: dblib.c:2574
dbexit
void dbexit()
Close server connections and free all related structures.
Definition: dblib.c:1534
_options::pivot_t
Definition: bsqldb.c:99
dbhasretstat
DBBOOL dbhasretstat(DBPROCESS *dbproc)
Determine if query generated a return status number.
Definition: dblib.c:4631
DBCOL2
Definition: sybdb.h:373
dbfreebuf
void dbfreebuf(DBPROCESS *dbproc)
Erase the command buffer, in case DBNOAUTOFREE was set with dbsetopt().
Definition: dblib.c:6041
dbname
char * dbname(DBPROCESS *dbproc)
Get name of current database.
Definition: dblib.c:6989
rtrim
static int rtrim(char *, int)
trim a string of trailing blanks
Definition: bcp.c:2265
dbcolname
char * dbcolname(DBPROCESS *dbproc, int column)
Return name of a regular result column.
Definition: dblib.c:1853
dbalttype
int dbalttype(DBPROCESS *dbproc, int computeid, int column)
Get datatype for a compute column.
Definition: dblib.c:4321
dbsetopt
RETCODE dbsetopt(DBPROCESS *dbproc, int option, const char *char_param, int int_param)
Set db-lib or server option.
Definition: dblib.c:4452
dbretdata
BYTE * dbretdata(DBPROCESS *dbproc, int retnum)
Get value of an output parameter filled by a stored procedure.
Definition: dblib.c:4734
_procedure
Definition: defncopy.c:117
bcp_colptr
RETCODE bcp_colptr(DBPROCESS *dbproc, BYTE *colptr, int table_column)
Override bcp_bind() by pointing to a different host variable.
Definition: bcp.c:661
dbnumcols
int dbnumcols(DBPROCESS *dbproc)
Return number of regular columns in a result set.
Definition: dblib.c:1829
dbcolsource
char * dbcolsource(DBPROCESS *dbproc, int column)
Get base database column name for a result set column.
Definition: dblib.c:3125
OBJECTINFO
Definition: datacopy.c:52
dbuse
RETCODE dbuse(DBPROCESS *dbproc, const char *name)
Change current database.
Definition: dblib.c:1427
_options
Definition: bsqldb.c:85
dbaltcolid
int dbaltcolid(DBPROCESS *dbproc, int computeid, int column)
Get column ID of a compute column.
Definition: dblib.c:4265
dbstrlen
int dbstrlen(DBPROCESS *dbproc)
Get size of the command buffer, in bytes.
Definition: dblib.c:6272
DBCOL
Definition: sybdb.h:354
METADATA
Definition: bsqldb.c:73
pd
Definition: datacopy.c:61
dbloginfree
void dbloginfree(LOGINREC *login)
free the LOGINREC
Definition: dblib.c:742
dblogin
LOGINREC * dblogin(void)
Allocate a LOGINREC structure.
Definition: dblib.c:710
tdsdump_open
int tdsdump_open(const char *filename)
Create and truncate a human readable dump file for the TDS traffic.
Definition: log.c:112
LOGINREC
Definition: bsqlodbc.c:99
KEY_T
Definition: bsqldb.c:79
dbdata
BYTE * dbdata(DBPROCESS *dbproc, int column)
Get address of data in a regular result column.
Definition: dblib.c:3333
dbpivot
RETCODE dbpivot(DBPROCESS *dbproc, int nkeys, int *keys, int ncols, int *cols, DBPIVOT_FUNC func, int val)
Pivot the rows, creating a new resultset.
Definition: dbpivot.c:908
dbretlen
int dbretlen(DBPROCESS *dbproc, int retnum)
Get size of an output parameter filled by a stored procedure.
Definition: dblib.c:4760