|
enum | {
TDS_CUR_ISTAT_UNUSED = 0x00
, TDS_CUR_ISTAT_DECLARED = 0x01
, TDS_CUR_ISTAT_OPEN = 0x02
, TDS_CUR_ISTAT_CLOSED = 0x04
,
TDS_CUR_ISTAT_RDONLY = 0x08
, TDS_CUR_ISTAT_UPDATABLE = 0x10
, TDS_CUR_ISTAT_ROWCNT = 0x20
, TDS_CUR_ISTAT_DEALLOC = 0x40
} |
|
enum | {
TDS_TYPEFLAG_INVALID = 0
, TDS_TYPEFLAG_NULLABLE = 1
, TDS_TYPEFLAG_FIXED = 2
, TDS_TYPEFLAG_VARIABLE = 4
,
TDS_TYPEFLAG_COLLATE = 8
, TDS_TYPEFLAG_ASCII = 16
, TDS_TYPEFLAG_UNICODE = 32
, TDS_TYPEFLAG_BINARY = 64
,
TDS_TYPEFLAG_DATETIME = 128
, TDS_TYPEFLAG_NUMERIC = 256
} |
|
enum | tds_bcp_directions { TDS_BCP_IN = 1
, TDS_BCP_OUT = 2
, TDS_BCP_QUERYOUT = 3
} |
| bcp direction
|
|
enum | tds_cursor_fetch {
TDS_CURSOR_FETCH_NEXT = 1
, TDS_CURSOR_FETCH_PREV
, TDS_CURSOR_FETCH_FIRST
, TDS_CURSOR_FETCH_LAST
,
TDS_CURSOR_FETCH_ABSOLUTE
, TDS_CURSOR_FETCH_RELATIVE
} |
|
enum | tds_cursor_operation { TDS_CURSOR_POSITION = 0
, TDS_CURSOR_UPDATE = 1
, TDS_CURSOR_DELETE = 2
, TDS_CURSOR_INSERT = 4
} |
|
enum | TDS_CURSOR_STATE { TDS_CURSOR_STATE_UNACTIONED = 0
, TDS_CURSOR_STATE_REQUESTED = 1
, TDS_CURSOR_STATE_SENT = 2
, TDS_CURSOR_STATE_ACTIONED = 3
} |
|
enum | tds_encryption_level { TDS_ENCRYPTION_DEFAULT
, TDS_ENCRYPTION_OFF
, TDS_ENCRYPTION_REQUEST
, TDS_ENCRYPTION_REQUIRE
} |
|
enum | tds_end {
TDS_DONE_FINAL = 0x00
, TDS_DONE_MORE_RESULTS = 0x01
, TDS_DONE_ERROR = 0x02
, TDS_DONE_INXACT = 0x04
,
TDS_DONE_PROC = 0x08
, TDS_DONE_COUNT = 0x10
, TDS_DONE_CANCELLED = 0x20
, TDS_DONE_EVENT = 0x40
,
TDS_DONE_SRVERROR = 0x100
, TDS_DONE_NO_TRAN = 0
, TDS_DONE_TRAN_SUCCEED = 1
, TDS_DONE_TRAN_PROGRESS = 2
,
TDS_DONE_STMT_ABORT = 3
, TDS_DONE_TRAN_ABORT = 4
} |
| Flags returned in TDS_DONE token. More...
|
|
enum | TDS_ICONV_ENTRY { client2ucs2
, client2server_chardata
, initial_char_conv_count
} |
|
enum | TDS_MULTIPLE_TYPE { TDS_MULTIPLE_QUERY
, TDS_MULTIPLE_EXECUTE
, TDS_MULTIPLE_RPC
} |
|
enum | tds_operations {
TDS_OP_NONE = 0
, TDS_OP_CURSOR = TDS_SP_CURSOR
, TDS_OP_CURSOROPEN = TDS_SP_CURSOROPEN
, TDS_OP_CURSORPREPARE = TDS_SP_CURSORPREPARE
,
TDS_OP_CURSOREXECUTE = TDS_SP_CURSOREXECUTE
, TDS_OP_CURSORPREPEXEC = TDS_SP_CURSORPREPEXEC
, TDS_OP_CURSORUNPREPARE = TDS_SP_CURSORUNPREPARE
, TDS_OP_CURSORFETCH = TDS_SP_CURSORFETCH
,
TDS_OP_CURSOROPTION = TDS_SP_CURSOROPTION
, TDS_OP_CURSORCLOSE = TDS_SP_CURSORCLOSE
, TDS_OP_EXECUTESQL = TDS_SP_EXECUTESQL
, TDS_OP_PREPARE = TDS_SP_PREPARE
,
TDS_OP_EXECUTE = TDS_SP_EXECUTE
, TDS_OP_PREPEXEC = TDS_SP_PREPEXEC
, TDS_OP_PREPEXECRPC = TDS_SP_PREPEXECRPC
, TDS_OP_UNPREPARE = TDS_SP_UNPREPARE
,
TDS_OP_DYN_DEALLOC = 100
} |
|
enum | tds_states {
TDS_IDLE
, TDS_WRITING
, TDS_SENDING
, TDS_PENDING
,
TDS_READING
, TDS_DEAD
} |
| values for tds->state More...
|
|
enum | tds_token_flags {
TDS_HANDLE_ALL = 0
, TDS_TOKEN_FLAG =(OTHERS)
, TDS_TOKEN_FLAG =(OTHERS)
, TDS_TOKEN_FLAG =(OTHERS)
,
TDS_TOKEN_FLAG =(OTHERS)
, TDS_TOKEN_FLAG =(OTHERS)
, TDS_TOKEN_FLAG =(OTHERS)
, TDS_TOKEN_FLAG =(OTHERS)
,
TDS_TOKEN_FLAG =(OTHERS)
, TDS_TOKEN_FLAG =(OTHERS)
, TDS_TOKEN_FLAG =(OTHERS)
, TDS_TOKEN_RESULTS = TDS_RETURN_ROWFMT|TDS_RETURN_COMPUTEFMT|TDS_RETURN_DONE|TDS_STOPAT_ROW|TDS_STOPAT_COMPUTE|TDS_RETURN_PROC
,
TDS_TOKEN_TRAILING = TDS_STOPAT_ROWFMT|TDS_STOPAT_COMPUTEFMT|TDS_STOPAT_ROW|TDS_STOPAT_COMPUTE|TDS_STOPAT_MSG|TDS_STOPAT_OTHERS
} |
|
enum | tds_token_results {
TDS_TOKEN_RES_OTHERS
, TDS_TOKEN_RES_ROWFMT
, TDS_TOKEN_RES_COMPUTEFMT
, TDS_TOKEN_RES_PARAMFMT
,
TDS_TOKEN_RES_DONE
, TDS_TOKEN_RES_ROW
, TDS_TOKEN_RES_COMPUTE
, TDS_TOKEN_RES_PROC
,
TDS_TOKEN_RES_MSG
, TDS_TOKEN_RES_ENV
} |
|
enum | TDSERRNO {
TDSEOK = TDS_SUCCESS
, TDSEVERDOWN = 100
, TDSEINPROGRESS
, TDSEICONVIU = 2400
,
TDSEICONVAVAIL = 2401
, TDSEICONVO = 2402
, TDSEICONVI = 2403
, TDSEICONV2BIG = 2404
,
TDSEPORTINSTANCE = 2500
, TDSESYNC = 20001
, TDSEFCON = 20002
, TDSETIME = 20003
,
TDSEREAD = 20004
, TDSEWRIT = 20006
, TDSESOCK = 20008
, TDSECONN = 20009
,
TDSEMEM = 20010
, TDSEINTF = 20012
, TDSEUHST = 20013
, TDSEPWD = 20014
,
TDSESEOF = 20017
, TDSERPND = 20019
, TDSEBTOK = 20020
, TDSEOOB = 20022
,
TDSECLOS = 20056
, TDSEUSCT = 20058
, TDSEUTDS = 20146
, TDSEEUNR = 20185
,
TDSECAP = 20203
, TDSENEG = 20210
, TDSEUMSG = 20212
, TDSECAPTYP = 20213
,
TDSECONF = 20214
, TDSEBPROBADTYP = 20250
, TDSECLOSEIN = 20292
} |
|
|
int | determine_adjusted_size (const TDSICONV *char_conv, int size) |
| Allow for maximum possible size of converted data, while being careful about integer division truncation.
|
|
static bool | is_tds_type_valid (int type) |
|
TDSAUTHENTICATION * | tds5_negotiate_get_auth (TDSSOCKET *tds) |
|
void | tds5_negotiate_set_msg_type (TDSSOCKET *tds, TDSAUTHENTICATION *auth, unsigned msg_type) |
|
int | tds5_send_optioncmd (TDSSOCKET *tds, TDS_OPTION_CMD tds_command, TDS_OPTION tds_option, TDS_OPTION_ARG *tds_argument, TDS_INT *tds_argsize) |
|
TDSRET | tds71_submit_prepexec (TDSSOCKET *tds, const char *query, const char *id, TDSDYNAMIC **dyn_out, TDSPARAMINFO *params) |
| Creates a temporary stored procedure in the server and execute it.
|
|
int | tds7_get_instance_port (struct addrinfo *addr, const char *instance) |
| Get port of given instance.
|
|
int | tds7_get_instance_ports (FILE *output, struct addrinfo *addr) |
| Get port of all instances.
|
|
void | tds7_srv_charset_changed (TDSCONNECTION *conn, int sql_collate, int lcid) |
|
const char * | tds_addrinfo2str (struct addrinfo *addr, char *name, int namemax) |
|
TDSSOCKET * | tds_alloc_additional_socket (TDSCONNECTION *conn) |
|
BCPCOLDATA * | tds_alloc_bcp_column_data (unsigned int column_size) |
|
TDSBCPINFO * | tds_alloc_bcpinfo (void) |
|
char * | tds_alloc_client_sqlstate (int msgno) |
|
TDSCOMPUTEINFO ** | tds_alloc_compute_results (TDSSOCKET *tds, TDS_USMALLINT num_cols, TDS_USMALLINT by_cols) |
|
TDSRET | tds_alloc_compute_row (TDSCOMPUTEINFO *res_info) |
|
TDSCONTEXT * | tds_alloc_context (void *parent) |
|
TDSCURSOR * | tds_alloc_cursor (TDSSOCKET *tds, const char *name, TDS_INT namelen, const char *query, TDS_INT querylen) |
|
TDSDYNAMIC * | tds_alloc_dynamic (TDSCONNECTION *conn, const char *id) |
| Allocate a dynamic statement.
|
|
TDSLOCALE * | tds_alloc_locale (void) |
|
TDSLOGIN * | tds_alloc_login (int use_environment) |
|
char * | tds_alloc_lookup_sqlstate (TDSSOCKET *tds, int msgno) |
|
TDSPACKET * | tds_alloc_packet (void *buf, unsigned len) |
|
void * | tds_alloc_param_data (TDSCOLUMN *curparam) |
| Allocate data for a parameter.
|
|
TDSPARAMINFO * | tds_alloc_param_result (TDSPARAMINFO *old_param) |
| Adds a output parameter to TDSPARAMINFO.
|
|
TDSRESULTINFO * | tds_alloc_results (TDS_USMALLINT num_cols) |
|
TDSRET | tds_alloc_row (TDSRESULTINFO *res_info) |
| Allocate space for row store return NULL on out of memory.
|
|
TDSSOCKET * | tds_alloc_socket (TDSCONTEXT *context, unsigned int bufsize) |
|
TDSRET | tds_bcp_done (TDSSOCKET *tds, int *rows_copied) |
| Tell we finished sending BCP data to server.
|
|
TDSRET | tds_bcp_fread (TDSSOCKET *tds, TDSICONV *conv, FILE *stream, const char *terminator, size_t term_len, char **outbuf, size_t *outbytes) |
| Read a data file, passing the data through iconv().
|
|
TDSRET | tds_bcp_init (TDSSOCKET *tds, TDSBCPINFO *bcpinfo) |
| Initialize BCP information.
|
|
TDSRET | tds_bcp_send_record (TDSSOCKET *tds, TDSBCPINFO *bcpinfo, tds_bcp_get_col_data get_col_data, tds_bcp_null_error null_error, int offset) |
| Send one row of data to server.
|
|
TDSRET | tds_bcp_start (TDSSOCKET *tds, TDSBCPINFO *bcpinfo) |
| Start sending BCP data to server.
|
|
TDSRET | tds_bcp_start_copy_in (TDSSOCKET *tds, TDSBCPINFO *bcpinfo) |
| Start bulk copy to server.
|
|
static bool | tds_capability_enabled (const TDS_CAPABILITY_TYPE *cap, unsigned cap_num) |
|
void | tds_close_socket (TDSSOCKET *tds) |
| Close current socket.
|
|
int | tds_config_boolean (const char *option, const char *value, TDSLOGIN *login) |
|
TDS_USMALLINT * | tds_config_verstr (const char *tdsver, TDSLOGIN *login) |
| Set TDS version from given string.
|
|
int | tds_connect_and_login (TDSSOCKET *tds, TDSLOGIN *login) |
|
void | tds_connection_close (TDSCONNECTION *conn) |
|
int | tds_connection_read (TDSSOCKET *tds, unsigned char *buf, int buflen) |
|
int | tds_connection_write (TDSSOCKET *tds, const unsigned char *buf, int buflen, int final) |
|
const char * | tds_convert_string (TDSSOCKET *tds, TDSICONV *char_conv, const char *s, int len, size_t *out_len) |
| Convert a string in an allocated buffer.
|
|
void | tds_convert_string_free (const char *original, const char *converted) |
|
int | tds_count_placeholders (const char *query) |
| Count the number of placeholders ('?
|
|
TDSRET | tds_cursor_close (TDSSOCKET *tds, TDSCURSOR *cursor) |
|
TDSRET | tds_cursor_dealloc (TDSSOCKET *tds, TDSCURSOR *cursor) |
| Send a deallocation request to server.
|
|
void | tds_cursor_deallocated (TDSCONNECTION *conn, TDSCURSOR *cursor) |
|
TDSRET | tds_cursor_declare (TDSSOCKET *tds, TDSCURSOR *cursor, TDSPARAMINFO *params, int *send) |
|
TDSRET | tds_cursor_fetch (TDSSOCKET *tds, TDSCURSOR *cursor, TDS_CURSOR_FETCH fetch_type, TDS_INT i_row) |
|
TDSRET | tds_cursor_get_cursor_info (TDSSOCKET *tds, TDSCURSOR *cursor, TDS_UINT *row_number, TDS_UINT *row_count) |
|
TDSRET | tds_cursor_open (TDSSOCKET *tds, TDSCURSOR *cursor, TDSPARAMINFO *params, int *send) |
|
TDSRET | tds_cursor_setname (TDSSOCKET *tds, TDSCURSOR *cursor) |
|
TDSRET | tds_cursor_setrows (TDSSOCKET *tds, TDSCURSOR *cursor, int *send) |
|
TDSRET | tds_cursor_update (TDSSOCKET *tds, TDSCURSOR *cursor, TDS_CURSOR_OPERATION op, TDS_INT i_row, TDSPARAMINFO *params) |
|
TDSRET | tds_datecrack (TDS_INT datetype, const void *di, TDSDATEREC *dr) |
| Convert from db date format to a structured date format.
|
|
TDSRET | tds_deferred_cursor_dealloc (TDSCONNECTION *conn, TDSCURSOR *cursor) |
| Deallocate cursor on idle.
|
|
TDSRET | tds_deferred_unprepare (TDSCONNECTION *conn, TDSDYNAMIC *dyn) |
| Unprepare dynamic on idle.
|
|
void | tds_deinit_bcpinfo (TDSBCPINFO *bcpinfo) |
|
void | tds_detach_results (TDSRESULTINFO *info) |
| Detach result info from it current socket.
|
|
TDSRET | tds_disconnect (TDSSOCKET *tds) |
|
DSTR * | tds_dstr_get (TDSSOCKET *tds, DSTR *s, size_t len) |
| Reads a string from wire and put in a DSTR.
|
|
void | tds_dynamic_deallocated (TDSCONNECTION *conn, TDSDYNAMIC *dyn) |
|
size_t | tds_fix_column_size (TDSSOCKET *tds, TDSCOLUMN *curcol) |
| Get column size for wire.
|
|
void | tds_fix_login (TDSLOGIN *login) |
| Fix configuration after reading it.
|
|
TDSRET | tds_flush_packet (TDSSOCKET *tds) |
| Flush packet to server.
|
|
void | tds_free_all_results (TDSSOCKET *tds) |
|
void | tds_free_bcp_column_data (BCPCOLDATA *coldata) |
|
void | tds_free_bcpinfo (TDSBCPINFO *bcpinfo) |
|
void | tds_free_context (TDSCONTEXT *locale) |
|
void | tds_free_input_params (TDSDYNAMIC *dyn) |
| Frees all allocated input parameters of a dynamic statement.
|
|
void | tds_free_locale (TDSLOCALE *locale) |
|
void | tds_free_login (TDSLOGIN *login) |
|
void | tds_free_msg (TDSMESSAGE *message) |
|
void | tds_free_packets (TDSPACKET *packet) |
|
void | tds_free_param_result (TDSPARAMINFO *param_info) |
| Delete latest parameter.
|
|
void | tds_free_param_results (TDSPARAMINFO *param_info) |
|
void | tds_free_results (TDSRESULTINFO *res_info) |
|
void | tds_free_row (TDSRESULTINFO *res_info, unsigned char *row) |
|
void | tds_free_socket (TDSSOCKET *tds) |
|
unsigned char | tds_get_byte (TDSSOCKET *tds) |
| Return a single byte from the input buffer.
|
|
TDS_SERVER_TYPE | tds_get_cardinal_type (TDS_SERVER_TYPE datatype, int usertype) |
|
TDSRET | tds_get_char_data (TDSSOCKET *tds, char *dest, size_t wire_size, TDSCOLUMN *curcol) |
| Fetch character data the wire.
|
|
TDSRET | tds_get_column_declaration (TDSSOCKET *tds, TDSCOLUMN *curcol, char *out) |
| Return declaration for column (like "varchar(20)").
|
|
const TDS_COMPILETIME_SETTINGS * | tds_get_compiletime_settings (void) |
| Return a structure capturing the compile-time settings provided to the configure script.
|
|
TDS_SERVER_TYPE | tds_get_conversion_type (TDS_SERVER_TYPE srctype, int colsize) |
| Return type suitable for conversions (convert all nullable types to fixed type)
|
|
char * | tds_get_home_file (const char *file) |
| Return filename from HOME directory.
|
|
TDSLOCALE * | tds_get_locale (void) |
| Get locale information.
|
|
bool | tds_get_n (TDSSOCKET *tds, void *dest, size_t n) |
| Get N bytes from the buffer and return them in the already allocated space
given to us.
|
|
int | tds_get_size_by_type (TDS_SERVER_TYPE servertype) |
| Return the number of bytes needed by specified type.
|
|
size_t | tds_get_string (TDSSOCKET *tds, size_t string_len, char *dest, size_t dest_size) |
| Fetch a string from the wire.
|
|
int | tds_get_token_size (int marker) |
| tds_get_token_size() returns the size of a fixed length token used by tds_process_cancel() to determine how to read past a token
|
|
TDS_UINT | tds_get_uint (TDSSOCKET *tds) |
| Get an int32 from the server.
|
|
TDS_UINT8 | tds_get_uint8 (TDSSOCKET *tds) |
| Get an uint64 from the server.
|
|
TDS_USMALLINT | tds_get_usmallint (TDSSOCKET *tds) |
| Get an int16 from the server.
|
|
int | tds_get_varint_size (TDSCONNECTION *conn, int datatype) |
| tds_get_varint_size() returns the size of a variable length integer returned in a TDS 7.0 result string
|
|
void | tds_getmac (TDS_SYS_SOCKET s, unsigned char mac[6]) |
|
unsigned int | tds_gettime_ms (void) |
|
int | tds_goodread (TDSSOCKET *tds, unsigned char *buf, int buflen) |
| Loops until we have received some characters return -1 on failure.
|
|
int | tds_goodwrite (TDSSOCKET *tds, const unsigned char *buffer, size_t buflen) |
|
TDSAUTHENTICATION * | tds_gss_get_auth (TDSSOCKET *tds) |
|
int | tds_iconv_alloc (TDSCONNECTION *conn) |
| Allocate iconv stuff.
|
|
void | tds_iconv_close (TDSCONNECTION *conn) |
|
void | tds_iconv_free (TDSCONNECTION *conn) |
|
TDSICONV * | tds_iconv_from_collate (TDSCONNECTION *conn, TDS_UCHAR collate[5]) |
| Get iconv information from a LCID (to support different column encoding under MSSQL2K)
|
|
TDSRET | tds_iconv_open (TDSCONNECTION *conn, const char *charset, int use_utf16) |
|
TDSLOGIN * | tds_init_login (TDSLOGIN *login, TDSLOCALE *locale) |
| Initialize login structure with locale information and other stuff for connection.
|
|
int | tds_init_write_buf (TDSSOCKET *tds) |
|
TDSDYNAMIC * | tds_lookup_dynamic (TDSCONNECTION *conn, const char *id) |
| Finds a dynamic given string id.
|
|
struct addrinfo * | tds_lookup_host (const char *servername) |
| Get the IP address for a hostname.
|
|
TDSRET | tds_lookup_host_set (const char *servername, struct addrinfo **addr) |
|
char * | tds_money_to_string (const TDS_MONEY *money, char *s, bool use_2_digits) |
|
TDSRET | tds_multiple_done (TDSSOCKET *tds, TDSMULTIPLE *multiple) |
|
TDSRET | tds_multiple_execute (TDSSOCKET *tds, TDSMULTIPLE *multiple, TDSDYNAMIC *dyn) |
|
TDSRET | tds_multiple_init (TDSSOCKET *tds, TDSMULTIPLE *multiple, TDS_MULTIPLE_TYPE type, TDSHEADERS *head) |
|
TDSRET | tds_multiple_query (TDSSOCKET *tds, TDSMULTIPLE *multiple, const char *query, TDSPARAMINFO *params) |
|
int | tds_needs_unprepare (TDSCONNECTION *conn, TDSDYNAMIC *dyn) |
| Check if dynamic request must be unprepared.
|
|
const char * | tds_next_placeholder (const char *start) |
| Get position of next placeholder.
|
|
TDSAUTHENTICATION * | tds_ntlm_get_auth (TDSSOCKET *tds) |
| Build a NTLMSPP packet to send to server.
|
|
TDS_INT | tds_numeric_change_prec_scale (TDS_NUMERIC *numeric, unsigned char new_prec, unsigned char new_scale) |
|
TDS_INT | tds_numeric_to_string (const TDS_NUMERIC *numeric, char *s) |
|
TDSERRNO | tds_open_socket (TDSSOCKET *tds, struct addrinfo *ipaddr, unsigned int port, int timeout, int *p_oserr) |
|
int | tds_parse_boolean (const char *value, int default_value) |
|
void | tds_parse_conf_section (const char *option, const char *value, void *param) |
|
unsigned char | tds_peek (TDSSOCKET *tds) |
| Reads a byte from the TDS stream without removing it.
|
|
TDSRET | tds_process_cancel (TDSSOCKET *tds) |
|
TDSRET | tds_process_login_tokens (TDSSOCKET *tds) |
| tds_process_login_tokens() is called after sending the login packet to the server.
|
|
TDSRET | tds_process_simple_query (TDSSOCKET *tds) |
| Process results for simple query as "SET TEXTSIZE" or "USE dbname" If the statement returns results, beware they are discarded.
|
|
TDSRET | tds_process_tokens (TDSSOCKET *tds, TDS_INT *result_type, int *done_flags, unsigned flag) |
| process all streams.
|
|
const char * | tds_prtype (int token) |
| Returns string representation of the given type.
|
|
char * | tds_prwsaerror (int erc) |
|
void | tds_prwsaerror_free (char *s) |
|
int | tds_put_buf (TDSSOCKET *tds, const unsigned char *buf, int dsize, int ssize) |
|
int | tds_put_byte (TDSSOCKET *tds, unsigned char c) |
|
int | tds_put_cancel (TDSSOCKET *tds) |
|
int | tds_put_int (TDSSOCKET *tds, TDS_INT i) |
|
int | tds_put_int8 (TDSSOCKET *tds, TDS_INT8 i) |
|
int | tds_put_n (TDSSOCKET *tds, const void *buf, size_t n) |
|
int | tds_put_smallint (TDSSOCKET *tds, TDS_SMALLINT si) |
|
int | tds_put_string (TDSSOCKET *tds, const char *buf, int len) |
| Output a string to wire automatic translate string to unicode if needed.
|
|
size_t | tds_quote_id (TDSSOCKET *tds, char *buffer, const char *id, int idlen) |
| Quote an id.
|
|
size_t | tds_quote_string (TDSSOCKET *tds, char *buffer, const char *str, int len) |
| Quote a string.
|
|
void | tds_random_buffer (unsigned char *out, int len) |
|
bool | tds_read_conf_file (TDSLOGIN *login, const char *server) |
| Read configuration info for given server return 0 on error.
|
|
bool | tds_read_conf_section (FILE *in, const char *section, TDSCONFPARSE tds_conf_parse, void *parse_param) |
| Read a section of configuration file (INI style file)
|
|
TDSLOGIN * | tds_read_config_info (TDSSOCKET *tds, TDSLOGIN *login, TDSLOCALE *locale) |
| tds_read_config_info() will fill the tds connection structure based on configuration information gathered in the following order: 1) Program specified in TDSLOGIN structure 2) The environment variables TDSVER, TDSDUMP, TDSPORT, TDSQUERY, TDSHOST 3) A config file with the following search order: a) a readable file specified by environment variable FREETDSCONF b) a readable file in ~/.freetds.conf c) a readable file in $prefix/etc/freetds.conf 3) ~/.interfaces if exists 4) $SYBASE/interfaces if exists 5) TDS_DEF_* default values
|
|
int | tds_read_packet (TDSSOCKET *tds) |
| Read in one 'packet' from the server.
|
|
void * | tds_realloc (void **pp, size_t new_size) |
| Reallocate a pointer and update it if success.
|
|
TDSPACKET * | tds_realloc_packet (TDSPACKET *packet, unsigned len) |
|
TDSSOCKET * | tds_realloc_socket (TDSSOCKET *tds, size_t bufsize) |
|
static void | tds_release_cur_dyn (TDSSOCKET *tds) |
|
void | tds_release_cursor (TDSCURSOR **pcursor) |
|
void | tds_release_dynamic (TDSDYNAMIC **dyn) |
| Frees dynamic statement.
|
|
int | tds_select (TDSSOCKET *tds, unsigned tds_sel, int timeout_seconds) |
| Select on a socket until it's available or the timeout expires.
|
|
TDSRET | tds_send_cancel (TDSSOCKET *tds) |
| tds_send_cancel() sends an empty packet (8 byte header only) tds_process_cancel should be called directly after this.
|
|
bool | tds_set_app (TDSLOGIN *tds_login, const char *application) TDS_WUR |
|
void | tds_set_bulk (TDSLOGIN *tds_login, bool enabled) |
|
bool | tds_set_client_charset (TDSLOGIN *tds_login, const char *charset) TDS_WUR |
|
void | tds_set_column_type (TDSCONNECTION *conn, TDSCOLUMN *curcol, TDS_SERVER_TYPE type) |
| Set type of column initializing all dependency.
|
|
void | tds_set_cur_dyn (TDSSOCKET *tds, TDSDYNAMIC *dyn) |
| Set current dynamic.
|
|
void | tds_set_current_results (TDSSOCKET *tds, TDSRESULTINFO *info) |
|
bool | tds_set_host (TDSLOGIN *tds_login, const char *hostname) TDS_WUR |
|
TDSRET | tds_set_interfaces_file_loc (const char *interfloc) |
| Set the full name of interface file.
|
|
bool | tds_set_language (TDSLOGIN *tds_login, const char *language) TDS_WUR |
|
bool | tds_set_library (TDSLOGIN *tds_login, const char *library) TDS_WUR |
|
void | tds_set_packet (TDSLOGIN *tds_login, int packet_size) |
|
void | tds_set_param_type (TDSCONNECTION *conn, TDSCOLUMN *curcol, TDS_SERVER_TYPE type) |
| Set type of column initializing all dependency.
|
|
bool | tds_set_passwd (TDSLOGIN *tds_login, const char *password) TDS_WUR |
|
void | tds_set_port (TDSLOGIN *tds_login, int port) |
|
bool | tds_set_server (TDSLOGIN *tds_login, const char *server) TDS_WUR |
| Set the servername in a TDSLOGIN structure.
|
|
TDS_STATE | tds_set_state (TDSSOCKET *tds, TDS_STATE state) |
| Set state of TDS connection, with logging and checking.
|
|
bool | tds_set_user (TDSLOGIN *tds_login, const char *username) TDS_WUR |
|
void | tds_set_version (TDSLOGIN *tds_login, TDS_TINYINT major_ver, TDS_TINYINT minor_ver) |
|
const char * | tds_skip_comment (const char *s) |
| Skip a comment in a query.
|
|
const char * | tds_skip_quoted (const char *s) |
| Skip quoting string (like 'sfsf', "dflkdj" or [dfkjd])
|
|
void | tds_socket_flush (TDS_SYS_SOCKET sock) |
|
int | tds_socket_set_nonblocking (TDS_SYS_SOCKET sock) |
| Set socket to non-blocking.
|
|
void | tds_srv_charset_changed (TDSCONNECTION *conn, const char *charset) |
|
void | tds_start_query (TDSSOCKET *tds, unsigned char packet_type) |
| Start query packet of a given type.
|
|
char * | tds_strndup (const void *s, TDS_INTPTR len) |
| Copy a string of length len to a new allocated buffer This function does not read more than len bytes Please note that some system implementation of strndup do not assure they don't read past len bytes as they use still strlen to check length to copy limiting after strlen to size passed Also this function is different from strndup as it assume that len bytes are valid String returned is NUL terminated.
|
|
TDSRET | tds_submit_begin_tran (TDSSOCKET *tds) |
| Send a rollback request.
|
|
TDSRET | tds_submit_commit (TDSSOCKET *tds, int cont) |
| Send a commit request.
|
|
TDSRET | tds_submit_execdirect (TDSSOCKET *tds, const char *query, TDSPARAMINFO *params, TDSHEADERS *head) |
| Submit a prepared query with parameters.
|
|
TDSRET | tds_submit_execute (TDSSOCKET *tds, TDSDYNAMIC *dyn) |
| Sends a previously prepared dynamic statement to the server.
|
|
TDSRET | tds_submit_optioncmd (TDSSOCKET *tds, TDS_OPTION_CMD command, TDS_OPTION option, TDS_OPTION_ARG *param, TDS_INT param_size) |
| Send option commands to server.
|
|
TDSRET | tds_submit_prepare (TDSSOCKET *tds, const char *query, const char *id, TDSDYNAMIC **dyn_out, TDSPARAMINFO *params) |
| Creates a temporary stored procedure in the server.
|
|
TDSRET | tds_submit_query (TDSSOCKET *tds, const char *query) |
| Sends a language string to the database server for processing.
|
|
TDSRET | tds_submit_query_params (TDSSOCKET *tds, const char *query, TDSPARAMINFO *params, TDSHEADERS *head) |
| Sends a language string to the database server for processing.
|
|
TDSRET | tds_submit_queryf (TDSSOCKET *tds, const char *queryf,...) |
| Format and submit a query.
|
|
TDSRET | tds_submit_rollback (TDSSOCKET *tds, int cont) |
| Send a rollback request.
|
|
TDSRET | tds_submit_rpc (TDSSOCKET *tds, const char *rpc_name, TDSPARAMINFO *params, TDSHEADERS *head) |
| Calls a RPC from server.
|
|
TDSRET | tds_submit_unprepare (TDSSOCKET *tds, TDSDYNAMIC *dyn) |
| Send a unprepare request for a prepared query.
|
|
void | tds_swap_bytes (void *buf, int bytes) |
|
void | tds_unget_byte (TDSSOCKET *tds) |
| Unget will always work as long as you don't call it twice in a row.
|
|
TDSRET | tds_vstrbuild (char *buffer, int buflen, int *resultlen, const char *text, int textlen, const char *formats, int formatlen, va_list ap) |
|
void | tds_wakeup_close (TDSPOLLWAKEUP *wakeup) |
|
static TDS_SYS_SOCKET | tds_wakeup_get_fd (const TDSPOLLWAKEUP *wakeup) |
|
int | tds_wakeup_init (TDSPOLLWAKEUP *wakeup) |
|
void | tds_wakeup_send (TDSPOLLWAKEUP *wakeup, char cancel) |
|
TDSRET | tds_write_packet (TDSSOCKET *tds, unsigned char final) |
|
TDSRET | tds_writetext_continue (TDSSOCKET *tds, const TDS_UCHAR *text, TDS_UINT size) |
| Send some data in the writetext request started by tds_writetext_start.
|
|
TDSRET | tds_writetext_end (TDSSOCKET *tds) |
| Finish sending writetext data.
|
|
TDSRET | tds_writetext_start (TDSSOCKET *tds, const char *objname, const char *textptr, const char *timestamp, int with_log, TDS_UINT size) |
| Start writing writetext request.
|
|
void | tdsdump_close (void) |
| Close the TDS dump log file.
|
|
void | tdsdump_col (const TDSCOLUMN *col) |
| Write a column value to the debug log.
|
|
void | tdsdump_dump_buf (const char *file, unsigned int level_line, const char *msg, const void *buf, size_t length) |
| Dump the contents of data into the log file in a human readable format.
|
|
int | tdsdump_isopen (void) |
|
void | tdsdump_log (const char *file, unsigned int level_line, const char *fmt,...) |
| Write a message to the debug log.
|
|
void | tdsdump_off (void) |
| Temporarily turn off logging.
|
|
void | tdsdump_on (void) |
| Turn logging back on.
|
|
int | tdsdump_open (const char *filename) |
| Create and truncate a human readable dump file for the TDS traffic.
|
|
int | tdserror (const TDSCONTEXT *tds_ctx, TDSSOCKET *tds, int msgno, int errnum) |
| Call the client library's error handler (for library-generated errors only)
|
|