]> git.stg.codes - stg.git/blob - stglibs/ibpp.lib/ibase.h
Додано приведення типу
[stg.git] / stglibs / ibpp.lib / ibase.h
1 /*\r
2  *      MODULE:         ibase.h\r
3  *      DESCRIPTION:    OSRI entrypoints and defines\r
4  *\r
5  * The contents of this file are subject to the Interbase Public\r
6  * License Version 1.0 (the "License"); you may not use this file\r
7  * except in compliance with the License. You may obtain a copy\r
8  * of the License at http://www.Inprise.com/IPL.html\r
9  *\r
10  * Software distributed under the License is distributed on an\r
11  * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express\r
12  * or implied. See the License for the specific language governing\r
13  * rights and limitations under the License.\r
14  *\r
15  * The Original Code was created by Inprise Corporation\r
16  * and its predecessors. Portions created by Inprise Corporation are\r
17  * Copyright (C) Inprise Corporation.\r
18  *\r
19  * All Rights Reserved.\r
20  * Contributor(s): ______________________________________.\r
21  * Added TCP_NO_DELAY option for superserver on Linux\r
22  * FSG 16.03.2001\r
23  * 2001.07.28: John Bellardo:  Added blr_skip\r
24  * 2001.09.18: Ann Harrison:   New info codes\r
25  * 17-Oct-2001 Mike Nordell: CPU affinity\r
26  * 2001-04-16 Paul Beach: ISC_TIME_SECONDS_PRECISION_SCALE modified for HP10\r
27  * Compiler Compatibility\r
28  * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete ports:\r
29  *                          - EPSON, XENIX, MAC (MAC_AUX), Cray and OS/2\r
30  * 2002.10.29 Nickolay Samofatov: Added support for savepoints\r
31  *\r
32  * 2002.10.29 Sean Leyne - Removed support for obsolete IPX/SPX Protocol\r
33  *\r
34  */\r
35 /*\r
36 $Id: ibase.h,v 1.2 2007/05/17 08:39:25 faust Exp $\r
37  */\r
38 \r
39 #ifndef JRD_IBASE_H\r
40 #define JRD_IBASE_H\r
41 \r
42 \r
43 /*\r
44  *\r
45  *  The contents of this file are subject to the Mozilla Public\r
46  *  License Version 1.1 (the "License"); you may not use this file\r
47  *  except in compliance with the License. You may obtain a copy of\r
48  *  the License at http://www.mozilla.org/MPL/\r
49  *  Alternatively, the contents of this file may be used under the\r
50  *  terms of the GNU General Public License Version 2 or later (the\r
51  *  "GPL"), in which case the provisions of the GPL are applicable\r
52  *  instead of those above. You may obtain a copy of the Licence at\r
53  *  http://www.gnu.org/copyleft/gpl.html\r
54  *\r
55  *  This program is distributed in the hope that it will be useful,\r
56  *   but WITHOUT ANY WARRANTY; without even the implied warranty of\r
57  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
58  *    Relevant for more details.\r
59  *\r
60  *    This file was created by members of the firebird development team.\r
61  *    All individual contributions remain the Copyright (C) of those\r
62  *    individuals.  Contributors to this file are either listed here or\r
63  *    can be obtained from a CVS history command.\r
64  *\r
65  *   All rights reserved.\r
66  *\r
67  *   Contributor(s):\r
68  *       Mike Nordel <tamlin@algonet.se>\r
69  *       Mark O'Donohue <mark.odonohue@ludwig.edu.au>\r
70  *\r
71  *\r
72  *  $Id: ibase.h,v 1.2 2007/05/17 08:39:25 faust Exp $\r
73  *\r
74  * 2002.02.15 Sean Leyne - Code Cleanup, removed obsolete "OS/2" port\r
75  *\r
76  */\r
77 \r
78 \r
79 #ifndef INCLUDE_FB_TYPES_H\r
80 #define INCLUDE_FB_TYPES_H\r
81 \r
82 \r
83 /******************************************************************/\r
84 /* Define type, export and other stuff based on c/c++ and Windows */\r
85 /******************************************************************/\r
86 \r
87 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)\r
88 #ifndef __GNUC__\r
89 typedef __int64                         ISC_INT64;\r
90 typedef unsigned __int64        ISC_UINT64;\r
91 #define  ISC_INT64_DEFINED\r
92 #endif\r
93 #define  ISC_EXPORT     __stdcall\r
94 #define  ISC_EXPORT_VARARG      __cdecl\r
95 #else\r
96 #define  ISC_EXPORT\r
97 #define  ISC_EXPORT_VARARG\r
98 #endif\r
99 \r
100 /*******************************************************************/\r
101 /* 64 bit Integers                                                 */\r
102 /*******************************************************************/\r
103 \r
104 #ifdef  ISC_INT64_DEFINED\r
105 #undef  ISC_INT64_DEFINED\r
106 #else\r
107 typedef long long int                   ISC_INT64;\r
108 typedef unsigned long long int  ISC_UINT64;\r
109 #endif\r
110 \r
111 // Nickolay: it is easier to assume that integer is at least 32-bit.\r
112 // This comes from limitation that we cannot reliably detect datatype size at\r
113 // compile time in cases when we do not control compilation (public headers) \r
114 // We are not going to support 16-bit platforms, right?\r
115 //\r
116 // Temporarly restrict new definition until ULONG clash with Windows\r
117 // type is solved. Win64 port is not possible before that point.\r
118 // Cannot use SIZEOF_LONG define here because we are in a public header\r
119 #if defined(_LP64) || defined(__LP64__) || defined(__arch64__)\r
120         /* EKU: Firebird requires (S)LONG to be 32 bit */\r
121 #   define LONG_DEFINED\r
122     typedef int SLONG;\r
123     typedef unsigned int ULONG;\r
124 #endif /* SIZEOF_LONG == 8 */\r
125 \r
126 \r
127 \r
128 /* Basic data types */\r
129 \r
130 \r
131 #ifdef NOT_USED_OR_REPLACED\r
132 typedef signed char SCHAR;\r
133 #else\r
134 /* TMN: TODO It seems SCHAR is used just about *everywhere* where a plain\r
135  * "char" is really intended. This currently forces us to this bad definition.\r
136  */\r
137 typedef char SCHAR;\r
138 #endif\r
139 \r
140 \r
141 typedef unsigned char UCHAR;\r
142 typedef short SSHORT;\r
143 typedef unsigned short USHORT;\r
144 \r
145 \r
146 #ifndef LONG_DEFINED                    /* 32 bit */\r
147 typedef long SLONG;\r
148 typedef unsigned long ULONG;\r
149 #else\r
150 #undef LONG_DEFINED\r
151 #endif\r
152 \r
153 \r
154 #ifndef SQUAD_DEFINED                   /* 64 bit */\r
155 typedef struct {\r
156         SLONG high;\r
157         ULONG low;\r
158 } SQUAD;\r
159 #endif\r
160 \r
161 \r
162 #ifndef DEFINED_GDS_QUAD\r
163 #define DEFINED_GDS_QUAD\r
164 struct GDS_QUAD_t {\r
165         SLONG gds_quad_high;\r
166         ULONG gds_quad_low;\r
167 };\r
168 \r
169 typedef struct GDS_QUAD_t GDS_QUAD;\r
170 \r
171 #endif /* DEFINED_GDS_QUAD */\r
172 \r
173 //\r
174 // TMN: some misc data types from all over the place\r
175 //\r
176 struct vary\r
177 {\r
178         USHORT vary_length;\r
179         char   vary_string[1];\r
180 };\r
181 // TMN: Currently we can't do this, since remote uses a different\r
182 // definition of VARY than the rest of the code! :-<\r
183 //typedef vary* VARY;\r
184 \r
185 struct lstring\r
186 {\r
187         ULONG   lstr_length;\r
188         ULONG   lstr_allocated;\r
189         UCHAR*  lstr_address;\r
190 };\r
191 typedef struct lstring LSTRING;\r
192 \r
193 \r
194 typedef unsigned char BOOLEAN;\r
195 typedef char TEXT;                              // To be expunged over time\r
196 //typedef unsigned char STEXT;  Signed text - not used\r
197 //typedef unsigned char UTEXT;  Unsigned text - not used\r
198 typedef unsigned char BYTE;             // Unsigned byte - common\r
199 //typedef char SBYTE;                   Signed byte - not used\r
200 typedef long ISC_STATUS;\r
201 typedef long IPTR;\r
202 typedef unsigned long U_IPTR;\r
203 typedef void (*FPTR_VOID) ();\r
204 typedef void (*FPTR_VOID_PTR) (void *);\r
205 typedef int (*FPTR_INT) ();\r
206 typedef int (*FPTR_INT_VOID_PTR) (void *);\r
207 typedef ULONG RCRD_OFFSET;\r
208 typedef USHORT FLD_LENGTH;\r
209 typedef int (*lock_ast_t)(void *);\r
210 \r
211 typedef IPTR FB_THREAD_ID;\r
212 \r
213 #define ISC_STATUS_LENGTH       20\r
214 typedef ISC_STATUS ISC_STATUS_ARRAY[ISC_STATUS_LENGTH];\r
215 \r
216 /* Number of elements in an arry */\r
217 #define FB_NELEM(x)     ((int)(sizeof(x) / sizeof(x[0])))\r
218 #define FB_ALIGN(n,b) ((n+b-1)&~(b-1))\r
219 \r
220 #endif /* INCLUDE_FB_TYPES_H */\r
221 \r
222 #define FB_API_VER 15\r
223 #define isc_version4\r
224 \r
225 #define  ISC_TRUE       1\r
226 #define  ISC_FALSE      0\r
227 #if !(defined __cplusplus)\r
228 #define  ISC__TRUE      ISC_TRUE\r
229 #define  ISC__FALSE     ISC_FALSE\r
230 #endif\r
231 \r
232 #define ISC_FAR\r
233 \r
234 // It is difficult to detect 64-bit long from the redistributable header\r
235 // we do not care of 16-bit platforms anymore thus we may use plain "int"\r
236 // which is 32-bit on all platforms we support\r
237 #if defined(_LP64) || defined(__LP64__) || defined(__arch64__)\r
238 typedef int             ISC_LONG;\r
239 typedef unsigned int    ISC_ULONG;\r
240 #else\r
241 typedef signed long     ISC_LONG;\r
242 typedef unsigned long   ISC_ULONG;\r
243 #endif\r
244 \r
245 typedef signed short    ISC_SHORT;\r
246 typedef unsigned short  ISC_USHORT;\r
247 \r
248 typedef unsigned char   ISC_UCHAR;\r
249 \r
250 #define  DSQL_close     1\r
251 #define  DSQL_drop      2\r
252 \r
253 \r
254 /********************************/\r
255 /* InterBase Handle Definitions */\r
256 /********************************/\r
257 \r
258 #ifndef JRD_Y_REF_H\r
259 #define FRBRD void\r
260 #endif\r
261 \r
262 typedef FRBRD * isc_att_handle;\r
263 typedef FRBRD * isc_blob_handle;\r
264 typedef FRBRD * isc_db_handle;\r
265 typedef FRBRD * isc_req_handle;\r
266 typedef FRBRD * isc_stmt_handle;\r
267 typedef FRBRD * isc_svc_handle;\r
268 typedef FRBRD * isc_tr_handle;\r
269 typedef void (* isc_callback) ();\r
270 typedef ISC_LONG isc_resv_handle;\r
271 \r
272 /*******************************************************************/\r
273 /* Time & Date Support                                             */\r
274 /*******************************************************************/\r
275 \r
276 #ifndef ISC_TIMESTAMP_DEFINED\r
277 typedef int                     ISC_DATE;\r
278 typedef unsigned int    ISC_TIME;\r
279 typedef struct\r
280 {\r
281         ISC_DATE timestamp_date;\r
282         ISC_TIME timestamp_time;\r
283 } ISC_TIMESTAMP;\r
284 #define ISC_TIMESTAMP_DEFINED\r
285 #endif  /* ISC_TIMESTAMP_DEFINED */\r
286 \r
287 #define ISC_TIME_SECONDS_PRECISION          10000L\r
288 #define ISC_TIME_SECONDS_PRECISION_SCALE    (-4)\r
289 \r
290 /*******************************************************************/\r
291 /* Blob id structure                                               */\r
292 /*******************************************************************/\r
293 \r
294 #if !(defined __cplusplus)\r
295 typedef GDS_QUAD GDS__QUAD;\r
296 #endif /* !(defined __cplusplus) */\r
297 \r
298 typedef struct GDS_QUAD_t ISC_QUAD;\r
299 \r
300 #define isc_quad_high   gds_quad_high\r
301 #define isc_quad_low    gds_quad_low\r
302 \r
303 typedef struct\r
304 {\r
305         short array_bound_lower;\r
306         short array_bound_upper;\r
307 } ISC_ARRAY_BOUND;\r
308 \r
309 typedef struct\r
310 {\r
311         unsigned char   array_desc_dtype;\r
312         char                    array_desc_scale;\r
313         unsigned short  array_desc_length;\r
314         char                    array_desc_field_name[32];\r
315         char                    array_desc_relation_name[32];\r
316         short                   array_desc_dimensions;\r
317         short                   array_desc_flags;\r
318         ISC_ARRAY_BOUND array_desc_bounds[16];\r
319 } ISC_ARRAY_DESC;\r
320 \r
321 typedef struct\r
322 {\r
323         short                   blob_desc_subtype;\r
324         short                   blob_desc_charset;\r
325         short                   blob_desc_segment_size;\r
326         unsigned char   blob_desc_field_name[32];\r
327         unsigned char   blob_desc_relation_name[32];\r
328 } ISC_BLOB_DESC;\r
329 \r
330 \r
331 \r
332 /***************************/\r
333 /* Blob control structure  */\r
334 /***************************/\r
335 \r
336 typedef struct isc_blob_ctl\r
337 {\r
338         ISC_STATUS      (* ctl_source)();       /* Source filter */\r
339         struct isc_blob_ctl *   ctl_source_handle;      /* Argument to pass to source filter */\r
340         short                                   ctl_to_sub_type;                /* Target type */\r
341         short                                   ctl_from_sub_type;              /* Source type */\r
342         unsigned short                  ctl_buffer_length;              /* Length of buffer */\r
343         unsigned short                  ctl_segment_length;             /* Length of current segment */\r
344         unsigned short                  ctl_bpb_length;                 /* Length of blob parameter  block */\r
345         char *                                  ctl_bpb;                                /* Address of blob parameter block */\r
346         unsigned char *                 ctl_buffer;                             /* Address of segment buffer */\r
347         ISC_LONG                                ctl_max_segment;                /* Length of longest segment */\r
348         ISC_LONG                                ctl_number_segments;    /* Total number of segments */\r
349         ISC_LONG                                ctl_total_length;               /* Total length of blob */\r
350         ISC_STATUS *                    ctl_status;                             /* Address of status vector */\r
351         long                                    ctl_data[8];                    /* Application specific data */\r
352 } * ISC_BLOB_CTL;\r
353 \r
354 /***************************/\r
355 /* Blob stream definitions */\r
356 /***************************/\r
357 \r
358 typedef struct bstream\r
359 {\r
360         isc_blob_handle bstr_blob;              /* Blob handle */\r
361         char *                  bstr_buffer;    /* Address of buffer */\r
362         char *                  bstr_ptr;               /* Next character */\r
363         short                   bstr_length;    /* Length of buffer */\r
364         short                   bstr_cnt;               /* Characters in buffer */\r
365         char                    bstr_mode;              /* (mode) ? OUTPUT : INPUT */\r
366 } BSTREAM;\r
367 \r
368 /* Three ugly macros, one even using octal radix... sigh... */\r
369 #define getb(p) (--(p)->bstr_cnt >= 0 ? *(p)->bstr_ptr++ & 0377: BLOB_get (p))\r
370 #define putb(x,p) (((x) == '\n' || (!(--(p)->bstr_cnt))) ? BLOB_put ((x),p) : ((int) (*(p)->bstr_ptr++ = (unsigned) (x))))\r
371 #define putbx(x,p) ((!(--(p)->bstr_cnt)) ? BLOB_put ((x),p) : ((int) (*(p)->bstr_ptr++ = (unsigned) (x))))\r
372 \r
373 \r
374 /********************************************************************/\r
375 /* CVC: Public blob interface definition held in val.h.             */\r
376 /* For some unknown reason, it was only documented in langRef       */\r
377 /* and being the structure passed by the engine to UDFs it never    */\r
378 /* made its way into this public definitions file.                  */\r
379 /* Being its original name "blob", I renamed it blobcallback here.  */\r
380 /* I did the full definition with the proper parameters instead of  */\r
381 /* the weak C declaration with any number and type of parameters.   */\r
382 /* Since the first parameter -BLB- is unknown outside the engine,   */\r
383 /* it's more accurate to use void* than int* as the blob pointer    */\r
384 /********************************************************************/\r
385 \r
386 #if !defined(JRD_VAL_H) && !defined(REQUESTER)\r
387 /* Blob passing structure */\r
388 \r
389 enum lseek_mode {blb_seek_relative = 1, blb_seek_from_tail = 2};\r
390 \r
391 typedef struct blobcallback {\r
392     short ( *blob_get_segment)\r
393                 (void * hnd, unsigned char* buffer, ISC_USHORT buf_size, ISC_USHORT* result_len);\r
394     void                        *blob_handle;\r
395     ISC_LONG    blob_number_segments;\r
396     ISC_LONG    blob_max_segment;\r
397     ISC_LONG    blob_total_length;\r
398     void ( *blob_put_segment)\r
399                 (void * hnd, unsigned char* buffer, ISC_USHORT buf_size);\r
400     ISC_LONG ( *blob_lseek)\r
401                 (void * hnd, ISC_USHORT mode, ISC_LONG offset);\r
402 }  *BLOBCALLBACK;\r
403 #endif /* !defined(JRD_VAL_H) && !defined(REQUESTER) */\r
404 \r
405 \r
406 \r
407 /********************************************************************/\r
408 /* CVC: Public descriptor interface held in dsc.h.                  */\r
409 /* We need it documented to be able to recognize NULL in UDFs.      */\r
410 /* Being its original name "dsc", I renamed it paramdsc here.       */\r
411 /* Notice that I adjust to the original definition: contrary to     */\r
412 /* other cases, the typedef is the same struct not the pointer.     */\r
413 /* I included the enumeration of dsc_dtype possible values.         */\r
414 /* Ultimately, dsc.h should be part of the public interface.        */\r
415 /********************************************************************/\r
416 \r
417 #if !defined(JRD_DSC_H)\r
418 /* This is the famous internal descriptor that UDFs can use, too. */\r
419 typedef struct paramdsc {\r
420     unsigned char       dsc_dtype;\r
421     signed char         dsc_scale;\r
422     ISC_USHORT          dsc_length;\r
423     short               dsc_sub_type;\r
424     ISC_USHORT          dsc_flags;\r
425     unsigned char       *dsc_address;\r
426 } PARAMDSC;\r
427 \r
428 #if !defined(JRD_VAL_H)\r
429 /* This is a helper struct to work with varchars. */\r
430 typedef struct paramvary {\r
431     ISC_USHORT          vary_length;\r
432     unsigned char       vary_string [1];\r
433 } PARAMVARY;\r
434 #endif /* !defined(JRD_VAL_H) */\r
435 \r
436 /* values for dsc_flags */\r
437 /* Note: DSC_null is only reliably set for local variables\r
438    (blr_variable) */\r
439 #define DSC_null                1\r
440 #define DSC_no_subtype          2       /* dsc has no sub type specified */\r
441 #define DSC_nullable            4       /* not stored. instead, is derived\r
442                                         from metadata primarily to flag\r
443                                         SQLDA (in DSQL)               */\r
444 \r
445 /* Overload text typing information into the dsc_sub_type field.\r
446    See intl.h for definitions of text types */ \r
447 \r
448 #ifndef dsc_ttype\r
449 #define dsc_ttype       dsc_sub_type\r
450 #endif\r
451 \r
452 \r
453 /* Note that dtype_null actually means that we do not yet know the\r
454    dtype for this descriptor.  A nice cleanup item would be to globally\r
455    change it to dtype_unknown.  --chrisj 1999-02-17 */\r
456 \r
457 #define dtype_null      0\r
458 #define dtype_text      1\r
459 #define dtype_cstring   2\r
460 #define dtype_varying   3\r
461 \r
462 #define dtype_packed    6\r
463 #define dtype_byte      7\r
464 #define dtype_short     8\r
465 #define dtype_long      9\r
466 #define dtype_quad      10\r
467 #define dtype_real      11\r
468 #define dtype_double    12\r
469 #define dtype_d_float   13\r
470 #define dtype_sql_date  14\r
471 #define dtype_sql_time  15\r
472 #define dtype_timestamp 16\r
473 #define dtype_blob      17\r
474 #define dtype_array     18\r
475 #define dtype_int64     19\r
476 #define DTYPE_TYPE_MAX  20\r
477 #endif /* !defined(JRD_DSC_H) */\r
478 \r
479 \r
480 /***************************/\r
481 /* Dynamic SQL definitions */\r
482 /***************************/\r
483 \r
484 /******************************/\r
485 /* Declare the extended SQLDA */\r
486 /******************************/\r
487 \r
488 #ifndef FB_SQLDA\r
489 \r
490 typedef struct\r
491 {\r
492         short                   sqltype;                        /* datatype of field */\r
493         short                   sqlscale;                       /* scale factor */\r
494         short                   sqlsubtype;                     /* datatype subtype - BLOBs & Text types only */\r
495         short                   sqllen;                         /* length of data area */\r
496         char *                  sqldata;                        /* address of data */\r
497         short *                 sqlind;                         /* address of indicator variable */\r
498         short                   sqlname_length;         /* length of sqlname field */\r
499         char                    sqlname[32];            /* name of field, name length + space for NULL */\r
500         short                   relname_length;         /* length of relation name */\r
501         char                    relname[32];            /* field's relation name + space for NULL */\r
502         short                   ownname_length;         /* length of owner name */\r
503         char                    ownname[32];            /* relation's owner name + space for  NULL */\r
504         short                   aliasname_length;       /* length of alias name */\r
505         char                    aliasname[32];          /* relation's alias name + space for NULL */\r
506 } XSQLVAR;\r
507 \r
508 typedef struct\r
509 {\r
510         short           version;                        /* version of this XSQLDA */\r
511         char            sqldaid[8];                     /* XSQLDA name field */\r
512         ISC_LONG        sqldabc;                        /* length in bytes of SQLDA */\r
513         short           sqln;                           /* number of fields allocated */\r
514         short           sqld;                           /* actual number of fields */\r
515         XSQLVAR         sqlvar[1];                      /* first field address */\r
516 } XSQLDA;\r
517 \r
518 #define XSQLDA_LENGTH(n)        (sizeof (XSQLDA) + ((n)-1) * sizeof (XSQLVAR))\r
519 \r
520 #define SQLDA_VERSION1                          1\r
521 \r
522 #define SQL_DIALECT_V5                          1       /* meaning is same as DIALECT_xsqlda */\r
523 #define SQL_DIALECT_V6_TRANSITION       2       /* flagging anything that is delimited\r
524                                                                                    by double quotes as an error and\r
525                                                                                    flagging keyword DATE as an error */\r
526 #define SQL_DIALECT_V6                          3       /* supports SQL delimited identifier,\r
527                                                                                    SQLDATE/DATE, TIME, TIMESTAMP,\r
528                                                                                    CURRENT_DATE, CURRENT_TIME,\r
529                                                                                    CURRENT_TIMESTAMP, and 64-bit exact\r
530                                                                                    numeric type */\r
531 #define SQL_DIALECT_CURRENT             SQL_DIALECT_V6  /* latest IB DIALECT */\r
532 \r
533 \r
534 #define FB_SQLDA\r
535 #endif\r
536 \r
537 /***************************/\r
538 /* OSRI database functions */\r
539 /***************************/\r
540 \r
541 #ifdef __cplusplus\r
542 extern "C" {\r
543 #endif\r
544 \r
545 ISC_STATUS ISC_EXPORT isc_attach_database(ISC_STATUS *,\r
546                                                                                   short,\r
547                                                                                   char *,\r
548                                                                                   isc_db_handle *,\r
549                                                                                   short,\r
550                                                                                   char *);\r
551 \r
552 ISC_STATUS ISC_EXPORT isc_array_gen_sdl(ISC_STATUS *,\r
553                                                                                 ISC_ARRAY_DESC *,\r
554                                                                                 short *,\r
555                                                                                 char *,\r
556                                                                                 short *);\r
557 \r
558 ISC_STATUS ISC_EXPORT isc_array_get_slice(ISC_STATUS *,\r
559                                                                                   isc_db_handle *,\r
560                                                                                   isc_tr_handle *,\r
561                                                                                   ISC_QUAD *,\r
562                                                                                   ISC_ARRAY_DESC *,\r
563                                                                                   void *,\r
564                                                                                   ISC_LONG *);\r
565 \r
566 ISC_STATUS ISC_EXPORT isc_array_lookup_bounds(ISC_STATUS *,\r
567                                                                                           isc_db_handle *,\r
568                                                                                           isc_tr_handle *,\r
569                                                                                           char *,\r
570                                                                                           char *,\r
571                                                                                           ISC_ARRAY_DESC *);\r
572 \r
573 ISC_STATUS ISC_EXPORT isc_array_lookup_desc(ISC_STATUS *,\r
574                                                                                         isc_db_handle *,\r
575                                                                                         isc_tr_handle *,\r
576                                                                                         char *,\r
577                                                                                         char *,\r
578                                                                                         ISC_ARRAY_DESC *);\r
579 \r
580 ISC_STATUS ISC_EXPORT isc_array_set_desc(ISC_STATUS *,\r
581                                                                                  char *,\r
582                                                                                  char *,\r
583                                                                                  short *,\r
584                                                                                  short *,\r
585                                                                                  short *,\r
586                                                                                  ISC_ARRAY_DESC *);\r
587 \r
588 ISC_STATUS ISC_EXPORT isc_array_put_slice(ISC_STATUS *,\r
589                                                                                   isc_db_handle *,\r
590                                                                                   isc_tr_handle *,\r
591                                                                                   ISC_QUAD *,\r
592                                                                                   ISC_ARRAY_DESC *,\r
593                                                                                   void *,\r
594                                                                                   ISC_LONG *);\r
595 \r
596 void ISC_EXPORT isc_blob_default_desc(ISC_BLOB_DESC *,\r
597                                                                           unsigned char *,\r
598                                                                           unsigned char *);\r
599 \r
600 ISC_STATUS ISC_EXPORT isc_blob_gen_bpb(ISC_STATUS *,\r
601                                                                            ISC_BLOB_DESC *,\r
602                                                                            ISC_BLOB_DESC *,\r
603                                                                            unsigned short,\r
604                                                                            unsigned char *,\r
605                                                                            unsigned short *);\r
606 \r
607 ISC_STATUS ISC_EXPORT isc_blob_info(ISC_STATUS *,\r
608                                                                         isc_blob_handle *,\r
609                                                                         short,\r
610                                                                         char *,\r
611                                                                         short,\r
612                                                                         char *);\r
613 \r
614 ISC_STATUS ISC_EXPORT isc_blob_lookup_desc(ISC_STATUS *,\r
615                                                                                    isc_db_handle *,\r
616                                                                                    isc_tr_handle *,\r
617                                                                                    unsigned char *,\r
618                                                                                    unsigned char *,\r
619                                                                                    ISC_BLOB_DESC *,\r
620                                                                                    unsigned char *);\r
621 \r
622 ISC_STATUS ISC_EXPORT isc_blob_set_desc(ISC_STATUS *,\r
623                                                                                 unsigned char *,\r
624                                                                                 unsigned char *,\r
625                                                                                 short,\r
626                                                                                 short,\r
627                                                                                 short,\r
628                                                                                 ISC_BLOB_DESC *);\r
629 \r
630 ISC_STATUS ISC_EXPORT isc_cancel_blob(ISC_STATUS *,\r
631                                                                           isc_blob_handle *);\r
632 \r
633 ISC_STATUS ISC_EXPORT isc_cancel_events(ISC_STATUS *,\r
634                                                                                 isc_db_handle *,\r
635                                                                                 ISC_LONG *);\r
636 \r
637 ISC_STATUS ISC_EXPORT isc_close_blob(ISC_STATUS *,\r
638                                                                          isc_blob_handle *);\r
639 \r
640 ISC_STATUS ISC_EXPORT isc_commit_retaining(ISC_STATUS *,\r
641                                                                                    isc_tr_handle *);\r
642 \r
643 ISC_STATUS ISC_EXPORT isc_commit_transaction(ISC_STATUS *,\r
644                                                                                          isc_tr_handle *);\r
645 \r
646 ISC_STATUS ISC_EXPORT isc_create_blob(ISC_STATUS *,\r
647                                                                           isc_db_handle *,\r
648                                                                           isc_tr_handle *,\r
649                                                                           isc_blob_handle *,\r
650                                                                           ISC_QUAD *);\r
651 \r
652 ISC_STATUS ISC_EXPORT isc_create_blob2(ISC_STATUS *,\r
653                                                                            isc_db_handle *,\r
654                                                                            isc_tr_handle *,\r
655                                                                            isc_blob_handle *,\r
656                                                                            ISC_QUAD *,\r
657                                                                            short,\r
658                                                                            char *);\r
659 \r
660 ISC_STATUS ISC_EXPORT isc_create_database(ISC_STATUS *,\r
661                                                                                   short,\r
662                                                                                   char *,\r
663                                                                                   isc_db_handle *,\r
664                                                                                   short,\r
665                                                                                   char *,\r
666                                                                                   short);\r
667 \r
668 ISC_STATUS ISC_EXPORT isc_database_info(ISC_STATUS *,\r
669                                                                                 isc_db_handle *,\r
670                                                                                 short,\r
671                                                                                 char *,\r
672                                                                                 short,\r
673                                                                                 char *);\r
674 \r
675 void ISC_EXPORT isc_decode_date(ISC_QUAD *,\r
676                                                                 void *);\r
677 \r
678 void ISC_EXPORT isc_decode_sql_date(ISC_DATE *,\r
679                                                                         void *);\r
680 \r
681 void ISC_EXPORT isc_decode_sql_time(ISC_TIME *,\r
682                                                                         void *);\r
683 \r
684 void ISC_EXPORT isc_decode_timestamp(ISC_TIMESTAMP *,\r
685                                                                          void *);\r
686 \r
687 ISC_STATUS ISC_EXPORT isc_detach_database(ISC_STATUS *,\r
688                                                                                   isc_db_handle *);\r
689 \r
690 ISC_STATUS ISC_EXPORT isc_drop_database(ISC_STATUS *,\r
691                                                                                 isc_db_handle *);\r
692 \r
693 ISC_STATUS ISC_EXPORT isc_dsql_allocate_statement(ISC_STATUS *,\r
694                                                                                                   isc_db_handle *,\r
695                                                                                                   isc_stmt_handle *);\r
696 \r
697 ISC_STATUS ISC_EXPORT isc_dsql_alloc_statement2(ISC_STATUS *,\r
698                                                                                                 isc_db_handle *,\r
699                                                                                                 isc_stmt_handle *);\r
700 \r
701 ISC_STATUS ISC_EXPORT isc_dsql_describe(ISC_STATUS *,\r
702                                                                                 isc_stmt_handle *,\r
703                                                                                 unsigned short,\r
704                                                                                 XSQLDA *);\r
705 \r
706 ISC_STATUS ISC_EXPORT isc_dsql_describe_bind(ISC_STATUS *,\r
707                                                                                          isc_stmt_handle *,\r
708                                                                                          unsigned short,\r
709                                                                                          XSQLDA *);\r
710 \r
711 ISC_STATUS ISC_EXPORT isc_dsql_exec_immed2(ISC_STATUS *,\r
712                                                                                    isc_db_handle *,\r
713                                                                                    isc_tr_handle *,\r
714                                                                                    unsigned short,\r
715                                                                                    char *,\r
716                                                                                    unsigned short,\r
717                                                                                    XSQLDA *,\r
718                                                                                    XSQLDA *);\r
719 \r
720 ISC_STATUS ISC_EXPORT isc_dsql_execute(ISC_STATUS *,\r
721                                                                            isc_tr_handle *,\r
722                                                                            isc_stmt_handle *,\r
723                                                                            unsigned short,\r
724                                                                            XSQLDA *);\r
725 \r
726 ISC_STATUS ISC_EXPORT isc_dsql_execute2(ISC_STATUS *,\r
727                                                                                 isc_tr_handle *,\r
728                                                                                 isc_stmt_handle *,\r
729                                                                                 unsigned short,\r
730                                                                                 XSQLDA *,\r
731                                                                                 XSQLDA *);\r
732 \r
733 ISC_STATUS ISC_EXPORT isc_dsql_execute_immediate(ISC_STATUS *,\r
734                                                                                                  isc_db_handle *,\r
735                                                                                                  isc_tr_handle *,\r
736                                                                                                  unsigned short,\r
737                                                                                                  char *,\r
738                                                                                                  unsigned short,\r
739                                                                                                  XSQLDA *);\r
740 \r
741 ISC_STATUS ISC_EXPORT isc_dsql_fetch(ISC_STATUS *,\r
742                                                                          isc_stmt_handle *,\r
743                                                                          unsigned short,\r
744                                                                          XSQLDA *);\r
745 \r
746 ISC_STATUS ISC_EXPORT isc_dsql_finish(isc_db_handle *);\r
747 \r
748 ISC_STATUS ISC_EXPORT isc_dsql_free_statement(ISC_STATUS *,\r
749                                                                                           isc_stmt_handle *,\r
750                                                                                           unsigned short);\r
751 \r
752 ISC_STATUS ISC_EXPORT isc_dsql_insert(ISC_STATUS *,\r
753                                                                           isc_stmt_handle *,\r
754                                                                           unsigned short,\r
755                                                                           XSQLDA *);\r
756 \r
757 ISC_STATUS ISC_EXPORT isc_dsql_prepare(ISC_STATUS *,\r
758                                                                            isc_tr_handle *,\r
759                                                                            isc_stmt_handle *,\r
760                                                                            unsigned short,\r
761                                                                            char *,\r
762                                                                            unsigned short,\r
763                                                                            XSQLDA *);\r
764 \r
765 ISC_STATUS ISC_EXPORT isc_dsql_set_cursor_name(ISC_STATUS *,\r
766                                                                                            isc_stmt_handle *,\r
767                                                                                            char *,\r
768                                                                                            unsigned short);\r
769 \r
770 ISC_STATUS ISC_EXPORT isc_dsql_sql_info(ISC_STATUS *,\r
771                                                                                 isc_stmt_handle *,\r
772                                                                                 short,\r
773                                                                                 const char *,\r
774                                                                                 short,\r
775                                                                                 char *);\r
776 \r
777 void ISC_EXPORT isc_encode_date(void *,\r
778                                                                 ISC_QUAD *);\r
779 \r
780 void ISC_EXPORT isc_encode_sql_date(void *,\r
781                                                                         ISC_DATE *);\r
782 \r
783 void ISC_EXPORT isc_encode_sql_time(void *,\r
784                                                                         ISC_TIME *);\r
785 \r
786 void ISC_EXPORT isc_encode_timestamp(void *,\r
787                                                                          ISC_TIMESTAMP *);\r
788 \r
789 ISC_LONG ISC_EXPORT_VARARG isc_event_block(char * *,\r
790                                                                                    char * *,\r
791                                                                                    unsigned short, ...);\r
792 \r
793 void ISC_EXPORT isc_event_counts(ISC_ULONG *,\r
794                                                                  short,\r
795                                                                  char *,\r
796                                                                  char *);\r
797 \r
798 /* 17 May 2001 - isc_expand_dpb is DEPRECATED */\r
799 void ISC_EXPORT_VARARG isc_expand_dpb(char * *,\r
800                                                                           short *, ...);\r
801 \r
802 int ISC_EXPORT isc_modify_dpb(char * *,\r
803                                                           short *,\r
804                                                           unsigned short,\r
805                                                           char *,\r
806                                                           short);\r
807 \r
808 ISC_LONG ISC_EXPORT isc_free(char *);\r
809 \r
810 ISC_STATUS ISC_EXPORT isc_get_segment(ISC_STATUS *,\r
811                                                                           isc_blob_handle *,\r
812                                                                           unsigned short *,\r
813                                                                           unsigned short,\r
814                                                                           char *);\r
815 \r
816 ISC_STATUS ISC_EXPORT isc_get_slice(ISC_STATUS *,\r
817                                                                         isc_db_handle *,\r
818                                                                         isc_tr_handle *,\r
819                                                                         ISC_QUAD *,\r
820                                                                         short,\r
821                                                                         char *,\r
822                                                                         short,\r
823                                                                         ISC_LONG *,\r
824                                                                         ISC_LONG,\r
825                                                                         void *,\r
826                                                                         ISC_LONG *);\r
827 \r
828 ISC_STATUS ISC_EXPORT isc_interprete(char *,\r
829                                                                          ISC_STATUS * *);\r
830 \r
831 ISC_STATUS ISC_EXPORT isc_open_blob(ISC_STATUS *,\r
832                                                                         isc_db_handle *,\r
833                                                                         isc_tr_handle *,\r
834                                                                         isc_blob_handle *,\r
835                                                                         ISC_QUAD *);\r
836 \r
837 ISC_STATUS ISC_EXPORT isc_open_blob2(ISC_STATUS *,\r
838                                                                          isc_db_handle *,\r
839                                                                          isc_tr_handle *,\r
840                                                                          isc_blob_handle *,\r
841                                                                          ISC_QUAD *,\r
842                                                                          ISC_USHORT,\r
843                                                                          ISC_UCHAR *);\r
844 \r
845 ISC_STATUS ISC_EXPORT isc_prepare_transaction2(ISC_STATUS *,\r
846                                                                                            isc_tr_handle *,\r
847                                                                                            ISC_USHORT,\r
848                                                                                            ISC_UCHAR *);\r
849 \r
850 void ISC_EXPORT isc_print_sqlerror(ISC_SHORT,\r
851                                                                    ISC_STATUS *);\r
852 \r
853 ISC_STATUS ISC_EXPORT isc_print_status(ISC_STATUS *);\r
854 \r
855 ISC_STATUS ISC_EXPORT isc_put_segment(ISC_STATUS *,\r
856                                                                           isc_blob_handle *,\r
857                                                                           unsigned short,\r
858                                                                           char *);\r
859 \r
860 ISC_STATUS ISC_EXPORT isc_put_slice(ISC_STATUS *,\r
861                                                                         isc_db_handle *,\r
862                                                                         isc_tr_handle *,\r
863                                                                         ISC_QUAD *,\r
864                                                                         short,\r
865                                                                         char *,\r
866                                                                         short,\r
867                                                                         ISC_LONG *,\r
868                                                                         ISC_LONG,\r
869                                                                         void *);\r
870 \r
871 ISC_STATUS ISC_EXPORT isc_que_events(ISC_STATUS *,\r
872                                                                          isc_db_handle *,\r
873                                                                          ISC_LONG *,\r
874                                                                          short,\r
875                                                                          char *,\r
876                                                                          isc_callback,\r
877                                                                          void *);\r
878 \r
879 ISC_STATUS ISC_EXPORT isc_rollback_retaining(ISC_STATUS *,\r
880                                                                                          isc_tr_handle *);\r
881 \r
882 ISC_STATUS ISC_EXPORT isc_rollback_transaction(ISC_STATUS *,\r
883                                                                                            isc_tr_handle *);\r
884 \r
885 ISC_STATUS ISC_EXPORT isc_start_multiple(ISC_STATUS *,\r
886                                                                                  isc_tr_handle *,\r
887                                                                                  short,\r
888                                                                                  void *);\r
889 \r
890 ISC_STATUS ISC_EXPORT_VARARG isc_start_transaction(ISC_STATUS *,\r
891                                                                                                    isc_tr_handle *,\r
892                                                                                                    short, ...);\r
893 \r
894 ISC_LONG ISC_EXPORT isc_sqlcode(ISC_STATUS *);\r
895 \r
896 void ISC_EXPORT isc_sql_interprete(short,\r
897                                                                    char *,\r
898                                                                    short);\r
899 \r
900 ISC_STATUS ISC_EXPORT isc_transaction_info(ISC_STATUS *,\r
901                                                                                    isc_tr_handle *,\r
902                                                                                    short,\r
903                                                                                    char *,\r
904                                                                                    short,\r
905                                                                                    char *);\r
906 \r
907 ISC_STATUS ISC_EXPORT isc_transact_request(ISC_STATUS *,\r
908                                                                                    isc_db_handle *,\r
909                                                                                    isc_tr_handle *,\r
910                                                                                    unsigned short,\r
911                                                                                    char *,\r
912                                                                                    unsigned short,\r
913                                                                                    char *,\r
914                                                                                    unsigned short,\r
915                                                                                    char *);\r
916 \r
917 ISC_LONG ISC_EXPORT isc_vax_integer(char *,\r
918                                                                         short);\r
919 \r
920 ISC_INT64 ISC_EXPORT isc_portable_integer(unsigned char *,\r
921                                                                                   short);\r
922 \r
923 /*************************************/\r
924 /* Security Functions and structures */\r
925 /*************************************/\r
926 \r
927 #define sec_uid_spec                0x01\r
928 #define sec_gid_spec                0x02\r
929 #define sec_server_spec             0x04\r
930 #define sec_password_spec           0x08\r
931 #define sec_group_name_spec         0x10\r
932 #define sec_first_name_spec         0x20\r
933 #define sec_middle_name_spec        0x40\r
934 #define sec_last_name_spec          0x80\r
935 #define sec_dba_user_name_spec      0x100\r
936 #define sec_dba_password_spec       0x200\r
937 \r
938 #define sec_protocol_tcpip            1\r
939 #define sec_protocol_netbeui          2\r
940 #define sec_protocol_spx              3 /* -- Deprecated Protocol. Declaration retained for compatibility   */\r
941 #define sec_protocol_local            4\r
942 \r
943 typedef struct {\r
944         short sec_flags;                        /* which fields are specified */\r
945         int uid;                                        /* the user's id */\r
946         int gid;                                        /* the user's group id */\r
947         int protocol;                           /* protocol to use for connection */\r
948         char *server;                           /* server to administer */\r
949         char *user_name;                        /* the user's name */\r
950         char *password;                         /* the user's password */\r
951         char *group_name;                       /* the group name */\r
952         char *first_name;                       /* the user's first name */\r
953         char *middle_name;                      /* the user's middle name */\r
954         char *last_name;                        /* the user's last name */\r
955         char *dba_user_name;            /* the dba user name */\r
956         char *dba_password;                     /* the dba password */\r
957 } USER_SEC_DATA;\r
958 \r
959 int ISC_EXPORT isc_add_user(ISC_STATUS *, USER_SEC_DATA *);\r
960 \r
961 int ISC_EXPORT isc_delete_user(ISC_STATUS *, USER_SEC_DATA *);\r
962 \r
963 int ISC_EXPORT isc_modify_user(ISC_STATUS *, USER_SEC_DATA *);\r
964 \r
965 /**********************************/\r
966 /*  Other OSRI functions          */\r
967 /**********************************/\r
968 \r
969 ISC_STATUS ISC_EXPORT isc_compile_request(ISC_STATUS *,\r
970                                                                                   isc_db_handle *,\r
971                                                                                   isc_req_handle *,\r
972                                                                                   short,\r
973                                                                                   char *);\r
974 \r
975 ISC_STATUS ISC_EXPORT isc_compile_request2(ISC_STATUS *,\r
976                                                                                    isc_db_handle *,\r
977                                                                                    isc_req_handle *,\r
978                                                                                    short,\r
979                                                                                    char *);\r
980 \r
981 ISC_STATUS ISC_EXPORT isc_ddl(ISC_STATUS *,\r
982                                                           isc_db_handle *,\r
983                                                           isc_tr_handle *,\r
984                                                           short,\r
985                                                           char *);\r
986 \r
987 ISC_STATUS ISC_EXPORT isc_prepare_transaction(ISC_STATUS *,\r
988                                                                                           isc_tr_handle *);\r
989 \r
990 \r
991 ISC_STATUS ISC_EXPORT isc_receive(ISC_STATUS *,\r
992                                                                   isc_req_handle *,\r
993                                                                   short,\r
994                                                                   short,\r
995                                                                   void *,\r
996                                                                   short);\r
997 \r
998 ISC_STATUS ISC_EXPORT isc_reconnect_transaction(ISC_STATUS *,\r
999                                                                                                 isc_db_handle *,\r
1000                                                                                                 isc_tr_handle *,\r
1001                                                                                                 short,\r
1002                                                                                                 char *);\r
1003 \r
1004 ISC_STATUS ISC_EXPORT isc_release_request(ISC_STATUS *,\r
1005                                                                                   isc_req_handle *);\r
1006 \r
1007 ISC_STATUS ISC_EXPORT isc_request_info(ISC_STATUS *,\r
1008                                                                            isc_req_handle *,\r
1009                                                                            short,\r
1010                                                                            short,\r
1011                                                                            char *,\r
1012                                                                            short,\r
1013                                                                            char *);\r
1014 \r
1015 ISC_STATUS ISC_EXPORT isc_seek_blob(ISC_STATUS *,\r
1016                                                                         isc_blob_handle *,\r
1017                                                                         short,\r
1018                                                                         ISC_LONG,\r
1019                                                                         ISC_LONG *);\r
1020 \r
1021 ISC_STATUS ISC_EXPORT isc_send(ISC_STATUS *,\r
1022                                                            isc_req_handle *,\r
1023                                                            short,\r
1024                                                            short,\r
1025                                                            void *,\r
1026                                                            short);\r
1027 \r
1028 ISC_STATUS ISC_EXPORT isc_start_and_send(ISC_STATUS *,\r
1029                                                                                  isc_req_handle *,\r
1030                                                                                  isc_tr_handle *,\r
1031                                                                                  short,\r
1032                                                                                  short,\r
1033                                                                                  void *,\r
1034                                                                                  short);\r
1035 \r
1036 ISC_STATUS ISC_EXPORT isc_start_request(ISC_STATUS *,\r
1037                                                                                 isc_req_handle *,\r
1038                                                                                 isc_tr_handle *,\r
1039                                                                                 short);\r
1040 \r
1041 ISC_STATUS ISC_EXPORT isc_unwind_request(ISC_STATUS *,\r
1042                                                                                  isc_tr_handle *,\r
1043                                                                                  short);\r
1044 \r
1045 ISC_STATUS ISC_EXPORT isc_wait_for_event(ISC_STATUS *,\r
1046                                                                                  isc_db_handle *,\r
1047                                                                                  short,\r
1048                                                                                  char *,\r
1049                                                                                  char *);\r
1050 \r
1051 \r
1052 /*****************************/\r
1053 /* Other Sql functions       */\r
1054 /*****************************/\r
1055 \r
1056 ISC_STATUS ISC_EXPORT isc_close(ISC_STATUS *,\r
1057                                                                 char *);\r
1058 \r
1059 ISC_STATUS ISC_EXPORT isc_declare(ISC_STATUS *,\r
1060                                                                   char *,\r
1061                                                                   char *);\r
1062 \r
1063 ISC_STATUS ISC_EXPORT isc_describe(ISC_STATUS *,\r
1064                                                                    char *,\r
1065                                                                    XSQLDA *);\r
1066 \r
1067 ISC_STATUS ISC_EXPORT isc_describe_bind(ISC_STATUS *,\r
1068                                                                                 char *,\r
1069                                                                                 XSQLDA *);\r
1070 \r
1071 ISC_STATUS ISC_EXPORT isc_execute(ISC_STATUS *,\r
1072                                                                   isc_tr_handle *,\r
1073                                                                   char *,\r
1074                                                                   XSQLDA *);\r
1075 \r
1076 ISC_STATUS ISC_EXPORT isc_execute_immediate(ISC_STATUS *,\r
1077                                                                                         isc_db_handle *,\r
1078                                                                                         isc_tr_handle *,\r
1079                                                                                         short *,\r
1080                                                                                         char *);\r
1081 \r
1082 ISC_STATUS ISC_EXPORT isc_fetch(ISC_STATUS *,\r
1083                                                                 char *,\r
1084                                                                 XSQLDA *);\r
1085 \r
1086 ISC_STATUS ISC_EXPORT isc_open(ISC_STATUS *,\r
1087                                                            isc_tr_handle *,\r
1088                                                            char *,\r
1089                                                            XSQLDA *);\r
1090 \r
1091 ISC_STATUS ISC_EXPORT isc_prepare(ISC_STATUS *,\r
1092                                                                   isc_db_handle *,\r
1093                                                                   isc_tr_handle *,\r
1094                                                                   char *,\r
1095                                                                   short *,\r
1096                                                                   char *,\r
1097                                                                   XSQLDA *);\r
1098 \r
1099 \r
1100 /*************************************/\r
1101 /* Other Dynamic sql functions       */\r
1102 /*************************************/\r
1103 \r
1104 ISC_STATUS ISC_EXPORT isc_dsql_execute_m(ISC_STATUS *,\r
1105                                                                                  isc_tr_handle *,\r
1106                                                                                  isc_stmt_handle *,\r
1107                                                                                  unsigned short,\r
1108                                                                                  char *,\r
1109                                                                                  unsigned short,\r
1110                                                                                  unsigned short,\r
1111                                                                                  char *);\r
1112 \r
1113 ISC_STATUS ISC_EXPORT isc_dsql_execute2_m(ISC_STATUS *,\r
1114                                                                                   isc_tr_handle *,\r
1115                                                                                   isc_stmt_handle *,\r
1116                                                                                   unsigned short,\r
1117                                                                                   char *,\r
1118                                                                                   unsigned short,\r
1119                                                                                   unsigned short,\r
1120                                                                                   char *,\r
1121                                                                                   unsigned short,\r
1122                                                                                   char *,\r
1123                                                                                   unsigned short,\r
1124                                                                                   unsigned short,\r
1125                                                                                   char *);\r
1126 \r
1127 ISC_STATUS ISC_EXPORT isc_dsql_execute_immediate_m(ISC_STATUS *,\r
1128                                                                                                    isc_db_handle *,\r
1129                                                                                                    isc_tr_handle *,\r
1130                                                                                                    unsigned short,\r
1131                                                                                                    char *,\r
1132                                                                                                    unsigned short,\r
1133                                                                                                    unsigned short,\r
1134                                                                                                    char *,\r
1135                                                                                                    unsigned short,\r
1136                                                                                                    unsigned short,\r
1137                                                                                                    char *);\r
1138 \r
1139 ISC_STATUS ISC_EXPORT isc_dsql_exec_immed3_m(ISC_STATUS *,\r
1140                                                                                          isc_db_handle *,\r
1141                                                                                          isc_tr_handle *,\r
1142                                                                                          unsigned short,\r
1143                                                                                          char *,\r
1144                                                                                          unsigned short,\r
1145                                                                                          unsigned short,\r
1146                                                                                          char *,\r
1147                                                                                          unsigned short,\r
1148                                                                                          unsigned short,\r
1149                                                                                          char *,\r
1150                                                                                          unsigned short,\r
1151                                                                                          char *,\r
1152                                                                                          unsigned short,\r
1153                                                                                          unsigned short,\r
1154                                                                                          char *);\r
1155 \r
1156 ISC_STATUS ISC_EXPORT isc_dsql_fetch_m(ISC_STATUS *,\r
1157                                                                            isc_stmt_handle *,\r
1158                                                                            unsigned short,\r
1159                                                                            char *,\r
1160                                                                            unsigned short,\r
1161                                                                            unsigned short,\r
1162                                                                            char *);\r
1163 \r
1164 ISC_STATUS ISC_EXPORT isc_dsql_insert_m(ISC_STATUS *,\r
1165                                                                                 isc_stmt_handle *,\r
1166                                                                                 unsigned short,\r
1167                                                                                 char *,\r
1168                                                                                 unsigned short,\r
1169                                                                                 unsigned short,\r
1170                                                                                 char *);\r
1171 \r
1172 ISC_STATUS ISC_EXPORT isc_dsql_prepare_m(ISC_STATUS *,\r
1173                                                                                  isc_tr_handle *,\r
1174                                                                                  isc_stmt_handle *,\r
1175                                                                                  unsigned short,\r
1176                                                                                  char *,\r
1177                                                                                  unsigned short,\r
1178                                                                                  unsigned short,\r
1179                                                                                  char *,\r
1180                                                                                  unsigned short,\r
1181                                                                                  char *);\r
1182 \r
1183 ISC_STATUS ISC_EXPORT isc_dsql_release(ISC_STATUS *,\r
1184                                                                            char *);\r
1185 \r
1186 ISC_STATUS ISC_EXPORT isc_embed_dsql_close(ISC_STATUS *,\r
1187                                                                                    char *);\r
1188 \r
1189 ISC_STATUS ISC_EXPORT isc_embed_dsql_declare(ISC_STATUS *,\r
1190                                                                                          char *,\r
1191                                                                                          char *);\r
1192 \r
1193 ISC_STATUS ISC_EXPORT isc_embed_dsql_describe(ISC_STATUS *,\r
1194                                                                                           char *,\r
1195                                                                                           unsigned short,\r
1196                                                                                           XSQLDA *);\r
1197 \r
1198 ISC_STATUS ISC_EXPORT isc_embed_dsql_describe_bind(ISC_STATUS *,\r
1199                                                                                                    char *,\r
1200                                                                                                    unsigned short,\r
1201                                                                                                    XSQLDA *);\r
1202 \r
1203 ISC_STATUS ISC_EXPORT isc_embed_dsql_execute(ISC_STATUS *,\r
1204                                                                                          isc_tr_handle *,\r
1205                                                                                          char *,\r
1206                                                                                          unsigned short,\r
1207                                                                                          XSQLDA *);\r
1208 \r
1209 ISC_STATUS ISC_EXPORT isc_embed_dsql_execute2(ISC_STATUS *,\r
1210                                                                                           isc_tr_handle *,\r
1211                                                                                           char *,\r
1212                                                                                           unsigned short,\r
1213                                                                                           XSQLDA *,\r
1214                                                                                           XSQLDA *);\r
1215 \r
1216 ISC_STATUS ISC_EXPORT isc_embed_dsql_execute_immed(ISC_STATUS *,\r
1217                                                                                                    isc_db_handle *,\r
1218                                                                                                    isc_tr_handle *,\r
1219                                                                                                    unsigned short,\r
1220                                                                                                    char *,\r
1221                                                                                                    unsigned short,\r
1222                                                                                                    XSQLDA *);\r
1223 \r
1224 ISC_STATUS ISC_EXPORT isc_embed_dsql_fetch(ISC_STATUS *,\r
1225                                                                                    char *,\r
1226                                                                                    unsigned short,\r
1227                                                                                    XSQLDA *);\r
1228 \r
1229 ISC_STATUS ISC_EXPORT isc_embed_dsql_open(ISC_STATUS *,\r
1230                                                                                   isc_tr_handle *,\r
1231                                                                                   char *,\r
1232                                                                                   unsigned short,\r
1233                                                                                   XSQLDA *);\r
1234 \r
1235 ISC_STATUS ISC_EXPORT isc_embed_dsql_open2(ISC_STATUS *,\r
1236                                                                                    isc_tr_handle *,\r
1237                                                                                    char *,\r
1238                                                                                    unsigned short,\r
1239                                                                                    XSQLDA *,\r
1240                                                                                    XSQLDA *);\r
1241 \r
1242 ISC_STATUS ISC_EXPORT isc_embed_dsql_insert(ISC_STATUS *,\r
1243                                                                                         char *,\r
1244                                                                                         unsigned short,\r
1245                                                                                         XSQLDA *);\r
1246 \r
1247 ISC_STATUS ISC_EXPORT isc_embed_dsql_prepare(ISC_STATUS *,\r
1248                                                                                          isc_db_handle *,\r
1249                                                                                          isc_tr_handle *,\r
1250                                                                                          char *,\r
1251                                                                                          unsigned short,\r
1252                                                                                          char *,\r
1253                                                                                          unsigned short,\r
1254                                                                                          XSQLDA *);\r
1255 \r
1256 ISC_STATUS ISC_EXPORT isc_embed_dsql_release(ISC_STATUS *,\r
1257                                                                                          char *);\r
1258 \r
1259 \r
1260 /******************************/\r
1261 /* Other Blob functions       */\r
1262 /******************************/\r
1263 \r
1264 BSTREAM *ISC_EXPORT BLOB_open(isc_blob_handle,\r
1265                                                                           char *,\r
1266                                                                           int);\r
1267 \r
1268 int ISC_EXPORT BLOB_put(char,\r
1269                                                 BSTREAM *);\r
1270 \r
1271 int ISC_EXPORT BLOB_close(BSTREAM *);\r
1272 \r
1273 int ISC_EXPORT BLOB_get(BSTREAM *);\r
1274 \r
1275 int ISC_EXPORT BLOB_display(ISC_QUAD *,\r
1276                                                         isc_db_handle,\r
1277                                                         isc_tr_handle,\r
1278                                                         char *);\r
1279 \r
1280 int ISC_EXPORT BLOB_dump(ISC_QUAD *,\r
1281                                                  isc_db_handle,\r
1282                                                  isc_tr_handle,\r
1283                                                  char *);\r
1284 \r
1285 int ISC_EXPORT BLOB_edit(ISC_QUAD *,\r
1286                                                  isc_db_handle,\r
1287                                                  isc_tr_handle,\r
1288                                                  char *);\r
1289 \r
1290 int ISC_EXPORT BLOB_load(ISC_QUAD *,\r
1291                                                  isc_db_handle,\r
1292                                                  isc_tr_handle,\r
1293                                                  char *);\r
1294 \r
1295 int ISC_EXPORT BLOB_text_dump(ISC_QUAD *,\r
1296                                                           isc_db_handle,\r
1297                                                           isc_tr_handle,\r
1298                                                           char *);\r
1299 \r
1300 int ISC_EXPORT BLOB_text_load(ISC_QUAD *,\r
1301                                                           isc_db_handle,\r
1302                                                           isc_tr_handle,\r
1303                                                           char *);\r
1304 \r
1305 BSTREAM *ISC_EXPORT Bopen(ISC_QUAD *,\r
1306                                                                   isc_db_handle,\r
1307                                                                   isc_tr_handle,\r
1308                                                                   char *);\r
1309 \r
1310 BSTREAM *ISC_EXPORT Bopen2(ISC_QUAD *,\r
1311                                                                    isc_db_handle,\r
1312                                                                    isc_tr_handle,\r
1313                                                                    char *,\r
1314                                                                    unsigned short);\r
1315 \r
1316 \r
1317 /******************************/\r
1318 /* Other Misc functions       */\r
1319 /******************************/\r
1320 \r
1321 ISC_LONG ISC_EXPORT isc_ftof(char *,\r
1322                                                          unsigned short,\r
1323                                                          char *,\r
1324                                                          unsigned short);\r
1325 \r
1326 ISC_STATUS ISC_EXPORT isc_print_blr(char *,\r
1327                                                                         isc_callback,\r
1328                                                                         void *,\r
1329                                                                         short);\r
1330 \r
1331 void ISC_EXPORT isc_set_debug(int);\r
1332 \r
1333 void ISC_EXPORT isc_qtoq(ISC_QUAD *,\r
1334                                                  ISC_QUAD *);\r
1335 \r
1336 void ISC_EXPORT isc_vtof(char *,\r
1337                                                  char *,\r
1338                                                  unsigned short);\r
1339 \r
1340 void ISC_EXPORT isc_vtov(char *,\r
1341                                                  char *,\r
1342                                                  short);\r
1343 \r
1344 int ISC_EXPORT isc_version(isc_db_handle *,\r
1345                                                    isc_callback,\r
1346                                                    void *);\r
1347 \r
1348 ISC_LONG ISC_EXPORT isc_reset_fpe(unsigned short);\r
1349 \r
1350 \r
1351 /*****************************************/\r
1352 /* Service manager functions             */\r
1353 /*****************************************/\r
1354 \r
1355 #define ADD_SPB_LENGTH(p, length)       {*(p)++ = (length); *(p)++ = (length) >> 8;}\r
1356 \r
1357 #define ADD_SPB_NUMERIC(p, data)        {*(p)++ = (SCHAR) (data); *(p)++ = (SCHAR) ((data) >> 8); *(p)++ = (SCHAR) ((data) >> 16); *(p)++ = (SCHAR) ((data) >> 24);}\r
1358 \r
1359 ISC_STATUS ISC_EXPORT isc_service_attach(ISC_STATUS *,\r
1360                                                                                  unsigned short,\r
1361                                                                                  char *,\r
1362                                                                                  isc_svc_handle *,\r
1363                                                                                  unsigned short,\r
1364                                                                                  char *);\r
1365 \r
1366 ISC_STATUS ISC_EXPORT isc_service_detach(ISC_STATUS *,\r
1367                                                                                  isc_svc_handle *);\r
1368 \r
1369 ISC_STATUS ISC_EXPORT isc_service_query(ISC_STATUS *,\r
1370                                                                                 isc_svc_handle *,\r
1371                                                                                 isc_resv_handle *,\r
1372                                                                                 unsigned short,\r
1373                                                                                 char *,\r
1374                                                                                 unsigned short,\r
1375                                                                                 char *,\r
1376                                                                                 unsigned short,\r
1377                                                                                 char *);\r
1378 \r
1379 ISC_STATUS ISC_EXPORT isc_service_start(ISC_STATUS *,\r
1380                                                                                 isc_svc_handle *,\r
1381                                                                                 isc_resv_handle *,\r
1382                                                                                 unsigned short,\r
1383                                                                                 char *);\r
1384 \r
1385 \r
1386 /********************************/\r
1387 /* Client information functions */\r
1388 /********************************/\r
1389 \r
1390 void ISC_EXPORT isc_get_client_version ( char  *);\r
1391 int  ISC_EXPORT isc_get_client_major_version ();\r
1392 int  ISC_EXPORT isc_get_client_minor_version ();\r
1393 \r
1394 #ifdef __cplusplus\r
1395 }       /* extern "C" */\r
1396 #endif\r
1397 \r
1398 \r
1399 /***************************************************/\r
1400 /* Actions to pass to the blob filter (ctl_source) */\r
1401 /***************************************************/\r
1402 \r
1403 #define isc_blob_filter_open             0\r
1404 #define isc_blob_filter_get_segment      1\r
1405 #define isc_blob_filter_close            2\r
1406 #define isc_blob_filter_create           3\r
1407 #define isc_blob_filter_put_segment      4\r
1408 #define isc_blob_filter_alloc            5\r
1409 #define isc_blob_filter_free             6\r
1410 #define isc_blob_filter_seek             7\r
1411 \r
1412 /*******************/\r
1413 /* Blr definitions */\r
1414 /*******************/\r
1415 \r
1416 /*\r
1417  *      PROGRAM:        C preprocessor\r
1418  *      MODULE:         blr.h\r
1419  *      DESCRIPTION:    BLR constants\r
1420  *\r
1421  * The contents of this file are subject to the Interbase Public\r
1422  * License Version 1.0 (the "License"); you may not use this file\r
1423  * except in compliance with the License. You may obtain a copy\r
1424  * of the License at http://www.Inprise.com/IPL.html\r
1425  *\r
1426  * Software distributed under the License is distributed on an\r
1427  * "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express\r
1428  * or implied. See the License for the specific language governing\r
1429  * rights and limitations under the License.\r
1430  *\r
1431  * The Original Code was created by Inprise Corporation\r
1432  * and its predecessors. Portions created by Inprise Corporation are\r
1433  * Copyright (C) Inprise Corporation.\r
1434  *\r
1435  * All Rights Reserved.\r
1436  * Contributor(s): ______________________________________.\r
1437  *\r
1438  * Claudio Valderrama: 2001.6.18: Add blr_current_role.\r
1439  * 2002.09.28 Dmitry Yemanov: Reworked internal_info stuff, enhanced\r
1440  *                            exception handling in SPs/triggers,\r
1441  *                            implemented ROWS_AFFECTED system variable\r
1442  * 2002.10.21 Nickolay Samofatov: Added support for explicit pessimistic locks\r
1443  * 2002.10.29 Nickolay Samofatov: Added support for savepoints\r
1444  */\r
1445 \r
1446 #ifndef _JRD_BLR_H_\r
1447 #define _JRD_BLR_H_\r
1448 \r
1449 /*  WARNING: if you add a new BLR representing a data type, and the value\r
1450  *           is greater than the numerically greatest value which now\r
1451  *           represents a data type, you must change the define for\r
1452  *           DTYPE_BLR_MAX in jrd/align.h, and add the necessary entries\r
1453  *           to all the arrays in that file.\r
1454  */\r
1455 \r
1456 #define blr_text                (unsigned char)14\r
1457 #define blr_text2               (unsigned char)15       /* added in 3.2 JPN */\r
1458 #define blr_short               (unsigned char)7\r
1459 #define blr_long                (unsigned char)8\r
1460 #define blr_quad                (unsigned char)9\r
1461 #define blr_float               (unsigned char)10\r
1462 #define blr_double              (unsigned char)27\r
1463 #define blr_d_float             (unsigned char)11\r
1464 #define blr_timestamp           (unsigned char)35\r
1465 #define blr_varying             (unsigned char)37\r
1466 #define blr_varying2            (unsigned char)38       /* added in 3.2 JPN */\r
1467 #define blr_blob                (unsigned short)261\r
1468 #define blr_cstring             (unsigned char)40       \r
1469 #define blr_cstring2            (unsigned char)41       /* added in 3.2 JPN */\r
1470 #define blr_blob_id             (unsigned char)45       /* added from gds.h */\r
1471 #define blr_sql_date            (unsigned char)12\r
1472 #define blr_sql_time            (unsigned char)13\r
1473 #define blr_int64               (unsigned char)16\r
1474 \r
1475 /* Historical alias for pre V6 applications */\r
1476 #define blr_date                blr_timestamp\r
1477 \r
1478 #define blr_inner               (unsigned char)0\r
1479 #define blr_left                (unsigned char)1\r
1480 #define blr_right               (unsigned char)2\r
1481 #define blr_full                (unsigned char)3\r
1482 \r
1483 #define blr_gds_code            (unsigned char)0\r
1484 #define blr_sql_code            (unsigned char)1\r
1485 #define blr_exception           (unsigned char)2\r
1486 #define blr_trigger_code        (unsigned char)3\r
1487 #define blr_default_code        (unsigned char)4\r
1488 #define blr_raise                       (unsigned char)5\r
1489 #define blr_exception_msg       (unsigned char)6\r
1490 \r
1491 #define blr_version4            (unsigned char)4\r
1492 #define blr_version5            (unsigned char)5\r
1493 #define blr_eoc                 (unsigned char)76\r
1494 #define blr_end                 (unsigned char)255      /* note: defined as -1 in gds.h */\r
1495 \r
1496 #define blr_assignment          (unsigned char)1\r
1497 #define blr_begin               (unsigned char)2\r
1498 #define blr_dcl_variable        (unsigned char)3        /* added from gds.h */\r
1499 #define blr_message             (unsigned char)4\r
1500 #define blr_erase               (unsigned char)5\r
1501 #define blr_fetch               (unsigned char)6\r
1502 #define blr_for                 (unsigned char)7\r
1503 #define blr_if                  (unsigned char)8\r
1504 #define blr_loop                (unsigned char)9\r
1505 #define blr_modify              (unsigned char)10\r
1506 #define blr_handler             (unsigned char)11\r
1507 #define blr_receive             (unsigned char)12\r
1508 #define blr_select              (unsigned char)13\r
1509 #define blr_send                (unsigned char)14\r
1510 #define blr_store               (unsigned char)15\r
1511 #define blr_label               (unsigned char)17\r
1512 #define blr_leave               (unsigned char)18\r
1513 #define blr_store2              (unsigned char)19\r
1514 #define blr_post                (unsigned char)20\r
1515 #define blr_literal             (unsigned char)21\r
1516 #define blr_dbkey               (unsigned char)22\r
1517 #define blr_field               (unsigned char)23\r
1518 #define blr_fid                 (unsigned char)24\r
1519 #define blr_parameter           (unsigned char)25\r
1520 #define blr_variable            (unsigned char)26\r
1521 #define blr_average             (unsigned char)27\r
1522 #define blr_count               (unsigned char)28\r
1523 #define blr_maximum             (unsigned char)29\r
1524 #define blr_minimum             (unsigned char)30\r
1525 #define blr_total               (unsigned char)31\r
1526 /* count 2\r
1527 #define blr_count2              32\r
1528 */\r
1529 #define blr_add                 (unsigned char)34\r
1530 #define blr_subtract            (unsigned char)35\r
1531 #define blr_multiply            (unsigned char)36\r
1532 #define blr_divide              (unsigned char)37\r
1533 #define blr_negate              (unsigned char)38\r
1534 #define blr_concatenate         (unsigned char)39\r
1535 #define blr_substring           (unsigned char)40\r
1536 #define blr_parameter2          (unsigned char)41\r
1537 #define blr_from                (unsigned char)42\r
1538 #define blr_via                 (unsigned char)43\r
1539 #define blr_parameter2_old      (unsigned char)44       /* Confusion */\r
1540 #define blr_user_name           (unsigned char)44       /* added from gds.h */\r
1541 #define blr_null                (unsigned char)45\r
1542 \r
1543 #define blr_eql                 (unsigned char)47\r
1544 #define blr_neq                 (unsigned char)48\r
1545 #define blr_gtr                 (unsigned char)49\r
1546 #define blr_geq                 (unsigned char)50\r
1547 #define blr_lss                 (unsigned char)51\r
1548 #define blr_leq                 (unsigned char)52\r
1549 #define blr_containing          (unsigned char)53\r
1550 #define blr_matching            (unsigned char)54\r
1551 #define blr_starting            (unsigned char)55\r
1552 #define blr_between             (unsigned char)56\r
1553 #define blr_or                  (unsigned char)57\r
1554 #define blr_and                 (unsigned char)58\r
1555 #define blr_not                 (unsigned char)59\r
1556 #define blr_any                 (unsigned char)60\r
1557 #define blr_missing             (unsigned char)61\r
1558 #define blr_unique              (unsigned char)62\r
1559 #define blr_like                (unsigned char)63\r
1560 \r
1561 #define blr_stream              (unsigned char)65       /* added from gds.h */\r
1562 #define blr_set_index           (unsigned char)66       /* added from gds.h */\r
1563 \r
1564 #define blr_rse                 (unsigned char)67\r
1565 #define blr_first               (unsigned char)68\r
1566 #define blr_project             (unsigned char)69\r
1567 #define blr_sort                (unsigned char)70\r
1568 #define blr_boolean             (unsigned char)71\r
1569 #define blr_ascending           (unsigned char)72\r
1570 #define blr_descending          (unsigned char)73\r
1571 #define blr_relation            (unsigned char)74\r
1572 #define blr_rid                 (unsigned char)75\r
1573 #define blr_union               (unsigned char)76\r
1574 #define blr_map                 (unsigned char)77\r
1575 #define blr_group_by            (unsigned char)78\r
1576 #define blr_aggregate           (unsigned char)79\r
1577 #define blr_join_type           (unsigned char)80\r
1578 \r
1579 #define blr_agg_count           (unsigned char)83\r
1580 #define blr_agg_max             (unsigned char)84\r
1581 #define blr_agg_min             (unsigned char)85\r
1582 #define blr_agg_total           (unsigned char)86\r
1583 #define blr_agg_average         (unsigned char)87\r
1584 #define blr_parameter3          (unsigned char)88       /* same as Rdb definition */\r
1585 #define blr_run_max             (unsigned char)89\r
1586 #define blr_run_min             (unsigned char)90\r
1587 #define blr_run_total           (unsigned char)91\r
1588 #define blr_run_average         (unsigned char)92\r
1589 #define blr_agg_count2          (unsigned char)93\r
1590 #define blr_agg_count_distinct  (unsigned char)94\r
1591 #define blr_agg_total_distinct  (unsigned char)95\r
1592 #define blr_agg_average_distinct (unsigned char)96\r
1593 \r
1594 #define blr_function            (unsigned char)100\r
1595 #define blr_gen_id              (unsigned char)101\r
1596 #define blr_prot_mask           (unsigned char)102\r
1597 #define blr_upcase              (unsigned char)103\r
1598 #define blr_lock_state          (unsigned char)104\r
1599 #define blr_value_if            (unsigned char)105\r
1600 #define blr_matching2           (unsigned char)106\r
1601 #define blr_index               (unsigned char)107\r
1602 #define blr_ansi_like           (unsigned char)108\r
1603 #define blr_bookmark            (unsigned char)109\r
1604 #define blr_crack               (unsigned char)110\r
1605 #define blr_force_crack         (unsigned char)111\r
1606 #define blr_seek                (unsigned char)112\r
1607 #define blr_find                (unsigned char)113\r
1608                                  \r
1609 /* these indicate directions for blr_seek and blr_find */\r
1610 \r
1611 #define blr_continue            (unsigned char)0\r
1612 #define blr_forward             (unsigned char)1\r
1613 #define blr_backward            (unsigned char)2\r
1614 #define blr_bof_forward         (unsigned char)3\r
1615 #define blr_eof_backward        (unsigned char)4\r
1616 \r
1617 #define blr_lock_relation       (unsigned char)114\r
1618 #define blr_lock_record         (unsigned char)115\r
1619 #define blr_set_bookmark        (unsigned char)116\r
1620 #define blr_get_bookmark        (unsigned char)117\r
1621 \r
1622 #define blr_run_count           (unsigned char)118      /* changed from 88 to avoid conflict with blr_parameter3 */\r
1623 #define blr_rs_stream           (unsigned char)119\r
1624 #define blr_exec_proc           (unsigned char)120\r
1625 #define blr_begin_range         (unsigned char)121\r
1626 #define blr_end_range           (unsigned char)122\r
1627 #define blr_delete_range        (unsigned char)123\r
1628 #define blr_procedure           (unsigned char)124\r
1629 #define blr_pid                 (unsigned char)125\r
1630 #define blr_exec_pid            (unsigned char)126\r
1631 #define blr_singular            (unsigned char)127\r
1632 #define blr_abort               (unsigned char)128\r
1633 #define blr_block               (unsigned char)129\r
1634 #define blr_error_handler       (unsigned char)130\r
1635 \r
1636 #define blr_cast                (unsigned char)131\r
1637 #define blr_release_lock        (unsigned char)132\r
1638 #define blr_release_locks       (unsigned char)133\r
1639 #define blr_start_savepoint     (unsigned char)134\r
1640 #define blr_end_savepoint       (unsigned char)135\r
1641 #define blr_find_dbkey          (unsigned char)136\r
1642 #define blr_range_relation      (unsigned char)137\r
1643 #define blr_delete_ranges       (unsigned char)138\r
1644 \r
1645 #define blr_plan                (unsigned char)139      /* access plan items */\r
1646 #define blr_merge               (unsigned char)140\r
1647 #define blr_join                (unsigned char)141\r
1648 #define blr_sequential          (unsigned char)142\r
1649 #define blr_navigational        (unsigned char)143\r
1650 #define blr_indices             (unsigned char)144\r
1651 #define blr_retrieve            (unsigned char)145\r
1652 \r
1653 #define blr_relation2           (unsigned char)146\r
1654 #define blr_rid2                (unsigned char)147\r
1655 #define blr_reset_stream        (unsigned char)148\r
1656 #define blr_release_bookmark    (unsigned char)149\r
1657 \r
1658 #define blr_set_generator       (unsigned char)150\r
1659 \r
1660 #define blr_ansi_any            (unsigned char)151   /* required for NULL handling */\r
1661 #define blr_exists              (unsigned char)152   /* required for NULL handling */\r
1662 #define blr_cardinality         (unsigned char)153\r
1663 \r
1664 #define blr_record_version      (unsigned char)154      /* get tid of record */\r
1665 #define blr_stall               (unsigned char)155      /* fake server stall */\r
1666 \r
1667 #define blr_seek_no_warn        (unsigned char)156      \r
1668 #define blr_find_dbkey_version  (unsigned char)157   /* find dbkey with record version */\r
1669 #define blr_ansi_all            (unsigned char)158   /* required for NULL handling */\r
1670 \r
1671 #define blr_extract             (unsigned char)159\r
1672 \r
1673 /* sub parameters for blr_extract */\r
1674 \r
1675 #define blr_extract_year        (unsigned char)0\r
1676 #define blr_extract_month       (unsigned char)1\r
1677 #define blr_extract_day         (unsigned char)2\r
1678 #define blr_extract_hour        (unsigned char)3\r
1679 #define blr_extract_minute      (unsigned char)4\r
1680 #define blr_extract_second      (unsigned char)5\r
1681 #define blr_extract_weekday     (unsigned char)6\r
1682 #define blr_extract_yearday     (unsigned char)7\r
1683 \r
1684 #define blr_current_date        (unsigned char)160\r
1685 #define blr_current_timestamp   (unsigned char)161\r
1686 #define blr_current_time        (unsigned char)162\r
1687 \r
1688 /* FB 1.0 specific BLR */\r
1689 \r
1690 #define blr_current_role        (unsigned char)174\r
1691 #define blr_skip                (unsigned char)175\r
1692 \r
1693 /* FB 1.5 specific BLR */\r
1694 \r
1695 #define blr_exec_sql            (unsigned char)176\r
1696 #define blr_internal_info       (unsigned char)177\r
1697 #define blr_nullsfirst          (unsigned char)178\r
1698 #define blr_writelock           (unsigned char)179\r
1699 #define blr_nullslast       (unsigned char)180\r
1700 \r
1701 /* These codes reuse BLR code space */\r
1702 \r
1703 #define blr_post_arg            (unsigned char)163\r
1704 #define blr_exec_into           (unsigned char)164\r
1705 #define blr_user_savepoint      (unsigned char)165\r
1706 \r
1707 /* These codes are actions for user-defined savepoints */\r
1708 \r
1709 #define blr_savepoint_set       (unsigned char)0\r
1710 #define blr_savepoint_release   (unsigned char)1\r
1711 #define blr_savepoint_undo      (unsigned char)2\r
1712 #define blr_savepoint_release_single    (unsigned char)3\r
1713 \r
1714 #endif /* _JRD_BLR_H_ */\r
1715 \r
1716 \r
1717 /**********************************/\r
1718 /* Database parameter block stuff */\r
1719 /**********************************/\r
1720 \r
1721 #define isc_dpb_version1                  1\r
1722 #define isc_dpb_cdd_pathname              1\r
1723 #define isc_dpb_allocation                2\r
1724 #define isc_dpb_journal                   3\r
1725 #define isc_dpb_page_size                 4\r
1726 #define isc_dpb_num_buffers               5\r
1727 #define isc_dpb_buffer_length             6\r
1728 #define isc_dpb_debug                     7\r
1729 #define isc_dpb_garbage_collect           8\r
1730 #define isc_dpb_verify                    9\r
1731 #define isc_dpb_sweep                     10\r
1732 #define isc_dpb_enable_journal            11\r
1733 #define isc_dpb_disable_journal           12\r
1734 #define isc_dpb_dbkey_scope               13\r
1735 #define isc_dpb_number_of_users           14\r
1736 #define isc_dpb_trace                     15\r
1737 #define isc_dpb_no_garbage_collect        16\r
1738 #define isc_dpb_damaged                   17\r
1739 #define isc_dpb_license                   18\r
1740 #define isc_dpb_sys_user_name             19\r
1741 #define isc_dpb_encrypt_key               20\r
1742 #define isc_dpb_activate_shadow           21\r
1743 #define isc_dpb_sweep_interval            22\r
1744 #define isc_dpb_delete_shadow             23\r
1745 #define isc_dpb_force_write               24\r
1746 #define isc_dpb_begin_log                 25\r
1747 #define isc_dpb_quit_log                  26\r
1748 #define isc_dpb_no_reserve                27\r
1749 #define isc_dpb_user_name                 28\r
1750 #define isc_dpb_password                  29\r
1751 #define isc_dpb_password_enc              30\r
1752 #define isc_dpb_sys_user_name_enc         31\r
1753 #define isc_dpb_interp                    32\r
1754 #define isc_dpb_online_dump               33\r
1755 #define isc_dpb_old_file_size             34\r
1756 #define isc_dpb_old_num_files             35\r
1757 #define isc_dpb_old_file                  36\r
1758 #define isc_dpb_old_start_page            37\r
1759 #define isc_dpb_old_start_seqno           38\r
1760 #define isc_dpb_old_start_file            39\r
1761 #define isc_dpb_drop_walfile              40\r
1762 #define isc_dpb_old_dump_id               41\r
1763 #define isc_dpb_wal_backup_dir            42\r
1764 #define isc_dpb_wal_chkptlen              43\r
1765 #define isc_dpb_wal_numbufs               44\r
1766 #define isc_dpb_wal_bufsize               45\r
1767 #define isc_dpb_wal_grp_cmt_wait          46\r
1768 #define isc_dpb_lc_messages               47\r
1769 #define isc_dpb_lc_ctype                  48\r
1770 #define isc_dpb_cache_manager             49\r
1771 #define isc_dpb_shutdown                  50\r
1772 #define isc_dpb_online                    51\r
1773 #define isc_dpb_shutdown_delay            52\r
1774 #define isc_dpb_reserved                  53\r
1775 #define isc_dpb_overwrite                 54\r
1776 #define isc_dpb_sec_attach                55\r
1777 #define isc_dpb_disable_wal               56\r
1778 #define isc_dpb_connect_timeout           57\r
1779 #define isc_dpb_dummy_packet_interval     58\r
1780 #define isc_dpb_gbak_attach               59\r
1781 #define isc_dpb_sql_role_name             60\r
1782 #define isc_dpb_set_page_buffers          61\r
1783 #define isc_dpb_working_directory         62\r
1784 #define isc_dpb_sql_dialect               63\r
1785 #define isc_dpb_set_db_readonly           64\r
1786 #define isc_dpb_set_db_sql_dialect        65\r
1787 #define isc_dpb_gfix_attach               66\r
1788 #define isc_dpb_gstat_attach              67\r
1789 #define isc_dpb_set_db_charset                  68\r
1790 \r
1791 /*********************************/\r
1792 /* isc_dpb_verify specific flags */\r
1793 /*********************************/\r
1794 \r
1795 #define isc_dpb_pages                     1\r
1796 #define isc_dpb_records                   2\r
1797 #define isc_dpb_indices                   4\r
1798 #define isc_dpb_transactions              8\r
1799 #define isc_dpb_no_update                 16\r
1800 #define isc_dpb_repair                    32\r
1801 #define isc_dpb_ignore                    64\r
1802 \r
1803 /***********************************/\r
1804 /* isc_dpb_shutdown specific flags */\r
1805 /***********************************/\r
1806 \r
1807 #define isc_dpb_shut_cache               1\r
1808 #define isc_dpb_shut_attachment          2\r
1809 #define isc_dpb_shut_transaction         4\r
1810 #define isc_dpb_shut_force               8\r
1811 \r
1812 /**************************************/\r
1813 /* Bit assignments in RDB$SYSTEM_FLAG */\r
1814 /**************************************/\r
1815 \r
1816 #define RDB_system                         1\r
1817 #define RDB_id_assigned                    2\r
1818 \r
1819 \r
1820 /*************************************/\r
1821 /* Transaction parameter block stuff */\r
1822 /*************************************/\r
1823 \r
1824 #define isc_tpb_version1                  1\r
1825 #define isc_tpb_version3                  3\r
1826 #define isc_tpb_consistency               1\r
1827 #define isc_tpb_concurrency               2\r
1828 #define isc_tpb_shared                    3\r
1829 #define isc_tpb_protected                 4\r
1830 #define isc_tpb_exclusive                 5\r
1831 #define isc_tpb_wait                      6\r
1832 #define isc_tpb_nowait                    7\r
1833 #define isc_tpb_read                      8\r
1834 #define isc_tpb_write                     9\r
1835 #define isc_tpb_lock_read                 10\r
1836 #define isc_tpb_lock_write                11\r
1837 #define isc_tpb_verb_time                 12\r
1838 #define isc_tpb_commit_time               13\r
1839 #define isc_tpb_ignore_limbo              14\r
1840 #define isc_tpb_read_committed            15\r
1841 #define isc_tpb_autocommit                16\r
1842 #define isc_tpb_rec_version               17\r
1843 #define isc_tpb_no_rec_version            18\r
1844 #define isc_tpb_restart_requests          19\r
1845 #define isc_tpb_no_auto_undo              20\r
1846 \r
1847 \r
1848 /************************/\r
1849 /* Blob Parameter Block */\r
1850 /************************/\r
1851 \r
1852 #define isc_bpb_version1                  1\r
1853 #define isc_bpb_source_type               1\r
1854 #define isc_bpb_target_type               2\r
1855 #define isc_bpb_type                      3\r
1856 #define isc_bpb_source_interp             4\r
1857 #define isc_bpb_target_interp             5\r
1858 #define isc_bpb_filter_parameter          6\r
1859 \r
1860 #define isc_bpb_type_segmented            0\r
1861 #define isc_bpb_type_stream               1\r
1862 \r
1863 \r
1864 /*********************************/\r
1865 /* Service parameter block stuff */\r
1866 /*********************************/\r
1867 \r
1868 #define isc_spb_version1                  1\r
1869 #define isc_spb_current_version           2\r
1870 #define isc_spb_version                   isc_spb_current_version\r
1871 #define isc_spb_user_name                 isc_dpb_user_name\r
1872 #define isc_spb_sys_user_name             isc_dpb_sys_user_name\r
1873 #define isc_spb_sys_user_name_enc         isc_dpb_sys_user_name_enc\r
1874 #define isc_spb_password                  isc_dpb_password\r
1875 #define isc_spb_password_enc              isc_dpb_password_enc\r
1876 #define isc_spb_command_line              105\r
1877 #define isc_spb_dbname                    106\r
1878 #define isc_spb_verbose                   107\r
1879 #define isc_spb_options                   108\r
1880 \r
1881 #define isc_spb_connect_timeout           isc_dpb_connect_timeout\r
1882 #define isc_spb_dummy_packet_interval     isc_dpb_dummy_packet_interval\r
1883 #define isc_spb_sql_role_name             isc_dpb_sql_role_name\r
1884 \r
1885 \r
1886 /*********************************/\r
1887 /* Information call declarations */\r
1888 /*********************************/\r
1889 \r
1890 /****************************/\r
1891 /* Common, structural codes */\r
1892 /****************************/\r
1893 \r
1894 #define isc_info_end                      1\r
1895 #define isc_info_truncated                2\r
1896 #define isc_info_error                    3\r
1897 #define isc_info_data_not_ready           4\r
1898 #define isc_info_flag_end                 127\r
1899 \r
1900 /******************************/\r
1901 /* Database information items */\r
1902 /******************************/\r
1903 \r
1904 enum db_info_types\r
1905     {\r
1906         isc_info_db_id = 4,\r
1907         isc_info_reads = 5,\r
1908         isc_info_writes = 6,\r
1909         isc_info_fetches = 7,\r
1910         isc_info_marks = 8,\r
1911 \r
1912         isc_info_implementation = 11,\r
1913         isc_info_isc_version = 12,\r
1914         isc_info_base_level = 13,\r
1915         isc_info_page_size = 14,\r
1916         isc_info_num_buffers = 15,\r
1917         isc_info_limbo = 16,\r
1918         isc_info_current_memory = 17,\r
1919         isc_info_max_memory = 18,\r
1920         isc_info_window_turns = 19,\r
1921         isc_info_license = 20,   \r
1922 \r
1923         isc_info_allocation = 21,\r
1924         isc_info_attachment_id = 22,\r
1925         isc_info_read_seq_count = 23,\r
1926         isc_info_read_idx_count = 24,\r
1927         isc_info_insert_count = 25,\r
1928         isc_info_update_count = 26,\r
1929         isc_info_delete_count = 27,\r
1930         isc_info_backout_count = 28,\r
1931         isc_info_purge_count = 29,\r
1932         isc_info_expunge_count = 30, \r
1933 \r
1934         isc_info_sweep_interval = 31,\r
1935         isc_info_ods_version = 32,\r
1936         isc_info_ods_minor_version = 33,\r
1937         isc_info_no_reserve = 34,\r
1938         isc_info_logfile = 35,\r
1939         isc_info_cur_logfile_name = 36,\r
1940         isc_info_cur_log_part_offset = 37,\r
1941         isc_info_num_wal_buffers = 38,\r
1942         isc_info_wal_buffer_size = 39,\r
1943         isc_info_wal_ckpt_length = 40,   \r
1944 \r
1945         isc_info_wal_cur_ckpt_interval = 41,  \r
1946         isc_info_wal_prv_ckpt_fname = 42,\r
1947         isc_info_wal_prv_ckpt_poffset = 43,\r
1948         isc_info_wal_recv_ckpt_fname = 44,\r
1949         isc_info_wal_recv_ckpt_poffset = 45,\r
1950         isc_info_wal_grpc_wait_usecs = 47,\r
1951         isc_info_wal_num_io = 48,\r
1952         isc_info_wal_avg_io_size = 49,\r
1953         isc_info_wal_num_commits = 50,  \r
1954 \r
1955         isc_info_wal_avg_grpc_size = 51,\r
1956         isc_info_forced_writes = 52,\r
1957         isc_info_user_names = 53,\r
1958         isc_info_page_errors = 54,\r
1959         isc_info_record_errors = 55,\r
1960         isc_info_bpage_errors = 56,\r
1961         isc_info_dpage_errors = 57,\r
1962         isc_info_ipage_errors = 58,\r
1963         isc_info_ppage_errors = 59,\r
1964         isc_info_tpage_errors = 60,\r
1965 \r
1966         isc_info_set_page_buffers = 61,\r
1967         isc_info_db_sql_dialect = 62,   \r
1968         isc_info_db_read_only = 63,\r
1969         isc_info_db_size_in_pages = 64,\r
1970 \r
1971     /* Values 65 -100 unused to avoid conflict with InterBase */\r
1972         \r
1973         frb_info_att_charset = 101,\r
1974         isc_info_db_class = 102,\r
1975         isc_info_firebird_version = 103,\r
1976         isc_info_oldest_transaction = 104,\r
1977         isc_info_oldest_active = 105,\r
1978         isc_info_oldest_snapshot = 106,\r
1979         isc_info_next_transaction = 107,\r
1980         isc_info_db_provider = 108,\r
1981         isc_info_active_transactions = 109,\r
1982 \r
1983         isc_info_db_last_value   /* Leave this LAST! */\r
1984     };\r
1985 \r
1986 #define isc_info_version isc_info_isc_version\r
1987 \r
1988 \r
1989 /**************************************/\r
1990 /* Database information return values */\r
1991 /**************************************/\r
1992 \r
1993 enum  info_db_implementations\r
1994     {\r
1995         isc_info_db_impl_rdb_vms = 1,\r
1996         isc_info_db_impl_rdb_eln = 2,\r
1997         isc_info_db_impl_rdb_eln_dev = 3,\r
1998         isc_info_db_impl_rdb_vms_y = 4,\r
1999         isc_info_db_impl_rdb_eln_y = 5,\r
2000         isc_info_db_impl_jri = 6,\r
2001         isc_info_db_impl_jsv = 7,\r
2002 \r
2003         isc_info_db_impl_isc_apl_68K = 25,\r
2004         isc_info_db_impl_isc_vax_ultr = 26,\r
2005         isc_info_db_impl_isc_vms = 27,\r
2006         isc_info_db_impl_isc_sun_68k = 28,\r
2007         isc_info_db_impl_isc_os2 = 29,\r
2008         isc_info_db_impl_isc_sun4 = 30,    /* 30 */\r
2009         \r
2010         isc_info_db_impl_isc_hp_ux = 31,\r
2011         isc_info_db_impl_isc_sun_386i = 32,\r
2012         isc_info_db_impl_isc_vms_orcl = 33,\r
2013         isc_info_db_impl_isc_mac_aux = 34,\r
2014         isc_info_db_impl_isc_rt_aix = 35,\r
2015         isc_info_db_impl_isc_mips_ult = 36,\r
2016         isc_info_db_impl_isc_xenix = 37,\r
2017         isc_info_db_impl_isc_dg = 38,\r
2018         isc_info_db_impl_isc_hp_mpexl = 39,\r
2019         isc_info_db_impl_isc_hp_ux68K = 40,       /* 40 */\r
2020 \r
2021         isc_info_db_impl_isc_sgi = 41,\r
2022         isc_info_db_impl_isc_sco_unix = 42,\r
2023         isc_info_db_impl_isc_cray = 43,\r
2024         isc_info_db_impl_isc_imp = 44,\r
2025         isc_info_db_impl_isc_delta = 45,\r
2026         isc_info_db_impl_isc_next = 46,\r
2027         isc_info_db_impl_isc_dos = 47,\r
2028         isc_info_db_impl_m88K = 48,\r
2029         isc_info_db_impl_unixware = 49,\r
2030         isc_info_db_impl_isc_winnt_x86 = 50,\r
2031 \r
2032         isc_info_db_impl_isc_epson = 51,\r
2033         isc_info_db_impl_alpha_osf = 52,\r
2034         isc_info_db_impl_alpha_vms = 53,\r
2035         isc_info_db_impl_netware_386 = 54, \r
2036         isc_info_db_impl_win_only = 55,\r
2037         isc_info_db_impl_ncr_3000 = 56,\r
2038         isc_info_db_impl_winnt_ppc = 57,\r
2039         isc_info_db_impl_dg_x86 = 58,\r
2040         isc_info_db_impl_sco_ev = 59,\r
2041         isc_info_db_impl_i386 = 60,\r
2042 \r
2043         isc_info_db_impl_freebsd = 61,\r
2044         isc_info_db_impl_netbsd = 62,\r
2045         isc_info_db_impl_darwin = 63,\r
2046         isc_info_db_impl_sinixz = 64,\r
2047 \r
2048         isc_info_db_impl_linux_sparc = 65,\r
2049         isc_info_db_impl_linux_amd64 = 66,\r
2050 \r
2051         isc_info_db_impl_last_value   /* Leave this LAST! */\r
2052     };\r
2053 \r
2054 #define isc_info_db_impl_isc_a            isc_info_db_impl_isc_apl_68K\r
2055 #define isc_info_db_impl_isc_u            isc_info_db_impl_isc_vax_ultr\r
2056 #define isc_info_db_impl_isc_v            isc_info_db_impl_isc_vms\r
2057 #define isc_info_db_impl_isc_s            isc_info_db_impl_isc_sun_68k\r
2058 \r
2059 \r
2060 enum info_db_class\r
2061     {\r
2062         isc_info_db_class_access = 1,\r
2063         isc_info_db_class_y_valve = 2,\r
2064         isc_info_db_class_rem_int = 3,\r
2065         isc_info_db_class_rem_srvr = 4,\r
2066         isc_info_db_class_pipe_int = 7,\r
2067         isc_info_db_class_pipe_srvr = 8,\r
2068         isc_info_db_class_sam_int = 9,\r
2069         isc_info_db_class_sam_srvr = 10,\r
2070         isc_info_db_class_gateway = 11,\r
2071         isc_info_db_class_cache = 12,\r
2072         isc_info_db_class_classic_access = 13,\r
2073         isc_info_db_class_server_access = 14,\r
2074 \r
2075         isc_info_db_class_last_value   /* Leave this LAST! */\r
2076     };\r
2077 \r
2078 enum info_db_provider\r
2079     {\r
2080         isc_info_db_code_rdb_eln = 1,\r
2081         isc_info_db_code_rdb_vms = 2,\r
2082         isc_info_db_code_interbase = 3,\r
2083         isc_info_db_code_firebird = 4,\r
2084 \r
2085         isc_info_db_code_last_value   /* Leave this LAST! */\r
2086     };\r
2087 \r
2088 \r
2089 /*****************************/\r
2090 /* Request information items */\r
2091 /*****************************/\r
2092 \r
2093 #define isc_info_number_messages          4\r
2094 #define isc_info_max_message              5\r
2095 #define isc_info_max_send                 6\r
2096 #define isc_info_max_receive              7\r
2097 #define isc_info_state                    8\r
2098 #define isc_info_message_number           9\r
2099 #define isc_info_message_size             10\r
2100 #define isc_info_request_cost             11\r
2101 #define isc_info_access_path              12\r
2102 #define isc_info_req_select_count         13\r
2103 #define isc_info_req_insert_count         14\r
2104 #define isc_info_req_update_count         15\r
2105 #define isc_info_req_delete_count         16\r
2106 \r
2107 \r
2108 /*********************/\r
2109 /* Access path items */\r
2110 /*********************/\r
2111 \r
2112 #define isc_info_rsb_end                   0\r
2113 #define isc_info_rsb_begin                 1\r
2114 #define isc_info_rsb_type                  2\r
2115 #define isc_info_rsb_relation              3\r
2116 #define isc_info_rsb_plan                  4\r
2117 \r
2118 /*************/\r
2119 /* Rsb types */\r
2120 /*************/\r
2121 \r
2122 #define isc_info_rsb_unknown               1\r
2123 #define isc_info_rsb_indexed               2\r
2124 #define isc_info_rsb_navigate              3\r
2125 #define isc_info_rsb_sequential            4\r
2126 #define isc_info_rsb_cross                 5\r
2127 #define isc_info_rsb_sort                  6\r
2128 #define isc_info_rsb_first                 7\r
2129 #define isc_info_rsb_boolean               8\r
2130 #define isc_info_rsb_union                 9\r
2131 #define isc_info_rsb_aggregate            10\r
2132 #define isc_info_rsb_merge                11\r
2133 #define isc_info_rsb_ext_sequential       12\r
2134 #define isc_info_rsb_ext_indexed          13\r
2135 #define isc_info_rsb_ext_dbkey            14\r
2136 #define isc_info_rsb_left_cross           15\r
2137 #define isc_info_rsb_select               16\r
2138 #define isc_info_rsb_sql_join             17\r
2139 #define isc_info_rsb_simulate             18\r
2140 #define isc_info_rsb_sim_cross            19\r
2141 #define isc_info_rsb_once                 20\r
2142 #define isc_info_rsb_procedure            21\r
2143 \r
2144 /**********************/\r
2145 /* Bitmap expressions */\r
2146 /**********************/\r
2147 \r
2148 #define isc_info_rsb_and                1\r
2149 #define isc_info_rsb_or                 2\r
2150 #define isc_info_rsb_dbkey              3\r
2151 #define isc_info_rsb_index              4\r
2152 \r
2153 #define isc_info_req_active               2\r
2154 #define isc_info_req_inactive             3\r
2155 #define isc_info_req_send                 4\r
2156 #define isc_info_req_receive              5\r
2157 #define isc_info_req_select               6\r
2158 #define isc_info_req_sql_stall            7\r
2159 \r
2160 /**************************/\r
2161 /* Blob information items */\r
2162 /**************************/\r
2163 \r
2164 #define isc_info_blob_num_segments        4\r
2165 #define isc_info_blob_max_segment         5\r
2166 #define isc_info_blob_total_length        6\r
2167 #define isc_info_blob_type                7\r
2168 \r
2169 /*********************************/\r
2170 /* Transaction information items */\r
2171 /*********************************/\r
2172 \r
2173 #define isc_info_tra_id                   4\r
2174 \r
2175 /*****************************\r
2176  * Service action items      *\r
2177  *****************************/\r
2178 \r
2179 #define isc_action_svc_backup          1        /* Starts database backup process on the server */\r
2180 #define isc_action_svc_restore         2        /* Starts database restore process on the server */\r
2181 #define isc_action_svc_repair          3        /* Starts database repair process on the server */\r
2182 #define isc_action_svc_add_user        4        /* Adds a new user to the security database */\r
2183 #define isc_action_svc_delete_user     5        /* Deletes a user record from the security database */\r
2184 #define isc_action_svc_modify_user     6        /* Modifies a user record in the security database */\r
2185 #define isc_action_svc_display_user    7        /* Displays a user record from the security database */\r
2186 #define isc_action_svc_properties      8        /* Sets database properties */\r
2187 #define isc_action_svc_add_license     9        /* Adds a license to the license file */\r
2188 #define isc_action_svc_remove_license 10        /* Removes a license from the license file */\r
2189 #define isc_action_svc_db_stats       11        /* Retrieves database statistics */\r
2190 #define isc_action_svc_get_ib_log     12        /* Retrieves the InterBase log file from the server */\r
2191 \r
2192 /*****************************\r
2193  * Service information items *\r
2194  *****************************/\r
2195 \r
2196 #define isc_info_svc_svr_db_info      50        /* Retrieves the number of attachments and databases */\r
2197 #define isc_info_svc_get_license      51        /* Retrieves all license keys and IDs from the license file */\r
2198 #define isc_info_svc_get_license_mask 52        /* Retrieves a bitmask representing licensed options on the server */\r
2199 #define isc_info_svc_get_config       53        /* Retrieves the parameters and values for IB_CONFIG */\r
2200 #define isc_info_svc_version          54        /* Retrieves the version of the services manager */\r
2201 #define isc_info_svc_server_version   55        /* Retrieves the version of the InterBase server */\r
2202 #define isc_info_svc_implementation   56        /* Retrieves the implementation of the InterBase server */\r
2203 #define isc_info_svc_capabilities     57        /* Retrieves a bitmask representing the server's capabilities */\r
2204 #define isc_info_svc_user_dbpath      58        /* Retrieves the path to the security database in use by the server */\r
2205 #define isc_info_svc_get_env          59        /* Retrieves the setting of $INTERBASE */\r
2206 #define isc_info_svc_get_env_lock     60        /* Retrieves the setting of $INTERBASE_LCK */\r
2207 #define isc_info_svc_get_env_msg      61        /* Retrieves the setting of $INTERBASE_MSG */\r
2208 #define isc_info_svc_line             62        /* Retrieves 1 line of service output per call */\r
2209 #define isc_info_svc_to_eof           63        /* Retrieves as much of the server output as will fit in the supplied buffer */\r
2210 #define isc_info_svc_timeout          64        /* Sets / signifies a timeout value for reading service information */\r
2211 #define isc_info_svc_get_licensed_users 65      /* Retrieves the number of users licensed for accessing the server */\r
2212 #define isc_info_svc_limbo_trans        66      /* Retrieve the limbo transactions */\r
2213 #define isc_info_svc_running            67      /* Checks to see if a service is running on an attachment */\r
2214 #define isc_info_svc_get_users          68      /* Returns the user information from isc_action_svc_display_users */\r
2215 \r
2216 /******************************************************\r
2217  * Parameters for isc_action_{add|delete|modify)_user *\r
2218  ******************************************************/\r
2219 \r
2220 #define isc_spb_sec_userid            5\r
2221 #define isc_spb_sec_groupid           6\r
2222 #define isc_spb_sec_username          7\r
2223 #define isc_spb_sec_password          8\r
2224 #define isc_spb_sec_groupname         9\r
2225 #define isc_spb_sec_firstname         10\r
2226 #define isc_spb_sec_middlename        11\r
2227 #define isc_spb_sec_lastname          12\r
2228 \r
2229 /*******************************************************\r
2230  * Parameters for isc_action_svc_(add|remove)_license, *\r
2231  * isc_info_svc_get_license                            *\r
2232  *******************************************************/\r
2233 \r
2234 #define isc_spb_lic_key               5\r
2235 #define isc_spb_lic_id                6\r
2236 #define isc_spb_lic_desc              7\r
2237 \r
2238 \r
2239 /*****************************************\r
2240  * Parameters for isc_action_svc_backup  *\r
2241  *****************************************/\r
2242 \r
2243 #define isc_spb_bkp_file                 5\r
2244 #define isc_spb_bkp_factor               6\r
2245 #define isc_spb_bkp_length               7\r
2246 #define isc_spb_bkp_ignore_checksums     0x01\r
2247 #define isc_spb_bkp_ignore_limbo         0x02\r
2248 #define isc_spb_bkp_metadata_only        0x04\r
2249 #define isc_spb_bkp_no_garbage_collect   0x08\r
2250 #define isc_spb_bkp_old_descriptions     0x10\r
2251 #define isc_spb_bkp_non_transportable    0x20\r
2252 #define isc_spb_bkp_convert              0x40\r
2253 #define isc_spb_bkp_expand               0x80\r
2254 \r
2255 /********************************************\r
2256  * Parameters for isc_action_svc_properties *\r
2257  ********************************************/\r
2258 \r
2259 #define isc_spb_prp_page_buffers                5\r
2260 #define isc_spb_prp_sweep_interval              6\r
2261 #define isc_spb_prp_shutdown_db                 7\r
2262 #define isc_spb_prp_deny_new_attachments        9\r
2263 #define isc_spb_prp_deny_new_transactions       10\r
2264 #define isc_spb_prp_reserve_space               11\r
2265 #define isc_spb_prp_write_mode                  12\r
2266 #define isc_spb_prp_access_mode                 13\r
2267 #define isc_spb_prp_set_sql_dialect             14\r
2268 #define isc_spb_prp_activate                    0x0100\r
2269 #define isc_spb_prp_db_online                   0x0200\r
2270 \r
2271 /********************************************\r
2272  * Parameters for isc_spb_prp_reserve_space *\r
2273  ********************************************/\r
2274 \r
2275 #define isc_spb_prp_res_use_full        35\r
2276 #define isc_spb_prp_res                 36\r
2277 \r
2278 /******************************************\r
2279  * Parameters for isc_spb_prp_write_mode  *\r
2280  ******************************************/\r
2281 \r
2282 #define isc_spb_prp_wm_async            37\r
2283 #define isc_spb_prp_wm_sync                     38\r
2284 \r
2285 /******************************************\r
2286  * Parameters for isc_spb_prp_access_mode *\r
2287  ******************************************/\r
2288 \r
2289 #define isc_spb_prp_am_readonly         39\r
2290 #define isc_spb_prp_am_readwrite        40\r
2291 \r
2292 /*****************************************\r
2293  * Parameters for isc_action_svc_repair  *\r
2294  *****************************************/\r
2295 \r
2296 #define isc_spb_rpr_commit_trans                15\r
2297 #define isc_spb_rpr_rollback_trans              34\r
2298 #define isc_spb_rpr_recover_two_phase   17\r
2299 #define isc_spb_tra_id                                  18\r
2300 #define isc_spb_single_tra_id                   19\r
2301 #define isc_spb_multi_tra_id                    20\r
2302 #define isc_spb_tra_state                               21\r
2303 #define isc_spb_tra_state_limbo                 22\r
2304 #define isc_spb_tra_state_commit                23\r
2305 #define isc_spb_tra_state_rollback              24\r
2306 #define isc_spb_tra_state_unknown               25\r
2307 #define isc_spb_tra_host_site                   26\r
2308 #define isc_spb_tra_remote_site                 27\r
2309 #define isc_spb_tra_db_path                             28\r
2310 #define isc_spb_tra_advise                              29\r
2311 #define isc_spb_tra_advise_commit               30\r
2312 #define isc_spb_tra_advise_rollback             31\r
2313 #define isc_spb_tra_advise_unknown              33\r
2314 \r
2315 #define isc_spb_rpr_validate_db                 0x01\r
2316 #define isc_spb_rpr_sweep_db                    0x02\r
2317 #define isc_spb_rpr_mend_db                             0x04\r
2318 #define isc_spb_rpr_list_limbo_trans    0x08\r
2319 #define isc_spb_rpr_check_db                    0x10\r
2320 #define isc_spb_rpr_ignore_checksum             0x20\r
2321 #define isc_spb_rpr_kill_shadows                0x40\r
2322 #define isc_spb_rpr_full                                0x80\r
2323 \r
2324 /*****************************************\r
2325  * Parameters for isc_action_svc_restore *\r
2326  *****************************************/\r
2327 \r
2328 #define isc_spb_res_buffers                             9\r
2329 #define isc_spb_res_page_size                   10\r
2330 #define isc_spb_res_length                              11\r
2331 #define isc_spb_res_access_mode                 12\r
2332 #define isc_spb_res_deactivate_idx              0x0100\r
2333 #define isc_spb_res_no_shadow                   0x0200\r
2334 #define isc_spb_res_no_validity                 0x0400\r
2335 #define isc_spb_res_one_at_a_time               0x0800\r
2336 #define isc_spb_res_replace                             0x1000\r
2337 #define isc_spb_res_create                              0x2000\r
2338 #define isc_spb_res_use_all_space               0x4000\r
2339 \r
2340 /******************************************\r
2341  * Parameters for isc_spb_res_access_mode  *\r
2342  ******************************************/\r
2343 \r
2344 #define isc_spb_res_am_readonly                 isc_spb_prp_am_readonly\r
2345 #define isc_spb_res_am_readwrite                isc_spb_prp_am_readwrite\r
2346 \r
2347 /*******************************************\r
2348  * Parameters for isc_info_svc_svr_db_info *\r
2349  *******************************************/\r
2350 \r
2351 #define isc_spb_num_att                 5\r
2352 #define isc_spb_num_db                  6\r
2353 \r
2354 /*****************************************\r
2355  * Parameters for isc_info_svc_db_stats  *\r
2356  *****************************************/\r
2357 \r
2358 #define isc_spb_sts_data_pages          0x01\r
2359 #define isc_spb_sts_db_log                      0x02\r
2360 #define isc_spb_sts_hdr_pages           0x04\r
2361 #define isc_spb_sts_idx_pages           0x08\r
2362 #define isc_spb_sts_sys_relations       0x10\r
2363 #define isc_spb_sts_record_versions     0x20\r
2364 #define isc_spb_sts_table                       0x40\r
2365 \r
2366 /*************************/\r
2367 /* SQL information items */\r
2368 /*************************/\r
2369 \r
2370 #define isc_info_sql_select               4\r
2371 #define isc_info_sql_bind                 5\r
2372 #define isc_info_sql_num_variables        6\r
2373 #define isc_info_sql_describe_vars        7\r
2374 #define isc_info_sql_describe_end         8\r
2375 #define isc_info_sql_sqlda_seq            9\r
2376 #define isc_info_sql_message_seq          10\r
2377 #define isc_info_sql_type                 11\r
2378 #define isc_info_sql_sub_type             12\r
2379 #define isc_info_sql_scale                13\r
2380 #define isc_info_sql_length               14\r
2381 #define isc_info_sql_null_ind             15\r
2382 #define isc_info_sql_field                16\r
2383 #define isc_info_sql_relation             17\r
2384 #define isc_info_sql_owner                18\r
2385 #define isc_info_sql_alias                19\r
2386 #define isc_info_sql_sqlda_start          20\r
2387 #define isc_info_sql_stmt_type            21\r
2388 #define isc_info_sql_get_plan             22\r
2389 #define isc_info_sql_records              23\r
2390 #define isc_info_sql_batch_fetch          24\r
2391 \r
2392 /*********************************/\r
2393 /* SQL information return values */\r
2394 /*********************************/\r
2395 \r
2396 #define isc_info_sql_stmt_select          1\r
2397 #define isc_info_sql_stmt_insert          2\r
2398 #define isc_info_sql_stmt_update          3\r
2399 #define isc_info_sql_stmt_delete          4\r
2400 #define isc_info_sql_stmt_ddl             5\r
2401 #define isc_info_sql_stmt_get_segment     6\r
2402 #define isc_info_sql_stmt_put_segment     7\r
2403 #define isc_info_sql_stmt_exec_procedure  8\r
2404 #define isc_info_sql_stmt_start_trans     9\r
2405 #define isc_info_sql_stmt_commit          10\r
2406 #define isc_info_sql_stmt_rollback        11\r
2407 #define isc_info_sql_stmt_select_for_upd  12\r
2408 #define isc_info_sql_stmt_set_generator   13\r
2409 #define isc_info_sql_stmt_savepoint       14\r
2410 \r
2411 \r
2412 /***********************************/\r
2413 /* Server configuration key values */\r
2414 /***********************************/\r
2415 \r
2416 /* Not available in Firebird 1.5 */\r
2417 \r
2418 \r
2419 /**********************************************/\r
2420 /* Dynamic Data Definition Language operators */\r
2421 /**********************************************/\r
2422 \r
2423 /******************/\r
2424 /* Version number */\r
2425 /******************/\r
2426 \r
2427 #define isc_dyn_version_1                 1\r
2428 #define isc_dyn_eoc                       255\r
2429 \r
2430 /******************************/\r
2431 /* Operations (may be nested) */\r
2432 /******************************/\r
2433 \r
2434 #define isc_dyn_begin                     2\r
2435 #define isc_dyn_end                       3\r
2436 #define isc_dyn_if                        4\r
2437 #define isc_dyn_def_database              5\r
2438 #define isc_dyn_def_global_fld            6\r
2439 #define isc_dyn_def_local_fld             7\r
2440 #define isc_dyn_def_idx                   8\r
2441 #define isc_dyn_def_rel                   9\r
2442 #define isc_dyn_def_sql_fld               10\r
2443 #define isc_dyn_def_view                  12\r
2444 #define isc_dyn_def_trigger               15\r
2445 #define isc_dyn_def_security_class        120\r
2446 #define isc_dyn_def_dimension             140\r
2447 #define isc_dyn_def_generator             24\r
2448 #define isc_dyn_def_function              25\r
2449 #define isc_dyn_def_filter                26\r
2450 #define isc_dyn_def_function_arg          27\r
2451 #define isc_dyn_def_shadow                34\r
2452 #define isc_dyn_def_trigger_msg           17\r
2453 #define isc_dyn_def_file                  36\r
2454 #define isc_dyn_mod_database              39\r
2455 #define isc_dyn_mod_rel                   11\r
2456 #define isc_dyn_mod_global_fld            13\r
2457 #define isc_dyn_mod_idx                   102\r
2458 #define isc_dyn_mod_local_fld             14\r
2459 #define isc_dyn_mod_sql_fld               216\r
2460 #define isc_dyn_mod_view                  16\r
2461 #define isc_dyn_mod_security_class        122\r
2462 #define isc_dyn_mod_trigger               113\r
2463 #define isc_dyn_mod_trigger_msg           28\r
2464 #define isc_dyn_delete_database           18\r
2465 #define isc_dyn_delete_rel                19\r
2466 #define isc_dyn_delete_global_fld         20\r
2467 #define isc_dyn_delete_local_fld          21\r
2468 #define isc_dyn_delete_idx                22\r
2469 #define isc_dyn_delete_security_class     123\r
2470 #define isc_dyn_delete_dimensions         143\r
2471 #define isc_dyn_delete_trigger            23\r
2472 #define isc_dyn_delete_trigger_msg        29\r
2473 #define isc_dyn_delete_filter             32\r
2474 #define isc_dyn_delete_function           33\r
2475 #define isc_dyn_delete_shadow             35\r
2476 #define isc_dyn_grant                     30\r
2477 #define isc_dyn_revoke                    31\r
2478 #define isc_dyn_def_primary_key           37\r
2479 #define isc_dyn_def_foreign_key           38\r
2480 #define isc_dyn_def_unique                40\r
2481 #define isc_dyn_def_procedure             164\r
2482 #define isc_dyn_delete_procedure          165\r
2483 #define isc_dyn_def_parameter             135\r
2484 #define isc_dyn_delete_parameter          136\r
2485 #define isc_dyn_mod_procedure             175\r
2486 #define isc_dyn_def_log_file              176\r
2487 #define isc_dyn_def_cache_file            180\r
2488 #define isc_dyn_def_exception             181\r
2489 #define isc_dyn_mod_exception             182\r
2490 #define isc_dyn_del_exception             183\r
2491 #define isc_dyn_drop_log                  194\r
2492 #define isc_dyn_drop_cache                195\r
2493 #define isc_dyn_def_default_log           202\r
2494 \r
2495 /***********************/\r
2496 /* View specific stuff */\r
2497 /***********************/\r
2498 \r
2499 #define isc_dyn_view_blr                  43\r
2500 #define isc_dyn_view_source               44\r
2501 #define isc_dyn_view_relation             45\r
2502 #define isc_dyn_view_context              46\r
2503 #define isc_dyn_view_context_name         47\r
2504 \r
2505 /**********************/\r
2506 /* Generic attributes */\r
2507 /**********************/\r
2508 \r
2509 #define isc_dyn_rel_name                  50\r
2510 #define isc_dyn_fld_name                  51\r
2511 #define isc_dyn_new_fld_name              215\r
2512 #define isc_dyn_idx_name                  52\r
2513 #define isc_dyn_description               53\r
2514 #define isc_dyn_security_class            54\r
2515 #define isc_dyn_system_flag               55\r
2516 #define isc_dyn_update_flag               56\r
2517 #define isc_dyn_prc_name                  166\r
2518 #define isc_dyn_prm_name                  137\r
2519 #define isc_dyn_sql_object                196\r
2520 #define isc_dyn_fld_character_set_name    174\r
2521 \r
2522 /********************************/\r
2523 /* Relation specific attributes */\r
2524 /********************************/\r
2525 \r
2526 #define isc_dyn_rel_dbkey_length          61\r
2527 #define isc_dyn_rel_store_trig            62\r
2528 #define isc_dyn_rel_modify_trig           63\r
2529 #define isc_dyn_rel_erase_trig            64\r
2530 #define isc_dyn_rel_store_trig_source     65\r
2531 #define isc_dyn_rel_modify_trig_source    66\r
2532 #define isc_dyn_rel_erase_trig_source     67\r
2533 #define isc_dyn_rel_ext_file              68\r
2534 #define isc_dyn_rel_sql_protection        69\r
2535 #define isc_dyn_rel_constraint            162\r
2536 #define isc_dyn_delete_rel_constraint     163\r
2537 \r
2538 /************************************/\r
2539 /* Global field specific attributes */\r
2540 /************************************/\r
2541 \r
2542 #define isc_dyn_fld_type                  70\r
2543 #define isc_dyn_fld_length                71\r
2544 #define isc_dyn_fld_scale                 72\r
2545 #define isc_dyn_fld_sub_type              73\r
2546 #define isc_dyn_fld_segment_length        74\r
2547 #define isc_dyn_fld_query_header          75\r
2548 #define isc_dyn_fld_edit_string           76\r
2549 #define isc_dyn_fld_validation_blr        77\r
2550 #define isc_dyn_fld_validation_source     78\r
2551 #define isc_dyn_fld_computed_blr          79\r
2552 #define isc_dyn_fld_computed_source       80\r
2553 #define isc_dyn_fld_missing_value         81\r
2554 #define isc_dyn_fld_default_value         82\r
2555 #define isc_dyn_fld_query_name            83\r
2556 #define isc_dyn_fld_dimensions            84\r
2557 #define isc_dyn_fld_not_null              85\r
2558 #define isc_dyn_fld_precision             86\r
2559 #define isc_dyn_fld_char_length           172\r
2560 #define isc_dyn_fld_collation             173\r
2561 #define isc_dyn_fld_default_source        193\r
2562 #define isc_dyn_del_default               197\r
2563 #define isc_dyn_del_validation            198\r
2564 #define isc_dyn_single_validation         199\r
2565 #define isc_dyn_fld_character_set         203\r
2566 \r
2567 /***********************************/\r
2568 /* Local field specific attributes */\r
2569 /***********************************/\r
2570 \r
2571 #define isc_dyn_fld_source                90\r
2572 #define isc_dyn_fld_base_fld              91\r
2573 #define isc_dyn_fld_position              92\r
2574 #define isc_dyn_fld_update_flag           93\r
2575 \r
2576 /*****************************/\r
2577 /* Index specific attributes */\r
2578 /*****************************/\r
2579 \r
2580 #define isc_dyn_idx_unique                100\r
2581 #define isc_dyn_idx_inactive              101\r
2582 #define isc_dyn_idx_type                  103\r
2583 #define isc_dyn_idx_foreign_key           104\r
2584 #define isc_dyn_idx_ref_column            105\r
2585 #define isc_dyn_idx_statistic             204\r
2586 \r
2587 /*******************************/\r
2588 /* Trigger specific attributes */\r
2589 /*******************************/\r
2590 \r
2591 #define isc_dyn_trg_type                  110\r
2592 #define isc_dyn_trg_blr                   111\r
2593 #define isc_dyn_trg_source                112\r
2594 #define isc_dyn_trg_name                  114\r
2595 #define isc_dyn_trg_sequence              115\r
2596 #define isc_dyn_trg_inactive              116\r
2597 #define isc_dyn_trg_msg_number            117\r
2598 #define isc_dyn_trg_msg                   118\r
2599 \r
2600 /**************************************/\r
2601 /* Security Class specific attributes */\r
2602 /**************************************/\r
2603 \r
2604 #define isc_dyn_scl_acl                   121\r
2605 #define isc_dyn_grant_user                130\r
2606 #define isc_dyn_grant_user_explicit       219\r
2607 #define isc_dyn_grant_proc                186\r
2608 #define isc_dyn_grant_trig                187\r
2609 #define isc_dyn_grant_view                188\r
2610 #define isc_dyn_grant_options             132\r
2611 #define isc_dyn_grant_user_group          205\r
2612 #define isc_dyn_grant_role                218\r
2613 \r
2614 \r
2615 /**********************************/\r
2616 /* Dimension specific information */\r
2617 /**********************************/\r
2618 \r
2619 #define isc_dyn_dim_lower                 141\r
2620 #define isc_dyn_dim_upper                 142\r
2621 \r
2622 /****************************/\r
2623 /* File specific attributes */\r
2624 /****************************/\r
2625 \r
2626 #define isc_dyn_file_name                 125\r
2627 #define isc_dyn_file_start                126\r
2628 #define isc_dyn_file_length               127\r
2629 #define isc_dyn_shadow_number             128\r
2630 #define isc_dyn_shadow_man_auto           129\r
2631 #define isc_dyn_shadow_conditional        130\r
2632 \r
2633 /********************************/\r
2634 /* Log file specific attributes */\r
2635 /********************************/\r
2636 \r
2637 #define isc_dyn_log_file_sequence         177\r
2638 #define isc_dyn_log_file_partitions       178\r
2639 #define isc_dyn_log_file_serial           179\r
2640 #define isc_dyn_log_file_overflow         200\r
2641 #define isc_dyn_log_file_raw              201\r
2642 \r
2643 /***************************/\r
2644 /* Log specific attributes */\r
2645 /***************************/\r
2646 \r
2647 #define isc_dyn_log_group_commit_wait     189\r
2648 #define isc_dyn_log_buffer_size           190\r
2649 #define isc_dyn_log_check_point_length    191\r
2650 #define isc_dyn_log_num_of_buffers        192\r
2651 \r
2652 /********************************/\r
2653 /* Function specific attributes */\r
2654 /********************************/\r
2655 \r
2656 #define isc_dyn_function_name             145\r
2657 #define isc_dyn_function_type             146\r
2658 #define isc_dyn_func_module_name          147\r
2659 #define isc_dyn_func_entry_point          148\r
2660 #define isc_dyn_func_return_argument      149\r
2661 #define isc_dyn_func_arg_position         150\r
2662 #define isc_dyn_func_mechanism            151\r
2663 #define isc_dyn_filter_in_subtype         152\r
2664 #define isc_dyn_filter_out_subtype        153\r
2665 \r
2666 \r
2667 #define isc_dyn_description2              154\r
2668 #define isc_dyn_fld_computed_source2      155\r
2669 #define isc_dyn_fld_edit_string2          156\r
2670 #define isc_dyn_fld_query_header2         157\r
2671 #define isc_dyn_fld_validation_source2    158\r
2672 #define isc_dyn_trg_msg2                  159\r
2673 #define isc_dyn_trg_source2               160\r
2674 #define isc_dyn_view_source2              161\r
2675 #define isc_dyn_xcp_msg2                  184\r
2676 \r
2677 /*********************************/\r
2678 /* Generator specific attributes */\r
2679 /*********************************/\r
2680 \r
2681 #define isc_dyn_generator_name            95\r
2682 #define isc_dyn_generator_id              96\r
2683 \r
2684 /*********************************/\r
2685 /* Procedure specific attributes */\r
2686 /*********************************/\r
2687 \r
2688 #define isc_dyn_prc_inputs                167\r
2689 #define isc_dyn_prc_outputs               168\r
2690 #define isc_dyn_prc_source                169\r
2691 #define isc_dyn_prc_blr                   170\r
2692 #define isc_dyn_prc_source2               171\r
2693 \r
2694 /*********************************/\r
2695 /* Parameter specific attributes */\r
2696 /*********************************/\r
2697 \r
2698 #define isc_dyn_prm_number                138\r
2699 #define isc_dyn_prm_type                  139\r
2700 \r
2701 /********************************/\r
2702 /* Relation specific attributes */\r
2703 /********************************/\r
2704 \r
2705 #define isc_dyn_xcp_msg                   185\r
2706 \r
2707 /**********************************************/\r
2708 /* Cascading referential integrity values     */\r
2709 /**********************************************/\r
2710 #define isc_dyn_foreign_key_update        205\r
2711 #define isc_dyn_foreign_key_delete        206\r
2712 #define isc_dyn_foreign_key_cascade       207\r
2713 #define isc_dyn_foreign_key_default       208\r
2714 #define isc_dyn_foreign_key_null          209\r
2715 #define isc_dyn_foreign_key_none          210\r
2716 \r
2717 /***********************/\r
2718 /* SQL role values     */\r
2719 /***********************/\r
2720 #define isc_dyn_def_sql_role              211\r
2721 #define isc_dyn_sql_role_name             212\r
2722 #define isc_dyn_grant_admin_options       213\r
2723 #define isc_dyn_del_sql_role              214\r
2724 /* 215 & 216 are used some lines above. */\r
2725 \r
2726 /**********************************************/\r
2727 /* Generators again                           */\r
2728 /**********************************************/\r
2729 \r
2730 #ifndef __cplusplus                     /* c definitions */\r
2731 #define gds_dyn_delete_generator          217\r
2732 #else                                   /* c++ definitions */\r
2733 const unsigned char gds_dyn_delete_generator       = 217;\r
2734 #endif\r
2735 \r
2736 /****************************/\r
2737 /* Last $dyn value assigned */\r
2738 /****************************/\r
2739 \r
2740 #define isc_dyn_last_dyn_value            219\r
2741 \r
2742 /******************************************/\r
2743 /* Array slice description language (SDL) */\r
2744 /******************************************/\r
2745 \r
2746 #define isc_sdl_version1                  1\r
2747 #define isc_sdl_eoc                       255\r
2748 #define isc_sdl_relation                  2\r
2749 #define isc_sdl_rid                       3\r
2750 #define isc_sdl_field                     4\r
2751 #define isc_sdl_fid                       5\r
2752 #define isc_sdl_struct                    6\r
2753 #define isc_sdl_variable                  7\r
2754 #define isc_sdl_scalar                    8\r
2755 #define isc_sdl_tiny_integer              9\r
2756 #define isc_sdl_short_integer             10\r
2757 #define isc_sdl_long_integer              11\r
2758 #define isc_sdl_literal                   12\r
2759 #define isc_sdl_add                       13\r
2760 #define isc_sdl_subtract                  14\r
2761 #define isc_sdl_multiply                  15\r
2762 #define isc_sdl_divide                    16\r
2763 #define isc_sdl_negate                    17\r
2764 #define isc_sdl_eql                       18\r
2765 #define isc_sdl_neq                       19\r
2766 #define isc_sdl_gtr                       20\r
2767 #define isc_sdl_geq                       21\r
2768 #define isc_sdl_lss                       22\r
2769 #define isc_sdl_leq                       23\r
2770 #define isc_sdl_and                       24\r
2771 #define isc_sdl_or                        25\r
2772 #define isc_sdl_not                       26\r
2773 #define isc_sdl_while                     27\r
2774 #define isc_sdl_assignment                28\r
2775 #define isc_sdl_label                     29\r
2776 #define isc_sdl_leave                     30\r
2777 #define isc_sdl_begin                     31\r
2778 #define isc_sdl_end                       32\r
2779 #define isc_sdl_do3                       33\r
2780 #define isc_sdl_do2                       34\r
2781 #define isc_sdl_do1                       35\r
2782 #define isc_sdl_element                   36\r
2783 \r
2784 /********************************************/\r
2785 /* International text interpretation values */\r
2786 /********************************************/\r
2787 \r
2788 #define isc_interp_eng_ascii              0\r
2789 #define isc_interp_jpn_sjis               5\r
2790 #define isc_interp_jpn_euc                6\r
2791 \r
2792 /*******************/\r
2793 /* SQL definitions */\r
2794 /*******************/\r
2795 \r
2796 #define SQL_TEXT                           452\r
2797 #define SQL_VARYING                        448\r
2798 #define SQL_SHORT                          500\r
2799 #define SQL_LONG                           496\r
2800 #define SQL_FLOAT                          482\r
2801 #define SQL_DOUBLE                         480\r
2802 #define SQL_D_FLOAT                        530\r
2803 #define SQL_TIMESTAMP                      510\r
2804 #define SQL_BLOB                           520\r
2805 #define SQL_ARRAY                          540\r
2806 #define SQL_QUAD                           550\r
2807 #define SQL_TYPE_TIME                      560\r
2808 #define SQL_TYPE_DATE                      570\r
2809 #define SQL_INT64                          580\r
2810 \r
2811 /* Historical alias for pre V6 applications */\r
2812 #define SQL_DATE                        SQL_TIMESTAMP\r
2813 \r
2814 /*****************/\r
2815 /* Blob Subtypes */\r
2816 /*****************/\r
2817 \r
2818 /* types less than zero are reserved for customer use */\r
2819 \r
2820 #define isc_blob_untyped                   0\r
2821 \r
2822 /* internal subtypes */\r
2823 \r
2824 #define isc_blob_text                      1\r
2825 #define isc_blob_blr                       2\r
2826 #define isc_blob_acl                       3\r
2827 #define isc_blob_ranges                    4\r
2828 #define isc_blob_summary                   5\r
2829 #define isc_blob_format                    6\r
2830 #define isc_blob_tra                       7\r
2831 #define isc_blob_extfile                   8\r
2832 \r
2833 /* the range 20-30 is reserved for dBASE and Paradox types */\r
2834 \r
2835 #define isc_blob_formatted_memo            20\r
2836 #define isc_blob_paradox_ole               21\r
2837 #define isc_blob_graphic                   22\r
2838 #define isc_blob_dbase_ole                 23\r
2839 #define isc_blob_typed_binary              24\r
2840 \r
2841 /* Deprecated definitions maintained for compatibility only */\r
2842 \r
2843 #define isc_info_db_SQL_dialect           62\r
2844 #define isc_dpb_SQL_dialect               63\r
2845 #define isc_dpb_set_db_SQL_dialect        65\r
2846 \r
2847 \r
2848 #include "iberror.h"\r
2849 \r
2850 #endif /* JRD_IBASE_H */\r
2851 \r