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