File: Sybase.h

package info (click to toggle)
libdbd-sybase-perl 1.26-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 720 kB
  • sloc: ansic: 5,633; perl: 2,216; makefile: 5
file content (151 lines) | stat: -rw-r--r-- 4,713 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/* $Id: Sybase.h,v 1.21 2011/10/02 14:53:49 mpeppler Exp $

   Copyright (c) 1997 - 2011 Michael Peppler

   You may distribute under the terms of either the GNU General Public
   License or the Artistic License, as specified in the Perl README file.

*/



#define NEED_DBIXS_VERSION 93

#define PERL_NO_GET_CONTEXT

#include <DBIXS.h>		/* installed by the DBI module	*/
#include "dbivport.h"

#include <ctpublic.h>
#include <bkpublic.h>

/* These defines avoid name clashes for multiple statically linked DBD's    */
 
#define dbd_init        syb_init
#define dbd_db_login6       syb_db_login
#define dbd_db_do       syb_db_do
#define dbd_db_commit       syb_db_commit
#define dbd_db_rollback     syb_db_rollback
#define dbd_db_disconnect   syb_db_disconnect
#define dbd_discon_all   syb_discon_all
#define dbd_db_destroy      syb_db_destroy
#define dbd_db_STORE_attrib syb_db_STORE_attrib
#define dbd_db_FETCH_attrib syb_db_FETCH_attrib
#define dbd_st_prepare      syb_st_prepare
#define dbd_st_rows     syb_st_rows
#define dbd_st_execute      syb_st_execute
#define dbd_st_fetch        syb_st_fetch
#define dbd_st_finish       syb_st_finish
#define dbd_st_destroy      syb_st_destroy
#define dbd_st_blob_read    syb_st_blob_read
#define dbd_st_STORE_attrib syb_st_STORE_attrib
#define dbd_st_FETCH_attrib syb_st_FETCH_attrib
#define dbd_describe        syb_describe
#define dbd_bind_ph     syb_bind_ph



/* read in our implementation details */

#include "dbdimp.h"

#if defined(CS_CURRENT_VERSION)
#define CTLIB_VERSION	CS_CURRENT_VERSION
#else
#if defined(CS_VERSION_157)
#define CTLIB_VERSION   CS_VERSION_157
#else 
#if defined(CS_VERSION_155)
#define CTLIB_VERSION   CS_VERSION_155
#else 
#if defined(CS_VERSION_150)
#define CTLIB_VERSION   CS_VERSION_150
#else 
#if defined(CS_VERSION_125)
#define CTLIB_VERSION   CS_VERSION_125
#else 
#if defined(CS_VERSION_120)
#define CTLIB_VERSION   CS_VERSION_120
#else 
#if defined(CS_VERSION_110)
#define CTLIB_VERSION   CS_VERSION_110
#else
#define CTLIB_VERSION	CS_VERSION_100
#endif
#endif
#endif
#endif
#endif
#endif
#endif

#if defined(CS_UNICHAR_TYPE) && defined(CS_VERSION_150)
#if defined (is_utf8_string)
#define DBD_CAN_HANDLE_UTF8
#endif
#endif

/*#define CTLIB_VERSION	CS_VERSION_100 */

#ifndef MAX
#define MAX(X,Y)	(((X) > (Y)) ? (X) : (Y))
#endif

#ifndef MIN
#define MIN(X,Y)	(((X) < (Y)) ? (X) : (Y))
#endif


#if !defined(Sybase_h)
#define Sybase_h 1

void     syb_init _((dbistate_t *dbistate));

int      syb_discon_all _((SV *drh, imp_drh_t *imp_drh));

int      syb_db_login _((SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *uid, char *pwd, SV *attribs));
int      syb_db_do _((SV *sv, char *statement));
int      syb_db_commit     _((SV *dbh, imp_dbh_t *imp_dbh));
int      syb_db_rollback   _((SV *dbh, imp_dbh_t *imp_dbh));
int      syb_db_disconnect _((SV *dbh, imp_dbh_t *imp_dbh));
void     syb_db_destroy    _((SV *dbh, imp_dbh_t *imp_dbh));
int      syb_db_STORE_attrib _((SV *dbh, imp_dbh_t *imp_dbh, SV *keysv, SV *valuesv));
SV      *syb_db_FETCH_attrib _((SV *dbh, imp_dbh_t *imp_dbh, SV *keysv));

int      syb_st_prepare _((SV *sth, imp_sth_t *imp_sth,
                char *statement, SV *attribs));
int      syb_st_rows    _((SV *sth, imp_sth_t *imp_sth));
int      syb_st_execute _((SV *sth, imp_sth_t *imp_sth));
AV      *syb_st_fetch   _((SV *sth, imp_sth_t *imp_sth));
int      syb_st_finish  _((SV *sth, imp_sth_t *imp_sth));
void     syb_st_destroy _((SV *sth, imp_sth_t *imp_sth));
int      syb_st_blob_read _((SV *sth, imp_sth_t *imp_sth,
                int field, long offset, long len, SV *destrv, long destoffset));
int      syb_ct_get_data _((SV *sth, imp_sth_t *imp_sth, 
                int column, SV *bufrv, int buflen));
int      syb_ct_data_info _((SV *sth, imp_sth_t *imp_sth, int action, 
               int column, SV *attr));
int      syb_ct_send_data _((SV *sth, imp_sth_t *imp_sth, char *buffer, 
               int size));
int      syb_ct_prepare_send _((SV *sth, imp_sth_t *));
int      syb_ct_finish_send _((SV *sth, imp_sth_t *));
int      syb_st_STORE_attrib _((SV *sth, imp_sth_t *imp_sth, SV *keysv, SV *valuesv));
SV      *syb_st_FETCH_attrib _((SV *sth, imp_sth_t *imp_sth, SV *keysv));
 
int      syb_describe _((SV *sth, imp_sth_t *imp_sth));
int      syb_bind_ph  _((SV *sth, imp_sth_t *imp_sth,
                SV *param, SV *value, IV sql_type, SV *attribs,
                int is_inout, IV maxlen));


/* prototypes for module-specific functions */
int      syb_thread_enabled _((void));
int      syb_set_timeout _((int timeout));
int      syb_db_date_fmt _((SV *, imp_dbh_t *, char *));

SV *     syb_set_cslib_cb ( SV *cb);


#endif /* defined Sybase_h */

/* end of Sybase.h */