1 /* Copyright (c) 2001-2016, The HSQL Development Group
2  * All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  *
7  * Redistributions of source code must retain the above copyright notice, this
8  * list of conditions and the following disclaimer.
9  *
10  * Redistributions in binary form must reproduce the above copyright notice,
11  * this list of conditions and the following disclaimer in the documentation
12  * and/or other materials provided with the distribution.
13  *
14  * Neither the name of the HSQL Development Group nor the names of its
15  * contributors may be used to endorse or promote products derived from this
16  * software without specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21  * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
22  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30 
31 
32 package org.hsqldb.result;
33 
34 import org.hsqldb.StatementTypes;
35 
36 /**
37  * An enumeration of the request and response mode values used to communicate
38  * between the client and the engine when sending Result objects back
39  * and forth.
40  *
41  * @author Campbell Burnet (boucherb@users dot sourceforge.net)
42  * @author Fred Toussi (fredt@users dot sourceforge.net)
43  * @since 2.1.1
44  * @version 1.7.2
45  */
46 
47 // fredt@users - the constants from the SQL standards are used freely where a
48 // similar function is performed. The Result objects do not necessarily contain
49 // the same information as stated in SQL standard for CLI.
50 public interface ResultConstants {
51 
52     /** The offset at which HSQLDB API Result mode values start. */
53     int HSQL_API_BASE = 0;
54 
55     /**
56      * Not a result
57      */
58     int NONE = HSQL_API_BASE + 0;
59 
60     /**
61      * Indicates that the Result object encapsulates an update
62      * count response.
63      */
64     int UPDATECOUNT = HSQL_API_BASE + 1;
65 
66     /**
67      * Indicates that the Result object encapsulates an
68      * error response.
69      */
70     int ERROR = HSQL_API_BASE + 2;
71 
72     /**
73      * Indicates that the Result object encapsulates a result
74      * set response containing data.
75      */
76     int DATA = HSQL_API_BASE + 3;
77 
78     /**
79      * Indicates that the Result object encapsulates a response
80      * that communicates the acknowledgement of newly allocated
81      * Statement object in the form of its statementID
82      * and metadata
83      */
84     int PREPARE_ACK = HSQL_API_BASE + 4;
85 
86     /**
87      * Indicates that Result encapsulates a request to cancel execution of
88      * a CLI routine.
89      */
90     int SQLCANCEL = HSQL_API_BASE + 5;
91 
92     /**
93      * Indicates that the Result object encapsulates a result
94      * set for setting session attributes.
95      */
96     int SETSESSIONATTR = HSQL_API_BASE + 6;
97 
98     /**
99      * Indicates that the Result object encapsulates a request
100      * to get session attributes.
101      */
102     int GETSESSIONATTR = HSQL_API_BASE + 7;
103 
104     /**
105      * Indicates that the Result object encapsulates a batch of statements
106      */
107     int BATCHEXECDIRECT = HSQL_API_BASE + 8;
108 
109     /**
110      * Indicates that the Result object encapsulates a batch of prepared
111      * statement parameter values
112      */
113     int BATCHEXECUTE = HSQL_API_BASE + 9;
114 
115     /**
116      * Indicates that the Result object encapsulates a request to start a new
117      * internal session for the connection
118      */
119     int RESETSESSION = HSQL_API_BASE + 10;
120 
121     /**
122      * Indicates that the Result object encapsulates a response to a connection
123      * attempt that was successful
124      */
125     int CONNECTACKNOWLEDGE = HSQL_API_BASE + 11;
126 
127     /**
128      * Indicates that the Result object encapsulates a request to prepare
129      * to commit as the first phase of a two-phase commit
130      */
131     int PREPARECOMMIT = HSQL_API_BASE + 12;
132 
133     /**
134      * Indicates that the Result object encapsulates a request to return
135      * some rows of data
136      */
137     int REQUESTDATA = HSQL_API_BASE + 13;
138 
139     /**
140      * Indicates that the Result object encapsulates a set of data rows
141      * without metadata
142      */
143     int DATAROWS = HSQL_API_BASE + 14;
144 
145     /**
146      * Indicates that the Result object encapsulates a set of data rows
147      * with metadata
148      */
149     int DATAHEAD = HSQL_API_BASE + 15;
150 
151     /**
152      * Indicates that the Result object encapsulates a set of update counts
153      * for a batch execution
154      */
155     int BATCHEXECRESPONSE = HSQL_API_BASE + 16;
156 
157     /**
158      * Only for metadata, indicates that the metadata is for the parameters.
159      */
160     int PARAM_METADATA = HSQL_API_BASE + 17;
161 
162     /**
163      * Common result type for all large object operations
164      */
165     int LARGE_OBJECT_OP = HSQL_API_BASE + 18;
166 
167     /**
168      * Warning
169      */
170     int WARNING = HSQL_API_BASE + 19;
171 
172     /**
173      * generated data
174      */
175     int GENERATED = HSQL_API_BASE + 20;
176 
177     /**
178      * attempt to execute invalid statement
179      */
180     int EXECUTE_INVALID = HSQL_API_BASE + 21;
181 
182     /**
183      * Indicates that Result encapsulates a request to establish a connection.
184      */
185     int CONNECT = HSQL_API_BASE + 31;
186 
187     /**
188      * Indicates that Result encapsulates a request to terminate an
189      * established connection.
190      */
191     int DISCONNECT = HSQL_API_BASE + 32;
192 
193     /**
194      * Indicates that Result encapsulates a request to terminate an
195      * SQL-transaction.
196      */
197     int ENDTRAN = HSQL_API_BASE + 33;
198 
199     /**
200      * Indicates that Result encapsulates a request to execute a statement
201      * directly.
202      */
203     int EXECDIRECT = HSQL_API_BASE + 34;
204 
205     /**
206      * Indicates that Result encapsulates a request to execute a prepared
207      * statement.
208      */
209     int EXECUTE = HSQL_API_BASE + 35;
210 
211     /**
212      * Indicates that Result encapsulates a request to deallocate an
213      * SQL-statement.
214      */
215     int FREESTMT = HSQL_API_BASE + 36;
216 
217     /**
218      * Indicates that Result encapsulates a request to prepare a statement.
219      */
220     int PREPARE = HSQL_API_BASE + 37;
221 
222     /**
223      * Indicates that Result encapsulates a request to set the value of an
224      * SQL-connection attribute.
225      */
226     int SETCONNECTATTR = HSQL_API_BASE + 38;
227 
228     /**
229      * Indicates that Result encapsulates a request to explicitly start an
230      * SQL-transaction and set its characteristics.
231      */
232     int STARTTRAN = HSQL_API_BASE + 39;
233 
234     /**
235      * Indicates that the Result encapsulates a request to close a result set
236      */
237     int CLOSE_RESULT = HSQL_API_BASE + 40;
238 
239     /**
240      * Indicates that the Result encapsulates a request to update or insert into a result set
241      */
242     int UPDATE_RESULT = HSQL_API_BASE + 41;
243 
244     /**
245      * Indicates that the Result encapsulates a simple value for internal use
246      */
247     int VALUE = HSQL_API_BASE + 42;
248 
249     /**
250      * Indicates that the Result encapsulates a response to a procedure call via CallableStatement
251      */
252     int CALL_RESPONSE = HSQL_API_BASE + 43;
253 
254     /**
255      * Indicates that the Result encapsulates a data change set
256      */
257     int CHANGE_SET = HSQL_API_BASE + 44;
258 
259     /**
260      * Constants above this limit are handled as non-HSQLDB results
261      */
262     int MODE_UPPER_LIMIT = HSQL_API_BASE + 48;
263 
264 //    /** The offset at which the standard SQL API Result mode values start. */
265 //    int SQL_API_BASE = 0x00010000;
266 //
267 //    /**
268 //     * Indicates that Result encapsulates a request to allocate an
269 //     * SQL-connection and assign a handle to it.
270 //     */
271 //    int SQLALLOCCONNECT     = SQL_API_BASE + 1;
272 //    /**
273 //     * Indicates that Result encapsulates a request to allocate an
274 //     * SQL-environment and assign a handle to it.
275 //     */
276 //    int SQLALLOCENV         = SQL_API_BASE + 2;
277 //
278 //    /**
279 //     * Indicates that Result encapsulates a request to allocate a resource
280 //     * and assign a handle to it.
281 //     */
282 //    int SQLALLOCHANDLE      = SQL_API_BASE + 1001;
283 //
284 //    /**
285 //     * Indicates that Result encapsulates a request to allocate an
286 //     * SQL-statement and assign a handle to it.
287 //     */
288 //    int SQLALLOCSTMT        = SQL_API_BASE + 3;
289 //
290 //    /**
291 //     * Indicates that Result encapsulates a request to describe a target
292 //     * specification or array of target specifications.
293 //     */
294 //    int SQLBINDCOL          = SQL_API_BASE + 4;
295 //
296 //    /**
297 //     * Indicates that Result encapsulates a request to describe a
298 //     * dynamic parameter specification and its value.
299 //     */
300 //    int SQLBINDPARAMETER    = SQL_API_BASE + 72;
301 //
302 //    /**
303 //     * Indicates that Result encapsulates a request to cancel execution of
304 //     * a CLI routine.
305 //     */
306 //    int SQLCANCEL           = SQL_API_BASE + 5;
307 //
308 //    /** Indicates that Result encapsulates a request to close a cursor. */
309 //    int SQLCLOSECURSOR      = SQL_API_BASE + 1003;
310 //
311 //    /**
312 //     * Indicates that Result encapsulates a request to get a
313 //     * column attribute.
314 //     */
315 //    int SQLCOLATTRIBUTE     = SQL_API_BASE + 6;
316 //
317 //    /**
318 //     * Indicates that Result encapsulates a request to return a result set that
319 //     * contains a list of the privileges held on the columns whose names adhere
320 //     * to the requested pattern or patterns within a single specified table
321 //     * stored in the Information Schema of the connected data source.
322 //     */
323 //    int SQLCOLUMNPRIVILEGES = SQL_API_BASE + 56;
324 //
325 //    /**
326 //     * Indicates that Result encapsulates a request to, based on the specified
327 //     * selection criteria, return a result set that contains information about
328 //     * columns of tables stored in the information schemas of the connected
329 //     * data source.
330 //     */
331 //    int SQLCOLUMNS          = SQL_API_BASE + 40;
332 //
333 //
334 //    /**
335 //     * Indicates that Result encapsulates a request to establish a connection.
336 //     */
337 //    int SQLCONNECT = SQL_API_BASE + 7;
338 //
339 //    /**
340 //     * Indicates that Result encapsulates a request to copy a CLI descriptor.
341 //     */
342 //    int SQLCOPYDESC         = SQL_API_BASE + 1004;
343 //
344 //    /**
345 //     * Indicates that Result encapsulates a request to get server name(s) that
346 //     * the application can connect to, along with description information,
347 //     * if available.
348 //     */
349 //    int SQLDATASOURCES      = SQL_API_BASE + 57;
350 //
351 //    /**
352 //     * Indicates that Result encapsulates a request to get column attributes.
353 //     */
354 //    int SQLDESCRIBECOL      = SQL_API_BASE + 8;
355 //
356 //
357 //    /**
358 //     * Indicates that Result encapsulates a request to terminate an
359 //     * established connection.
360 //     */
361 //    int SQLDISCONNECT = SQL_API_BASE + 9;
362 //
363 //    /**
364 //     * Indicates that Result encapsulates a request to terminate an
365 //     * SQL-transaction.
366 //     */
367 //    int SQLENDTRAN = SQL_API_BASE + 1005;
368 //
369 //    /**
370 //     * Indicates that Result encapsulates a request to return diagnostic
371 //     * information.
372 //     */
373 //    int SQLERROR            = SQL_API_BASE + 10;
374 //
375 //    /**
376 //     * Indicates that Result encapsulates a request to execute a statement
377 //     * directly.
378 //     */
379 //    int SQLEXECDIRECT = SQL_API_BASE + 11;
380 //
381 //    /**
382 //     * Indicates that Result encapsulates a request to execute a prepared
383 //     * statement.
384 //     */
385 //    int SQLEXECUTE = SQL_API_BASE + 12;
386 //
387 //    /**
388 //     * Indicates that Result encapsulates a request to fetch the next row of
389 //     * a cursor.
390 //     */
391 //
392 //  int SQLFETCH = SQL_API_BASE + 13;
393 //
394 //    /**
395 //     * Indicates that Result encapsulates a request to position a cursor on
396 //     * the specified row and retrieve values from that row.
397 //     */
398 //  int SQLFETCHSCROLL = SQL_API_BASE + 1021;
399 //    /**
400 //     * Indicates that Result encapsulates a request to return a result set
401 //     * that contains information about foreign keys either in or referencing
402 //     * a single specified table stored in the Information Schema of the
403 //     * connected data source.
404 //     */
405 //    int SQLFOREIGNKEYS      = SQL_API_BASE + 60;
406 //
407 //    /**
408 //     * Indicates that Result encapsulates a request to deallocate an
409 //     * SQL-connection.
410 //     */
411 //    int SQLFREECONNECT      = SQL_API_BASE + 14;
412 //
413 //    /**
414 //     * Indicates that Result encapsulates a request to deallocate an
415 //     * SQL-environment.
416 //     */
417 //    int SQLFREEENV          = SQL_API_BASE + 15;
418 //
419 //    /**
420 //     * Indicates that Result encapsulates a request to free a resource.
421 //     */
422 //    int SQLFREEHANDLE       = SQL_API_BASE + 1006;
423 //
424 //    /**
425 //     * Indicates that Result encapsulates a request to deallocate an
426 //     * SQL-statement.
427 //     */
428 //    int SQLFREESTMT = SQL_API_BASE + 16;
429 //
430 //    /**
431 //     * Indicates that Result encapsulates a request to get the value of an
432 //     * SQL-connection attribute.
433 //     */
434 //    int SQLGETCONNECTATTR   = SQL_API_BASE + 1007;
435 //
436 //    /**
437 //     * Indicates that Result encapsulates a request to get a cursor name.
438 //     */
439 //    int SQLGETCURSORNAME    = SQL_API_BASE + 17;
440 //
441 //    /**
442 //     * Indicates that Result encapsulates a request to retrieve a column value.
443 //     */
444 //    int SQLGETDATA          = SQL_API_BASE + 43;
445 //
446 //    /**
447 //     * Indicates that Result encapsulates a request to get a field from a CLI
448 //     * descriptor area.
449 //     */
450 //    int SQLGETDESCFIELD     = SQL_API_BASE + 1008;
451 //
452 //    /**
453 //     * Indicates that Result encapsulates a request to get commonly-used
454 //     * fields from a CLI descriptor area.
455 //     */
456 //    int SQLGETDESCREC       = SQL_API_BASE + 1009;
457 //
458 //    /**
459 //     * Indicates that Result encapsulates a request to get information from a
460 //     * CLI diagnostics area.
461 //     */
462 //    int SQLGETDIAGFIELD     = SQL_API_BASE + 1010;
463 //
464 //    /** Indicates that Result encapsulates a request to get commonly-used
465 //     * information from a CLI diagnostics area.
466 //     */
467 //    int SQLGETDIAGREC       = SQL_API_BASE + 1011;
468 //
469 //    /**
470 //     * Indicates that Result encapsulates a request to get the value of an
471 //     * SQL-environment attribute.
472 //     */
473 //    int SQLGETENVATTR       = SQL_API_BASE + 1012;
474 //
475 //    /**
476 //     * Indicates that Result encapsulates a request to get information
477 //     * about features supported by the CLI implementation.
478 //     */
479 //    int SQLGETFEATUREINFO   = SQL_API_BASE + 1027;
480 //
481 //    /**
482 //     * Indicates that Result encapsulates a request to determine whether a CLI
483 //     * routine is supported.
484 //     */
485 //    int SQLGETFUNCTIONS     = SQL_API_BASE + 44;
486 //
487 //    /**
488 //     * Indicates that Result encapsulates a request to get information about
489 //     * the implementation.
490 //     */
491 //    int SQLGETINFO          = SQL_API_BASE + 45;
492 //
493 //    /**
494 //     * Indicates that Result encapsulates a request to retrieve the length of
495 //     * the character or octet string value represented by a Large Object
496 //     * locator.
497 //     */
498 //    int SQLGETLENGTH        = SQL_API_BASE + 1022;
499 //
500 //    /**
501 //     * Indicates that Result encapsulates a request to retrieve the value of a
502 //     * dynamic output parameter.
503 //     */
504 //    int SQLGETPARAMDATA     = SQL_API_BASE + 1025;
505 //
506 //    /**
507 //     * Indicates that Result encapsulates a request to retrieve the starting
508 //     * position of a string value within another string value, where the second
509 //     * string value is represented by a Large Object locator.
510 //     */
511 //    int SQLGETPOSITION      = SQL_API_BASE + 1023;
512 //
513 //
514 //    /**
515 //     * Indicates that Result encapsulates a request to get information about
516 //     * general value specifications supported by the implementation.
517 //     */
518 //    int SQLGETSESSIONINFO = SQL_API_BASE + 1028;
519 //    /**
520 //     * Indicates that Result encapsulates a request to get the value of an
521 //     * SQL-statement attribute.
522 //     */
523 //    int SQLGETSTMTATTR      = SQL_API_BASE + 1014;
524 //
525 //    /**
526 //     * Indicates that Result encapsulates a request to either retrieve a
527 //     * portion of a character or octet string value that is represented by
528 //     * a Large Object locator or create a Large Object value at the server
529 //     * and retrieve a Large Object locator for that value.
530 //     */
531 //    int SQLGETSUBSTRING     = SQL_API_BASE + 1024;
532 //
533 //    /**
534 //     * Indicates that Result encapsulates a request to get information about
535 //     * one or all of the predefined data types supported by the implementation.
536 //     */
537 //    int SQLGETTYPEINFO      = SQL_API_BASE + 47;
538 //
539 //    /**
540 //     * Indicates that Result encapsulates a request to determine whether there
541 //     * are more result sets available on a statement handle and, if there are,
542 //     * initialize processing for those result sets.
543 //     */
544 //  int SQLMORERESULTS = SQL_API_BASE + 61;
545 //
546 //    /**
547 //     * Indicates that Result encapsulates a request to determine whether there
548 //     * are more result sets available on a statement handle and, if there are,
549 //     * initialize processing for the next result set on a separate statement
550 //     * handle.
551 //     */
552 //  int SQLNEXTRESULT = SQL_API_BASE + 73;
553 //    /**
554 //     * Indicates that Result encapsulates a request to get the number of
555 //     * result columns of a prepared or executed statement.
556 //     */
557 //    int SQLNUMRESULTCOLS = SQL_API_BASE + 18;
558 //    /**
559 //     * Indicates that Result encapsulates a request to process a deferred
560 //     * parameter value. For example, a streamed or locator identified
561 //     * parameter.
562 //     */
563 //    int SQLPARAMDATA        = SQL_API_BASE + 48;
564 //
565 //    /**
566 //     * Indicates that Result encapsulates a request to prepare a statement.
567 //     */
568 //    int SQLPREPARE = SQL_API_BASE + 19;
569 //
570 //    /**
571 //     * Indicates that Result encapsulates a request to return a result set that
572 //     * contains a list of the column names that comprise the primary key for a
573 //     * single specified table stored in the information schemas of the
574 //     * connected data source.
575 //     */
576 //    int SQLPRIMARYKEYS      = SQL_API_BASE + 65;
577 //
578 //    /**
579 //     * Indicates that Result encapsulates a request to provide a deferred
580 //     * parameter value. For example, a streamed or locator-identified
581 //     * parameter.
582 //     */
583 //    int SQLPUTDATA          = SQL_API_BASE + 49;
584 //
585 //    /**
586 //     * Indicates that Result encapsulates a request to get the row count of an
587 //     * executed statement.
588 //     */
589 //    int SQLROWCOUNT = SQL_API_BASE + 20;
590 //
591 //    /**
592 //     * Indicates that Result encapsulates a request to set the value of an
593 //     * SQL-connection attribute.
594 //     */
595 //    int SQLSETCONNECTATTR = SQL_API_BASE + 1016;
596 //
597 //
598 //    /** Indicates that Result encapsulates a request to set a cursor name. */
599 //    int SQLSETCURSORNAME    = SQL_API_BASE + 21;
600 //
601 //    /**
602 //     * Indicates that Result encapsulates a request to set a field in a CLI
603 //     * descriptor area.
604 //     */
605 //    int SQLSETDESCFIELD     = SQL_API_BASE + 1017;
606 //
607 //    /**
608 //     * Indicates that Result encapsulates a request to set commonly-used
609 //     * fields in a CLI descriptor area.
610 //     */
611 //    int SQLSETDESCREC       = SQL_API_BASE + 1018;
612 //
613 //
614 //    /**
615 //     * Indicates that Result encapsulates a request to set the value of an
616 //     * SQL-environment attribute.
617 //     */
618 //  int SQLSETENVATTR = SQL_API_BASE + 1019;
619 //    /** Indicates that Result encapsulates a request to set the value of an
620 //     * SQL-statement attribute.
621 //     */
622 //    int SQLSETSTMTATTR      = SQL_API_BASE + 1020;
623 //
624 //    /**
625 //     * Indicates that Result encapsulates a request to return a result set that
626 //     * contains a list of columns the combined values of which can uniquely
627 //     * identify any row within a single specified table described by the
628 //     * Information Schemas of the connected data source.
629 //     */
630 //    int SQLSPECIALCOLUMNS   = SQL_API_BASE + 52;
631 //
632 //
633 //    /**
634 //     * Indicates that Result encapsulates a request to explicitly start an
635 //     * SQL-transaction and set its characteristics.
636 //     */
637 //    int SQLSTARTTRAN = SQL_API_BASE + 74;
638 //
639 //    /**
640 //     * Indicates that Result encapsulates a request to return a result set that
641 //     * contains a list of the privileges held on the tables whose names adhere
642 //     * to the requested pattern(s) within tables described by the Information
643 //     * Schemas of the connected data source.
644 //     */
645 //    int SQLTABLES           = SQL_API_BASE + 54;
646 //
647 //    /**
648 //     * Indicates that Result encapsulates a request to, based on the specified
649 //     * selection criteria, return a result set that contains information about
650 //     * tables described by the Information Schema of the connected data source.
651 //     */
652 //    int SQLTABLEPRIVILEGES  = SQL_API_BASE + 70;
653 /*
654  Codes for transaction termination:
655 
656  COMMIT 0
657  ROLLBACK 1
658  SAVEPOINT NAME ROLLBACK 2
659  SAVEPOINT NAME RELEASE 4
660  COMMIT AND CHAIN 6
661  ROLLBACK AND CHAIN 7
662  Implementation-defined termination type <0
663  */
664     int TX_COMMIT                  = 0;
665     int TX_ROLLBACK                = 1;
666     int TX_SAVEPOINT_NAME_ROLLBACK = 2;
667     int TX_SAVEPOINT_NAME_RELEASE  = 4;
668     int TX_COMMIT_AND_CHAIN        = 6;
669     int TX_ROLLBACK_AND_CHAIN      = 7;
670 
671 /* StatementType codes duplicated for cursor operations */
672     int UPDATE_CURSOR = StatementTypes.UPDATE_CURSOR;
673     int DELETE_CURSOR = StatementTypes.DELETE_CURSOR;
674     int INSERT_CURSOR = StatementTypes.INSERT;
675 
676 /* Environment attributes */
677 
678 //#define SQL_ATTR_OUTPUT_NTS 10001
679 
680 /* Connection attributes */
681 
682 //#define SQL_ATTR_AUTO_IPD 10001
683 //#define SQL_ATTR_SAVEPOINT_NAME 10027
684     int SQL_ATTR_SAVEPOINT_NAME = 10027;
685 
686 // Batched execution constants:
687 
688     /** batch item failed */
689     int EXECUTE_FAILED = -3;
690 
691     /**
692      * Batch item succeeded but does not generate an update count,
693      * for example a call having no return value
694      */
695     int SUCCESS_NO_INFO = -2;
696 /*
697    SQL standard properties
698    The operational sensitivity property (either SENSITIVE, INSENSITIVE, or ASENSITIVE).
699    The operational scrollability property (either SCROLL or NO SCROLL).
700    The operational holdability property (either WITH HOLD or WITHOUT HOLD).
701    The operational returnability property (either WITH RETURN or WITHOUT RETURN).
702 */
703     int SQL_ASENSITIVE    = 0;
704     int SQL_INSENSITIVE   = 1;
705     int SQL_SENSITIVE     = 2;
706     int SQL_NONSCROLLABLE = 0;
707     int SQL_SCROLLABLE    = 1;
708     int SQL_NONHOLDABLE   = 0;
709     int SQL_HOLDABLE      = 1;
710 
711 //
712     int SQL_WITHOUT_RETURN = 0;
713     int SQL_WITH_RETURN    = 1;
714     int SQL_NOT_UPDATABLE  = 0;
715     int SQL_UPDATABLE      = 1;
716 
717 // data result properties - matching java.sql.ResultSet constants
718     int TYPE_FORWARD_ONLY       = 1003;
719     int TYPE_SCROLL_INSENSITIVE = 1004;
720     int TYPE_SCROLL_SENSITIVE   = 1005;
721 
722     //
723     int CONCUR_READ_ONLY = 1007;
724     int CONCUR_UPDATABLE = 1008;
725 
726     //
727     int HOLD_CURSORS_OVER_COMMIT = 1;
728     int CLOSE_CURSORS_AT_COMMIT  = 2;
729 
730     /** Constants indicating generated key return behaviour */
731     int RETURN_GENERATED_KEYS             = 1;     // matching java.sql.Statement constant
732     int RETURN_NO_GENERATED_KEYS          = 2;     // matching java.sql.Statement constant
733     int RETURN_GENERATED_KEYS_COL_NAMES   = 11;    // constant in HSQLDB only
734     int RETURN_GENERATED_KEYS_COL_INDEXES = 21;    // constant in HSQLDB only
735 }
736