Source code: org/hsqldb/jdbcDatabaseMetaData.java
1 /* Copyrights and Licenses
2 *
3 * This product includes Hypersonic SQL.
4 * Originally developed by Thomas Mueller and the Hypersonic SQL Group.
5 *
6 * Copyright (c) 1995-2000 by the Hypersonic SQL Group. All rights reserved.
7 * Redistribution and use in source and binary forms, with or without modification, are permitted
8 * provided that the following conditions are met:
9 * - Redistributions of source code must retain the above copyright notice, this list of conditions
10 * and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright notice, this list of
12 * conditions and the following disclaimer in the documentation and/or other materials
13 * provided with the distribution.
14 * - All advertising materials mentioning features or use of this software must display the
15 * following acknowledgment: "This product includes Hypersonic SQL."
16 * - Products derived from this software may not be called "Hypersonic SQL" nor may
17 * "Hypersonic SQL" appear in their names without prior written permission of the
18 * Hypersonic SQL Group.
19 * - Redistributions of any form whatsoever must retain the following acknowledgment: "This
20 * product includes Hypersonic SQL."
21 * This software is provided "as is" and any expressed or implied warranties, including, but
22 * not limited to, the implied warranties of merchantability and fitness for a particular purpose are
23 * disclaimed. In no event shall the Hypersonic SQL Group or its contributors be liable for any
24 * direct, indirect, incidental, special, exemplary, or consequential damages (including, but
25 * not limited to, procurement of substitute goods or services; loss of use, data, or profits;
26 * or business interruption). However caused any on any theory of liability, whether in contract,
27 * strict liability, or tort (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 * This software consists of voluntary contributions made by many individuals on behalf of the
30 * Hypersonic SQL Group.
31 *
32 *
33 * For work added by the HSQL Development Group:
34 *
35 * Copyright (c) 2001-2002, The HSQL Development Group
36 * All rights reserved.
37 *
38 * Redistribution and use in source and binary forms, with or without
39 * modification, are permitted provided that the following conditions are met:
40 *
41 * Redistributions of source code must retain the above copyright notice, this
42 * list of conditions and the following disclaimer, including earlier
43 * license statements (above) and comply with all above license conditions.
44 *
45 * Redistributions in binary form must reproduce the above copyright notice,
46 * this list of conditions and the following disclaimer in the documentation
47 * and/or other materials provided with the distribution, including earlier
48 * license statements (above) and comply with all above license conditions.
49 *
50 * Neither the name of the HSQL Development Group nor the names of its
51 * contributors may be used to endorse or promote products derived from this
52 * software without specific prior written permission.
53 *
54 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
55 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
56 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
57 * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
58 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
59 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
60 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
61 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
62 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
63 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
64 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
65 */
66
67
68 package org.hsqldb;
69
70 import org.hsqldb.lib.StringUtil;
71 import java.sql.Connection;
72 import java.sql.DatabaseMetaData;
73 import java.sql.ResultSet;
74 import java.sql.SQLException;
75
76 // fredt@users 20020320 - patch 1.7.0 - JDBC 2 support and error trapping
77 // JDBC 2 methods can now be called from jdk 1.1.x - see javadoc comments
78 // boucherb@users 20020509 - added "throws SQLException" to all methods where
79 // it was missing here but specified in the java.sql.DatabaseMetaData interface,
80 // updated generic documentation to JDK 1.4, and added JDBC3 methods and docs
81 // boucherb@users and fredt@users 20020409/20020505 extensive review and update
82 // of docs and behaviour to comply with previous and latest java.sql specification
83
84 /**
85 * Comprehensive information about the database as a whole.
86 * <P>
87 * This interface is implemented by driver vendors to let users know the capabilities
88 * of a Database Management System (DBMS) in combination with
89 * the driver based on JDBC<sup><font size=-2>TM</font></sup> technology
90 * ("JDBC driver") that is used with it. Different relational DBMSs often support
91 * different features, implement features in different ways, and use different
92 * data types. In addition, a driver may implement a feature on top of what the
93 * DBMS offers. Information returned by methods in this interface applies
94 * to the capabilities of a particular driver and a particular DBMS working
95 * together. Note that as used in this documentation, the term "database" is
96 * used generically to refer to both the driver and DBMS.
97 * <P>
98 * A user for this interface is commonly a tool that needs to discover how to
99 * deal with the underlying DBMS. This is especially true for applications
100 * that are intended to be used with more than one DBMS. For example, a tool might use the method
101 * <code>getTypeInfo</code> to find out what data types can be used in a
102 * <code>CREATE TABLE</code> statement. Or a user might call the method
103 * <code>supportsCorrelatedSubqueries</code> to see if it is possible to use
104 * a correlated subquery or <code>supportsBatchUpdates</code> to see if it is
105 * possible to use batch updates.
106 * <P>
107 * Some <code>DatabaseMetaData</code> methods return lists of information
108 * in the form of <code>ResultSet</code> objects.
109 * Regular <code>ResultSet</code> methods, such as
110 * <code>getString</code> and <code>getInt</code>, can be used
111 * to retrieve the data from these <code>ResultSet</code> objects. If
112 * a given form of metadata is not available, the <code>ResultSet</code>
113 * getter methods throw an <code>SQLException</code>.
114 * <P>
115 * Some <code>DatabaseMetaData</code> methods take arguments that are
116 * String patterns. These arguments all have names such as fooPattern.
117 * Within a pattern String, "%" means match any substring of 0 or more
118 * characters, and "_" means match any one character. Only metadata
119 * entries matching the search pattern are returned. If a search pattern
120 * argument is set to <code>null</code>, that argument's criterion will
121 * be dropped from the search.
122 * <P>
123 * A method that gets information about a feature that the driver does not
124 * support will throw an <code>SQLException</code>.
125 * In the case of methods that return a <code>ResultSet</code>
126 * object, either a <code>ResultSet</code> object (which may be empty) is
127 * returned or an <code>SQLException</code> is thrown.<p>
128 *
129 * <!-- start release-specific documentation -->
130 * <span class="ReleaseSpecificDocumentation">
131 * <b>HSQLDB-Specific Information:</b> <p>
132 *
133 * <b>JRE 1.1.x Notes:</b> <p>
134 *
135 * In general, JDBC 2 support requires Java 1.2 and above, and JDBC3 requires
136 * Java 1.4 and above. In HSQLDB, support for methods introduced in different
137 * versions of JDBC depends on the JDK version used for compiling and building
138 * HSQLDB.<p>
139 *
140 * Since 1.7.0, it is possible to build the product so that
141 * all JDBC 2 methods can be called while executing under the version 1.1.x
142 * <em>Java Runtime Environment</em><sup><font size="-2">TM</font></sup>.
143 * However, some of these method calls require <code>int</code> values that
144 * are defined only in the JDBC 2 or greater version of
145 * <a href="http://java.sun.com/j2se/1.4/docs/api/java/sql/ResultSet.html">
146 * <CODE>ResultSet</CODE></a> interface. For this reason, when the
147 * product is compiled under JDK 1.1.x, these values are defined in
148 * {@link jdbcResultSet jdbcResultSet}.<p>
149 *
150 * In a JRE 1.1.x environment, calling JDBC 2 methods that take or return the
151 * JDBC2-only <CODE>ResultSet</CODE> values can be achieved by referring
152 * to them in parameter specifications and return value comparisons,
153 * respectively, as follows: <p>
154 *
155 * <CODE class="JavaCodeExample">
156 * dbcResultSet.FETCH_FORWARD<br>
157 * jdbcResultSet.TYPE_FORWARD_ONLY<br>
158 * jdbcResultSet.TYPE_SCROLL_INSENSITIVE<br>
159 * jdbcResultSet.CONCUR_READ_ONLY<br>
160 * </CODE> <p>
161 *
162 * However, please note that code written in such a manner will not be
163 * compatible for use with other JDBC 2 drivers, since they expect and use
164 * <code>ResultSet</code>, rather than <code>jdbcResultSet</code>. Also
165 * note, this feature is offered solely as a convenience to developers
166 * who must work under JDK 1.1.x due to operating constraints, yet wish to
167 * use some of the more advanced features available under the JDBC 2
168 * specification.<p>
169 *
170 * (fredt@users)<br>
171 * (boucherb@users)<p>
172 *
173 * </span>
174 * <!-- end release-specific documentation -->
175 */
176 public class jdbcDatabaseMetaData implements java.sql.DatabaseMetaData {
177
178 /**
179 * The connection this object uses to retrieve instance-specific metadata.
180 */
181 private jdbcConnection cConnection;
182
183 //----------------------------------------------------------------------
184 // First, a variety of minor information about the target database.
185
186 /**
187 * Retrieves whether the current user can call all the procedures
188 * returned by the method <code>getProcedures</code>. <p>
189 *
190 * <!-- start release-specific documentation -->
191 * <span class="ReleaseSpecificDocumentation">
192 * <b>HSQLDB-Specific Information:</b> <p>
193 *
194 * Up to and including 1.7.1, HSQLDB does not return any rows from
195 * <code>getProcedures</code>. However,
196 * <code>allProceduresAreCallable</code> always returns <code>true</code>.
197 * This is simply meant to indicate that all users can call all stored
198 * procedures made available by default in a newly created HSQLDB
199 * database.
200 * </span>
201 * <!-- end release-specific documentation -->
202 *
203 * @return <code>true</code> if so; <code>false</code> otherwise
204 * @exception SQLException if a database access error occurs
205 */
206 public boolean allProceduresAreCallable() throws SQLException {
207
208 if (Trace.TRACE) {
209 Trace.trace();
210 }
211
212 return true;
213 }
214
215 /**
216 * Retrieves whether the current user can use all the tables returned
217 * by the method <code>getTables</code> in a <code>SELECT</code>
218 * statement. <p>
219 *
220 * <!-- start release-specific documentation -->
221 * <span class="ReleaseSpecificDocumentation">
222 * <b>HSQLDB-Specific Information:</b> <p>
223 *
224 * Up to and including 1.7.1, HSQLDB will, by default, throw an exception
225 * for any non-admin user calling <code>getTables</code>, while any
226 * admin user can <CODE>SELECT</CODE> from any table. As such, this
227 * method always returns <code>true</code>. However, if an admin user
228 * grants <CODE>SELECT</CODE> access to <CODE>SYSTEM_TABLES</CODE> to
229 * a non-admin user, then it is possible for that user to be denied
230 * <CODE>SELECT</CODE> access to tables listed when he/she calls
231 * <code>getTables</code>. This behaviour will be corrected in 1.7.2. <p>
232 *
233 * </span>
234 * <!-- end release-specific documentation -->
235 *
236 *
237 * @return <code>true</code> if so; <code>false</code> otherwise
238 * @exception SQLException if a database access error occurs
239 */
240 public boolean allTablesAreSelectable() throws SQLException {
241
242 if (Trace.TRACE) {
243 Trace.trace();
244 }
245
246 return true;
247 }
248
249 /**
250 * Retrieves the URL for this DBMS.
251 *
252 *
253 * @return the URL for this DBMS or <code>null</code> if it cannot be
254 * generated
255 * @exception SQLException if a database access error occurs
256 */
257 public String getURL() throws SQLException {
258
259 if (Trace.TRACE) {
260 Trace.trace();
261 }
262
263 // CHECKME:
264 // is this always correct?
265 // boucherb@users 20020426
266 return "jdbc:hsqldb:" + cConnection.getName();
267 }
268
269 /**
270 * Retrieves the user name as known to this database.
271 *
272 *
273 * @return the database user name
274 * @exception SQLException if a database access error occurs
275 */
276 public String getUserName() throws SQLException {
277
278 if (Trace.TRACE) {
279 Trace.trace();
280 }
281
282 ResultSet r = executeSelect("SYSTEM_CONNECTIONINFO", "KEY='USER'");
283
284 r.next();
285
286 return r.getString(2);
287 }
288
289 /**
290 * Retrieves whether this database is in read-only mode. <p>
291 *
292 * <!-- start release-specific documentation -->
293 * <span class="ReleaseSpecificDocumentation">
294 * <b>HSQLDB-Specific Information:</b> <p>
295 *
296 * Up to and including 1.7.1, this is a synonym for
297 * {@link jdbcConnection#isReadOnly()} and does not report on
298 * the global read-only state of the database. This behaviour
299 * will be corrected in 1.7.2.
300 * </span>
301 * <!-- end release-specific documentation -->
302 *
303 *
304 * @return <code>true</code> if so; <code>false</code> otherwise
305 * @exception SQLException if a database access error occurs
306 */
307 public boolean isReadOnly() throws SQLException {
308
309 if (Trace.TRACE) {
310 Trace.trace();
311 }
312
313 // FIXME:
314 // This is wrong. This should determine if the
315 // whole database is in read-only mode, not whether the
316 // connection to the database is in read only mode.
317 // That is why there is Connection.isReadOnly() and
318 // DatabaseMetaData.isReadOnly().
319 // boucherb@users 20020426
320 // fredt@users - sure, let's get the correct value for 1.7.1
321 return cConnection.isReadOnly();
322 }
323
324 /**
325 * Retrieves whether <code>NULL</code> values are sorted high.
326 * Sorted high means that <code>NULL</code> values
327 * sort higher than any other value in a domain. In an ascending order,
328 * if this method returns <code>true</code>, <code>NULL</code> values
329 * will appear at the end. By contrast, the method
330 * <code>nullsAreSortedAtEnd</code> indicates whether <code>NULL</code> values
331 * are sorted at the end regardless of sort order. <p>
332 *
333 * <!-- start release-specific documentation -->
334 * <span class="ReleaseSpecificDocumentation">
335 * <b>HSQLDB-Specific Information:</b> <p>
336 *
337 * HSQLDB sorts null low; this method always returns <code>false</code>.
338 * </span>
339 * <!-- end release-specific documentation -->
340 *
341 *
342 * @return <code>true</code> if so; <code>false</code> otherwise
343 * @exception SQLException if a database access error occurs
344 */
345 public boolean nullsAreSortedHigh() throws SQLException {
346
347 if (Trace.TRACE) {
348 Trace.trace();
349 }
350
351 return false;
352 }
353
354 /**
355 * Retrieves whether <code>NULL</code> values are sorted low.
356 * Sorted low means that <code>NULL</code> values
357 * sort lower than any other value in a domain. In an ascending order,
358 * if this method returns <code>true</code>, <code>NULL</code> values
359 * will appear at the beginning. By contrast, the method
360 * <code>nullsAreSortedAtStart</code> indicates whether <code>NULL</code> values
361 * are sorted at the beginning regardless of sort order. <p>
362 *
363 * <!-- start release-specific documentation -->
364 * <span class="ReleaseSpecificDocumentation">
365 * <b>HSQLDB-Specific Information:</b> <p>
366 *
367 * HSQLDB sorts null low; this method always returns <code>true</code>.
368 * </span>
369 * <!-- end release-specific documentation -->
370 *
371 *
372 * @return <code>true</code> if so; <code>false</code> otherwise
373 * @exception SQLException if a database access error occurs
374 */
375 public boolean nullsAreSortedLow() throws SQLException {
376
377 if (Trace.TRACE) {
378 Trace.trace();
379 }
380
381 return true;
382 }
383
384 /**
385 * Retrieves whether <code>NULL</code> values are sorted at the start regardless
386 * of sort order. <p>
387 *
388 * <!-- start release-specific documentation -->
389 * <span class="ReleaseSpecificDocumentation">
390 * <b>HSQLDB-Specific Information:</b> <p>
391 *
392 * HSQLDB sorts null low; this method always returns <code>false</code>.
393 * </span>
394 * <!-- end release-specific documentation -->
395 *
396 *
397 * @return <code>true</code> if so; <code>false</code> otherwise
398 * @exception SQLException if a database access error occurs
399 */
400 public boolean nullsAreSortedAtStart() throws SQLException {
401
402 if (Trace.TRACE) {
403 Trace.trace();
404 }
405
406 return false;
407 }
408
409 /**
410 * Retrieves whether <code>NULL</code> values are sorted at the end regardless of
411 * sort order. <p>
412 *
413 * <!-- start release-specific documentation -->
414 * <span class="ReleaseSpecificDocumentation">
415 * <b>HSQLDB-Specific Information:</b> <p>
416 *
417 * HSQLDB sorts null low; this method always returns <code>false</code>.
418 * </span>
419 * <!-- end release-specific documentation -->
420 *
421 *
422 * @return <code>true</code> if so; <code>false</code> otherwise
423 * @exception SQLException if a database access error occurs
424 */
425 public boolean nullsAreSortedAtEnd() throws SQLException {
426
427 if (Trace.TRACE) {
428 Trace.trace();
429 }
430
431 return false;
432 }
433
434 /**
435 * Retrieves the name of this database product.
436 *
437 * @return database product name
438 * @exception SQLException if a database access error occurs
439 */
440 public String getDatabaseProductName() throws SQLException {
441
442 if (Trace.TRACE) {
443 Trace.trace();
444 }
445
446 return jdbcDriver.PRODUCT;
447 }
448
449 /**
450 * Retrieves the version number of this database product.
451 *
452 * @return database version number
453 * @exception SQLException if a database access error occurs
454 */
455 public String getDatabaseProductVersion() throws SQLException {
456
457 if (Trace.TRACE) {
458 Trace.trace();
459 }
460
461 return jdbcDriver.VERSION;
462 }
463
464 /**
465 * Retrieves the name of this JDBC driver.
466 *
467 * @return JDBC driver name
468 * @exception SQLException if a database access error occurs
469 */
470 public String getDriverName() throws SQLException {
471
472 if (Trace.TRACE) {
473 Trace.trace();
474 }
475
476 return jdbcDriver.PRODUCT + " Driver";
477 }
478
479 /**
480 * Retrieves the version number of this JDBC driver as a <code>String</code>.
481 *
482 * @return JDBC driver version
483 * @exception SQLException if a database access error occurs
484 */
485 public String getDriverVersion() throws SQLException {
486
487 if (Trace.TRACE) {
488 Trace.trace();
489 }
490
491 return jdbcDriver.VERSION;
492 }
493
494 /**
495 * Retrieves this JDBC driver's major version number.
496 *
497 * @return JDBC driver major version
498 */
499 public int getDriverMajorVersion() {
500
501 if (Trace.TRACE) {
502 Trace.trace();
503 }
504
505 return jdbcDriver.MAJOR;
506 }
507
508 /**
509 * Retrieves this JDBC driver's minor version number.
510 *
511 * @return JDBC driver minor version number
512 */
513 public int getDriverMinorVersion() {
514
515 if (Trace.TRACE) {
516 Trace.trace();
517 }
518
519 return jdbcDriver.MINOR;
520 }
521
522 /**
523 * Retrieves whether this database stores tables in a local file. <p>
524 *
525 * <!-- start release-specific documentation -->
526 * <span class="ReleaseSpecificDocumentation">
527 * <b>HSQLDB-Specific Information:</b> <p>
528 *
529 * Up to and including HSQLDB 1.7.1, do not rely on this information.
530 * This will be resolved and explained more clearly in 1.7.2.
531 * </span>
532 * <!-- end release-specific documentation -->
533 *
534 *
535 * @return <code>true</code> if so; <code>false</code> otherwise
536 * @exception SQLException if a database access error occurs
537 */
538 public boolean usesLocalFiles() throws SQLException {
539
540 if (Trace.TRACE) {
541 Trace.trace();
542 }
543
544 // SEE: FIXME at jdbcConnection.usesLocalFiles()
545 // boucherb@users 20020426
546 return cConnection.usesLocalFiles();
547 }
548
549 /**
550 * Retrieves whether this database uses a file for each table. <p>
551 *
552 * <!-- start release-specific documentation -->
553 * <span class="ReleaseSpecificDocumentation">
554 * <b>HSQLDB-Specific Information:</b> <p>
555 *
556 * Up to and including 1.7.1, HSQLDB never uses a file for each table.
557 * This method always returns <code>false</code>.
558 * </span>
559 * <!-- end release-specific documentation -->
560 *
561 *
562 * @return <code>true</code> if this database uses a local file for each table;
563 * <code>false</code> otherwise
564 * @exception SQLException if a database access error occurs
565 */
566 public boolean usesLocalFilePerTable() throws SQLException {
567
568 if (Trace.TRACE) {
569 Trace.trace();
570 }
571
572 return false;
573 }
574
575 /**
576 * Retrieves whether this database treats mixed case unquoted SQL identifiers as
577 * case sensitive and as a result stores them in mixed case. <p>
578 *
579 * <!-- start release-specific documentation -->
580 * <span class="ReleaseSpecificDocumentation">
581 * <b>HSQLDB-Specific Information:</b> <p>
582 *
583 * HSQLDB treats unquoted identifiers as case insensitive and stores
584 * them in upper case. It treats quoted identifiers as case sensitive and
585 * stores them verbatim; this method always returns <code>false</code>.
586 * </span>
587 * <!-- end release-specific documentation -->
588 *
589 *
590 * @return <code>true</code> if so; <code>false</code> otherwise
591 * @exception SQLException if a database access error occurs
592 */
593 public boolean supportsMixedCaseIdentifiers() throws SQLException {
594
595 if (Trace.TRACE) {
596 Trace.trace();
597 }
598
599 return false;
600 }
601
602 /**
603 * Retrieves whether this database treats mixed case unquoted SQL identifiers as
604 * case insensitive and stores them in upper case. <p>
605 *
606 * <!-- start release-specific documentation -->
607 * <span class="ReleaseSpecificDocumentation">
608 * <b>HSQLDB-Specific Information:</b> <p>
609 *
610 * HSQLDB treats unquoted identifiers as case insensitive and stores
611 * them in upper case. It treats quoted identifiers as case sensitive and
612 * stores them verbatim; this method always returns <code>true</code>.
613 * </span>
614 * <!-- end release-specific documentation -->
615 *
616 *
617 * @return <code>true</code> if so; <code>false</code> otherwise
618 * @exception SQLException if a database access error occurs
619 */
620 public boolean storesUpperCaseIdentifiers() throws SQLException {
621
622 if (Trace.TRACE) {
623 Trace.trace();
624 }
625
626 return true;
627 }
628
629 /**
630 * Retrieves whether this database treats mixed case unquoted SQL identifiers as
631 * case insensitive and stores them in lower case. <p>
632 *
633 * <!-- start release-specific documentation -->
634 * <span class="ReleaseSpecificDocumentation">
635 * <b>HSQLDB-Specific Information:</b> <p>
636 *
637 * HSQLDB treats unquoted identifiers as case insensitive and stores
638 * them in upper case. It treats quoted identifiers as case sensitive and
639 * stores them verbatim; this method always returns <code>false</code>.
640 * </span>
641 * <!-- end release-specific documentation -->
642 *
643 *
644 * @return <code>true</code> if so; <code>false</code> otherwise
645 * @exception SQLException if a database access error occurs
646 */
647 public boolean storesLowerCaseIdentifiers() throws SQLException {
648
649 if (Trace.TRACE) {
650 Trace.trace();
651 }
652
653 return false;
654 }
655
656 /**
657 * Retrieves whether this database treats mixed case unquoted SQL identifiers as
658 * case insensitive and stores them in mixed case. <p>
659 *
660 * <!-- start release-specific documentation -->
661 * <span class="ReleaseSpecificDocumentation">
662 * <b>HSQLDB-Specific Information:</b> <p>
663 *
664 * HSQLDB treats unquoted identifiers as case insensitive and stores
665 * them in upper case. It treats quoted identifiers as case sensitive and
666 * stores them verbatim; this method always returns <code>false</code>.
667 * </span>
668 * <!-- end release-specific documentation -->
669 *
670 *
671 * @return <code>true</code> if so; <code>false</code> otherwise
672 * @exception SQLException if a database access error occurs
673 */
674 public boolean storesMixedCaseIdentifiers() throws SQLException {
675
676 if (Trace.TRACE) {
677 Trace.trace();
678 }
679
680 return false;
681 }
682
683 /**
684 * Retrieves whether this database treats mixed case quoted SQL identifiers as
685 * case sensitive and as a result stores them in mixed case. <p>
686 *
687 * <!-- start release-specific documentation -->
688 * <span class="ReleaseSpecificDocumentation">
689 * <b>HSQLDB-Specific Information:</b> <p>
690 *
691 * HSQLDB treats unquoted identifiers as case insensitive and stores
692 * them in upper case. It treats quoted identifiers as case sensitive and
693 * stores them verbatim; this method always returns <code>true</code>.
694 * </span>
695 * <!-- end release-specific documentation -->
696 *
697 *
698 * @return <code>true</code> if so; <code>false</code> otherwise
699 * @exception SQLException if a database access error occurs
700 */
701 public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException {
702
703 if (Trace.TRACE) {
704 Trace.trace();
705 }
706
707 return true;
708
709 // InterBase (iscdrv32.dll) returns false
710 }
711
712 /**
713 * Retrieves whether this database treats mixed case quoted SQL identifiers as
714 * case insensitive and stores them in upper case. <p>
715 *
716 * <!-- start release-specific documentation -->
717 * <span class="ReleaseSpecificDocumentation">
718 * <b>HSQLDB-Specific Information:</b> <p>
719 *
720 * HSQLDB treats unquoted identifiers as case insensitive and stores
721 * them in upper case. It treats quoted identifiers as case sensitive and
722 * stores them verbatim; this method always returns <code>false</code>.
723 * </span>
724 * <!-- end release-specific documentation -->
725 *
726 *
727 * @return <code>true</code> if so; <code>false</code> otherwise
728 * @exception SQLException if a database access error occurs
729 */
730 public boolean storesUpperCaseQuotedIdentifiers() throws SQLException {
731
732 if (Trace.TRACE) {
733 Trace.trace();
734 }
735
736 return false;
737 }
738
739 /**
740 * Retrieves whether this database treats mixed case quoted SQL identifiers as
741 * case insensitive and stores them in lower case. <p>
742 *
743 * <!-- start release-specific documentation -->
744 * <span class="ReleaseSpecificDocumentation">
745 * <b>HSQLDB-Specific Information:</b> <p>
746 *
747 * HSQLDB treats unquoted identifiers as case insensitive and stores
748 * them in upper case. It treats quoted identifiers as case sensitive and
749 * stores them verbatim; this method always returns <code>false</code>e.
750 * </span>
751 * <!-- end release-specific documentation -->
752 *
753 *
754 * @return <code>true</code> if so; <code>false</code> otherwise
755 * @exception SQLException if a database access error occurs
756 */
757 public boolean storesLowerCaseQuotedIdentifiers() throws SQLException {
758
759 if (Trace.TRACE) {
760 Trace.trace();
761 }
762
763 return false;
764 }
765
766 /**
767 * Retrieves whether this database treats mixed case quoted SQL identifiers as
768 * case insensitive and stores them in mixed case. <p>
769 *
770 * <!-- start release-specific documentation -->
771 * <span class="ReleaseSpecificDocumentation">
772 * <b>HSQLDB-Specific Information:</b> <p>
773 *
774 * HSQLDB treats unquoted identifiers as case insensitive and stores
775 * them in upper case. It treats quoted identifiers as case sensitive and
776 * stores them verbatim; this method always returns <code>false</code>.
777 * </span>
778 * <!-- end release-specific documentation -->
779 *
780 *
781 * @return <code>true</code> if so; <code>false</code> otherwise
782 * @exception SQLException if a database access error occurs
783 */
784 public boolean storesMixedCaseQuotedIdentifiers() throws SQLException {
785
786 if (Trace.TRACE) {
787 Trace.trace();
788 }
789
790 return false;
791
792 // No: as case sensitive.
793 }
794
795 /**
796 * Retrieves the string used to quote SQL identifiers.
797 * This method returns a space " " if identifier quoting is not supported. <p>
798 *
799 * <!-- start release-specific documentation -->
800 * <span class="ReleaseSpecificDocumentation">
801 * <b>HSQLDB-Specific Information:</b> <p>
802 *
803 * HSQLDB uses the standard SQL identifer quote character
804 * (the double qoute character); this method always returns <b>"</b>.
805 * </span>
806 * <!-- end release-specific documentation -->
807 *
808 *
809 * @return the quoting string or a space if quoting is not supported
810 * @exception SQLException if a database access error occurs
811 */
812 public String getIdentifierQuoteString() throws SQLException {
813
814 if (Trace.TRACE) {
815 Trace.trace();
816 }
817
818 return "\"";
819
820 // InterBase (iscdrv32.dll) returns ""
821 }
822
823 //fredt@users 20020429 - JavaDoc comment - in 1.7.1 there are keywords such
824 // as TEMP, TEXT, CACHED that are not SQL 92 keywords
825
826 /**
827 * Retrieves a comma-separated list of all of this database's SQL keywords
828 * that are NOT also SQL92 keywords. <p>
829 *
830 * <!-- start release-specific documentation -->
831 * <span class="ReleaseSpecificDocumentation">
832 * <b>HSQLDB-Specific Information:</b> <p>
833 *
834 * The list returned contains HSQLDB keywords that are not in the list
835 * of reserved words. Some of these are in the list of potential reserved
836 * words that are not SQL92 keywords, but are reported in the
837 * standard as possible future SQL keywords.
838 * </span>
839 * <!-- end release-specific documentation -->
840 *
841 *
842 * @return the list of this database's keywords that are not also
843 * SQL92 keywords
844 * @exception SQLException if a database access error occurs
845 */
846 public String getSQLKeywords() throws SQLException {
847
848 if (Trace.TRACE) {
849 Trace.trace();
850 }
851
852 return "BEFORE,BIGINT,BINARY,CACHED,DATETIME,"
853 + "LIMIT,LONGVARBINARY,LONGVARCHAR,OBJECT,OTHER,SAVEPOINT,"
854 + "TEMP,TEXT,TRIGGER,TINYINT,VARBINARY,VARCHAR_IGNORECASE";
855 }
856
857 /**
858 * Retrieves a comma-separated list of math functions available with
859 * this database. These are the Open /Open CLI math function names used in
860 * the JDBC function escape clause.
861 * @return the list of math functions supported by this database
862 * @exception SQLException if a database access error occurs
863 */
864 public String getNumericFunctions() throws SQLException {
865
866 if (Trace.TRACE) {
867 Trace.trace();
868 }
869
870 return StringUtil.getList(Library.sNumeric, ",", "");
871 }
872
873 /**
874 * Retrieves a comma-separated list of string functions available with
875 * this database. These are the Open Group CLI string function names used
876 * in the JDBC function escape clause.
877 * @return the list of string functions supported by this database
878 * @exception SQLException if a database access error occurs
879 */
880 public String getStringFunctions() throws SQLException {
881
882 if (Trace.TRACE) {
883 Trace.trace();
884 }
885
886 return StringUtil.getList(Library.sString, ",", "");
887 }
888
889 /**
890 * Retrieves a comma-separated list of system functions available with
891 * this database. These are the Open Group CLI system function names used
892 * in the JDBC function escape clause.
893 * @return a list of system functions supported by this database
894 * @exception SQLException if a database access error occurs
895 */
896 public String getSystemFunctions() throws SQLException {
897
898 if (Trace.TRACE) {
899 Trace.trace();
900 }
901
902 return StringUtil.getList(Library.sSystem, ",", "");
903 }
904
905 /**
906 * Retrieves a comma-separated list of the time and date functions available
907 * with this database.
908 * @return the list of time and date functions supported by this database
909 * @exception SQLException if a database access error occurs
910 */
911 public String getTimeDateFunctions() throws SQLException {
912
913 if (Trace.TRACE) {
914 Trace.trace();
915 }
916
917 return StringUtil.getList(Library.sTimeDate, ",", "");
918 }
919
920 /**
921 * Retrieves the string that can be used to escape wildcard characters.
922 * This is the string that can be used to escape '_' or '%' in
923 * the catalog search parameters that are a pattern (and therefore use one
924 * of the wildcard characters).
925 *
926 * <P>The '_' character represents any single character;
927 * the '%' character represents any sequence of zero or
928 * more characters. <p>
929 *
930 * <!-- start release-specific documentation -->
931 * <span class="ReleaseSpecificDocumentation">
932 * <b>HSQLDB-Specific Information:</b> <p>
933 *
934 * Up to and including 1.7.1, HSQLDB uses the "\" character to escape
935 * wildcard characters.
936 * </span>
937 * <!-- end release-specific documentation -->
938 *
939 *
940 * @return the string used to escape wildcard characters
941 * @exception SQLException if a database access error occurs
942 */
943 public String getSearchStringEscape() throws SQLException {
944
945 if (Trace.TRACE) {
946 Trace.trace();
947 }
948
949 return "\\";
950 }
951
952 /**
953 * Retrieves all the "extra" characters that can be used in unquoted
954 * identifier names (those beyond a-z, A-Z, 0-9 and _). <p>
955 *
956 * <!-- start release-specific documentation -->
957 * <span class="ReleaseSpecificDocumentation">
958 * <b>HSQLDB-Specific Information:</b> <p>
959 *
960 * Up to and including 1.7.1, HSQLDB does not support using any
961 * "extra" characters in unquoted identifier names; this method always
962 * returns the empty String.
963 * </span>
964 * <!-- end release-specific documentation -->
965 *
966 *
967 * @return the string containing the extra characters
968 * @exception SQLException if a database access error occurs
969 */
970 public String getExtraNameCharacters() throws SQLException {
971
972 if (Trace.TRACE) {
973 Trace.trace();
974 }
975
976 return "";
977 }
978
979 //--------------------------------------------------------------------
980 // Functions describing which features are supported.
981
982 /**
983 * Retrieves whether this database supports <code>ALTER TABLE</code>
984 * with add column. <p>
985 *
986 * <!-- start release-specific documentation -->
987 * <span class="ReleaseSpecificDocumentation">
988 * <b>HSQLDB-Specific Information:</b> <p>
989 *
990 * From 1.7.0, HSQLDB support this type of
991 * <code>ALTER TABLE</code> statement; this method always
992 * returns <code>true</code>.
993 * </span>
994 * <!-- end release-specific documentation -->
995 *
996 *
997 * @return <code>true</code> if so; <code>false</code> otherwise
998 * @exception SQLException if a database access error occurs
999 */
1000 public boolean supportsAlterTableWithAddColumn() throws SQLException {
1001
1002 if (Trace.TRACE) {
1003 Trace.trace();
1004 }
1005
1006 return true;
1007 }
1008
1009 /**
1010 * Retrieves whether this database supports <code>ALTER TABLE</code>
1011 * with drop column. <p>
1012 *
1013 * <!-- start release-specific documentation -->
1014 * <span class="ReleaseSpecificDocumentation">
1015 * <b>HSQLDB-Specific Information:</b> <p>
1016 *
1017 * From 1.7.0, HSQLDB support this type of
1018 * <code>ALTER TABLE</code> statement; this method always
1019 * returns <code>true</code>.
1020 * </span>
1021 * <!-- end release-specific documentation -->
1022 *
1023 *
1024 * @return <code>true</code> if so; <code>false</code> otherwise
1025 * @exception SQLException if a database access error occurs
1026 */
1027 public boolean supportsAlterTableWithDropColumn() throws SQLException {
1028
1029 if (Trace.TRACE) {
1030 Trace.trace();
1031 }
1032
1033 return true;
1034 }
1035
1036 /**
1037 * Retrieves whether this database supports column aliasing.
1038 *
1039 * <P>If so, the SQL AS clause can be used to provide names for
1040 * computed columns or to provide alias names for columns as
1041 * required. <p>
1042 *
1043 * <!-- start release-specific documentation -->
1044 * <span class="ReleaseSpecificDocumentation">
1045 * <b>HSQLDB-Specific Information:</b> <p>
1046 *
1047 * HSQLDB supports column aliasing; this method always
1048 * returns <code>true</code>.
1049 * </span>
1050 * <!-- end release-specific documentation -->
1051 *
1052 *
1053 * @return <code>true</code> if so; <code>false</code> otherwise
1054 * @exception SQLException if a database access error occurs
1055 */
1056 public boolean supportsColumnAliasing() throws SQLException {
1057
1058 if (Trace.TRACE) {
1059 Trace.trace();
1060 }
1061
1062 return true;
1063
1064 // InterBase (iscdrv32.dll) returns false
1065 }
1066
1067 /**
1068 * Retrieves whether this database supports concatenations between
1069 * <code>NULL</code> and non-<code>NULL</code> values being
1070 * <code>NULL</code>. <p>
1071 *
1072 * <!-- start release-specific documentation -->
1073 * <span class="ReleaseSpecificDocumentation">
1074 * <b>HSQLDB-Specific Information:</b> <p>
1075 *
1076 * HSQLDB supports this; this method always
1077 * returns <code>true</code>.
1078 * </span>
1079 * <!-- end release-specific documentation -->
1080 *
1081 *
1082 * @return <code>true</code> if so; <code>false</code> otherwise
1083 * @exception SQLException if a database access error occurs
1084 */
1085 public boolean nullPlusNonNullIsNull() throws SQLException {
1086
1087 if (Trace.TRACE) {
1088 Trace.trace();
1089 }
1090
1091 return true;
1092
1093 // Access (odbcjt32.dll) returns false
1094 }
1095
1096 /**
1097 * Retrieves whether this database supports the <code>CONVERT</code>
1098 * function between SQL types. <p>
1099 *
1100 * <!-- start release-specific documentation -->
1101 * <span class="ReleaseSpecificDocumentation">
1102 * <b>HSQLDB-Specific Information:</b> <p>
1103 *
1104 * HSQLDB supports conversions; this method always
1105 * returns <code>true</code>.
1106 * </span>
1107 * <!-- end release-specific documentation -->
1108 *
1109 *
1110 * @return <code>true</code> if so; <code>false</code> otherwise
1111 * @exception SQLException if a database access error occurs
1112 */
1113 public boolean supportsConvert() throws SQLException {
1114
1115 if (Trace.TRACE) {
1116 Trace.trace();
1117 }
1118
1119 return true;
1120 }
1121
1122// fredt@users - JD comment - I think this is unsupported at the moment
1123// because SQL92 says conversion is implementation dependent, so if
1124// conversion from DOUBLE to INTEGER were possbible we would return the
1125// whole number part, but we currently throw. I'm not so sure about
1126// conversions between string and numeric where it is logically possible
1127// only if the string represents a numeric value
1128
1129 /**
1130 * Retrieves whether this database supports the <code>CONVERT</code>
1131 * for two given SQL types. <p>
1132 *
1133 * <!-- start release-specific documentation -->
1134 * <span class="ReleaseSpecificDocumentation">
1135 * <b>HSQLDB-Specific Information:</b> <p>
1136 *
1137 * HSQLDB supports conversion though String intermediates, so everything
1138 * should be possible, short of number format errors (all Java objects
1139 * have a toString method); this method always returns <code>true</code>.
1140 * </span>
1141 * <!-- end release-specific documentation -->
1142 *
1143 *
1144 * @param fromType the type to convert from; one of the type codes from
1145 * the class <code>java.sql.Types</code>
1146 * @param toType the type to convert to; one of the type codes from
1147 * the class <code>java.sql.Types</code>
1148 * @return <code>true</code> if so; <code>false</code> otherwise
1149 * @exception SQLException if a database access error occurs
1150 * @see java.sql.Types
1151 */
1152 public boolean supportsConvert(int fromType,
1153 int toType) throws SQLException {
1154
1155 if (Trace.TRACE) {
1156 Trace.trace();
1157 }
1158
1159 return true;
1160 }
1161
1162 /**
1163 * Retrieves whether this database supports table correlation names. <p>
1164 *
1165 * <!-- start release-specific documentation -->
1166 * <span class="ReleaseSpecificDocumentation">
1167 * <b>HSQLDB-Specific Information:</b> <p>
1168 *
1169 * HSQLDB supports table correlation names; this method always
1170 * returns <code>true</code>.
1171 * </span>
1172 * <!-- end release-specific documentation -->
1173 *
1174 *
1175 * @return <code>true</code> if so; <code>false</code> otherwise
1176 * @exception SQLException if a database access error occurs
1177 */
1178 public boolean supportsTableCorrelationNames() throws SQLException {
1179
1180 if (Trace.TRACE) {
1181 Trace.trace();
1182 }
1183
1184 return true;
1185 }
1186
1187 /**
1188 * Retrieves whether, when table correlation names are supported, they
1189 * are restricted to being different from the names of the tables. <p>
1190 *
1191 * <!-- start release-specific documentation -->
1192 * <span class="ReleaseSpecificDocumentation">
1193 * <b>HSQLDB-Specific Information:</b> <p>
1194 *
1195 * HSQLDB requires that table correlation names are different from the
1196 * names of the tables; this method always returns <code>true</code>.
1197 * </span>
1198 * <!-- end release-specific documentation -->
1199 *
1200 *
1201 * @return <code>true</code> if so; <code>false</code> otherwise
1202 * @exception SQLException if a database access error occurs
1203 */
1204 public boolean supportsDifferentTableCorrelationNames()
1205 throws SQLException {
1206
1207 if (Trace.TRACE) {
1208 Trace.trace();
1209 }
1210
1211 return true;
1212 }
1213
1214 /**
1215 * Retrieves whether this database supports expressions in
1216 * <code>ORDER BY</code> lists. <p>
1217 *
1218 * <!-- start release-specific documentation -->
1219 * <span class="ReleaseSpecificDocumentation">
1220 * <b>HSQLDB-Specific Information:</b> <p>
1221 *
1222 * HSQLDB supports expressions in <code>ORDER BY</code> lists; this
1223 * method always returns <code>true</code>.
1224 * </span>
1225 * <!-- end release-specific documentation -->
1226 *
1227 *
1228 * @return <code>true</code> if so; <code>false</code> otherwise
1229 * @exception SQLException if a database access error occurs
1230 */
1231 public boolean supportsExpressionsInOrderBy() throws SQLException {
1232
1233 if (Trace.TRACE) {
1234 Trace.trace();
1235 }
1236
1237 return true;
1238 }
1239
1240 /**
1241 * Retrieves whether this database supports using a column that is
1242 * not in the <code>SELECT</code> statement in an
1243 * <code>ORDER BY</code> clause. <p>
1244 *
1245 * <!-- start release-specific documentation -->
1246 * <span class="ReleaseSpecificDocumentation">
1247 * <b>HSQLDB-Specific Information:</b> <p>
1248 *
1249 * HSQLDB supports using a column that is not in the <code>SELECT</code>
1250 * statement in an <code>ORDER BY</code> clause; this method always
1251 * returns <code>true</code>.
1252 * </span>
1253 * <!-- end release-specific documentation -->
1254 *
1255 *
1256 * @return <code>true</code> if so; <code>false</code> otherwise
1257 * @exception SQLException if a database access error occurs
1258 */
1259 public boolean supportsOrderByUnrelated() throws SQLException {
1260
1261 if (Trace.TRACE) {
1262 Trace.trace();
1263 }
1264
1265 return true;
1266 }
1267
1268 /**
1269 * Retrieves whether this database supports some form of
1270 * <code>GROUP BY</code> clause. <p>
1271 *
1272 * <!-- start release-specific documentation -->
1273 * <span class="ReleaseSpecificDocumentation">
1274 * <b>HSQLDB-Specific Information:</b> <p>
1275 *
1276 * HSQLDB supports using the <code>GROUP BY</code> clause; this method
1277 * always returns <code>true</code>.
1278 * </span>
1279 * <!-- end release-specific documentation -->
1280 *
1281 *
1282 * @return <code>true</code> if so; <code>false</code> otherwise
1283 * @exception SQLException if a database access error occurs
1284 */
1285 public boolean supportsGroupBy() throws SQLException {
1286
1287 if (Trace.TRACE) {
1288 Trace.trace();
1289 }
1290
1291 return true;
1292 }
1293
1294 /**
1295 * Retrieves whether this database supports using a column that is
1296 * not in the <code>SELECT</code> statement in a
1297 * <code>GROUP BY</code> clause. <p>
1298 *
1299 * <!-- start release-specific documentation -->
1300 * <span class="ReleaseSpecificDocumentation">
1301 * <b>HSQLDB-Specific Information:</b> <p>
1302 *
1303 * HSQLDB supports using a column that is
1304 * not in the <code>SELECT</code> statement in a
1305 * <code>GROUP BY</code> clause; this method
1306 * always returns <code>true</code>.
1307 * </span>
1308 * <!-- end release-specific documentation -->
1309 *
1310 *
1311 * @return <code>true</code> if so; <code>false</code> otherwise
1312 * @exception SQLException if a database access error occurs
1313 */
1314 public boolean supportsGroupByUnrelated() throws SQLException {
1315
1316 if (Trace.TRACE) {
1317 Trace.trace();
1318 }
1319
1320 return true;
1321 }
1322
1323 /**
1324 * Retrieves whether this database supports using columns not included in
1325 * the <code>SELECT</code> statement in a <code>GROUP BY</code> clause
1326 * provided that all of the columns in the <code>SELECT</code> statement
1327 * are included in the <code>GROUP BY</code> clause. <p>
1328 *
1329 * <!-- start release-specific documentation -->
1330 * <span class="ReleaseSpecificDocumentation">
1331 * <b>HSQLDB-Specific Information:</b> <p>
1332 *
1333 * HSQLDB supports using columns not included in
1334 * the <code>SELECT</code> statement in a <code>GROUP BY</code> clause
1335 * provided that all of the columns in the <code>SELECT</code> statement
1336 * are included in the <code>GROUP BY</code> clause; this method
1337 * always returns <code>true</code>.
1338 * </span>
1339 * <!-- end release-specific documentation -->
1340 *
1341 *
1342 * @return <code>true</code> if so; <code>false</code> otherwise
1343 * @exception SQLException if a database access error occurs
1344 */
1345 public boolean supportsGroupByBeyondSelect() throws SQLException {
1346
1347 if (Trace.TRACE) {
1348 Trace.trace();
1349 }
1350
1351 return true;
1352 }
1353
1354 /**
1355 * Retrieves whether this database supports specifying a
1356 * <code>LIKE</code> escape clause. <p>
1357 *
1358 * <!-- start release-specific documentation -->
1359 * <span class="ReleaseSpecificDocumentation">
1360 * <b>HSQLDB-Specific Information:</b> <p>
1361 *
1362 * HSQLDB supports specifying a
1363 * <code>LIKE</code> escape clause; this method
1364 * always returns <code>true</code>.
1365 * </span>
1366 * <!-- end release-specific documentation -->
1367 *
1368 *
1369 * @return <code>true</code> if so; <code>false</code> otherwise
1370 * @exception SQLException if a database access error occurs
1371 */
1372 public boolean supportsLikeEscapeClause() throws SQLException {
1373
1374 if (Trace.TRACE) {
1375 Trace.trace();
1376 }
1377
1378 return true;
1379 }
1380
1381 /**
1382 * Retrieves whether this database supports getting multiple
1383 * <code>ResultSet</code> objects from a single call to the
1384 * method <code>execute</code>. <p>
1385 *
1386 * <!-- start release-specific documentation -->
1387 * <span class="ReleaseSpecificDocumentation">
1388 * <b>HSQLDB-Specific Information:</b> <p>
1389 *
1390 * Up to and including 1.7.1, HSQLDB does not support getting multiple
1391 * <code>ResultSet</code> objects from a single call to the
1392 * method <code>execute</code>; this method
1393 * always returns <code>false</code>. <p>
1394 *
1395 * This behaviour <i>may</i> change in a future release.
1396 * </span>
1397 * <!-- end release-specific documentation -->
1398 *
1399 *
1400 * @return <code>true</code> if so; <code>false</code> otherwise
1401 * @exception SQLException if a database access error occurs
1402 */
1403 public boolean supportsMultipleResultSets() throws SQLException {
1404
1405 if (Trace.TRACE) {
1406 Trace.trace();
1407 }
1408
1409 return false;
1410 }
1411
1412 /**
1413 * Retrieves whether this database allows having multiple
1414 * transactions open at once (on different connections). <p>
1415 *
1416 * <!-- start release-specific documentation -->
1417 * <span class="ReleaseSpecificDocumentation">
1418 * <b>HSQLDB-Specific Information:</b> <p>
1419 *
1420 * HSQLDB allows having multiple
1421 * transactions open at once (on different connections); this method
1422 * always returns <code>true</code>.
1423 * </span>
1424 * <!-- end release-specific documentation -->
1425 *
1426 *
1427 * @return <code>true</code> if so; <code>false</code> otherwise
1428 * @exception SQLException if a database access error occurs
1429 */
1430 public boolean supportsMultipleTransactions() throws SQLException {
1431
1432 if (Trace.TRACE) {
1433 Trace.trace();
1434 }
1435
1436 return true;
1437 }
1438
1439 /**
1440 * Retrieves whether columns in this database may be defined as
1441 * non-nullable. <p>
1442 *
1443 * <!-- start release-specific documentation -->
1444 * <span class="ReleaseSpecificDocumentation">
1445 * <b>HSQLDB-Specific Information:</b> <p>
1446 *
1447 * HSQLDB supports the specification of non-nullable columns; this method
1448 * always returns <code>true</code>.
1449 * </span>
1450 * <!-- end release-specific documentation -->
1451 *
1452 *
1453 * @return <code>true</code> if so; <code>false</code> otherwise
1454 * @exception SQLException if a database access error occurs
1455 */
1456 public boolean supportsNonNullableColumns() throws SQLException {
1457
1458 if (Trace.TRACE) {
1459 Trace.trace();
1460 }
1461
1462 return true;
1463 }
1464
1465 /**
1466 * Retrieves whether this database supports the ODBC Minimum SQL grammar. <p>
1467 *
1468 * <!-- start release-specific documentation -->
1469 * <span class="ReleaseSpecificDocumentation">
1470 * <b>HSQLDB-Specific Information:</b> <p>
1471 *
1472 * up to and including 1.7.1, HSQLDB does not support the ODBC
1473 * Minimum SQL grammar; this method
1474 * always returns <code>false</code>.
1475 * </span>
1476 * <!-- end release-specific documentation -->
1477 *
1478 *
1479 * @return <code>true</code> if so; <code>false</code> otherwise
1480 * @exception SQLException if a database access error occurs
1481 */
1482 public boolean supportsMinimumSQLGrammar() throws SQLException {
1483
1484 if (Trace.TRACE) {
1485 Trace.trace();
1486 }
1487
1488 return false;
1489 }
1490
1491 /**
1492 * Retrieves whether this database supports the ODBC Core SQL grammar. <p>
1493 *
1494 * <!-- start release-specific documentation -->
1495 * <span class="ReleaseSpecificDocumentation">
1496 * <b>HSQLDB-Specific Information:</b> <p>
1497 *
1498 * up to and including 1.7.1, HSQLDB does not support the ODBC
1499 * Core SQL grammar; this method
1500 * always returns <code>false</code>.
1501 * </span>
1502 * <!-- end release-specific documentation -->
1503 *
1504 *
1505 * @return <code>true</code> if so; <code>false</code> otherwise
1506 * @exception SQLException if a database access error occurs
1507 */
1508 public boolean supportsCoreSQLGrammar() throws SQLException {
1509
1510 if (Trace.TRACE) {
1511 Trace.trace();
1512 }
1513
1514 return false;
1515 }
1516
1517 /**
1518 * Retrieves whether this database supports the ODBC Extended SQL grammar. <p>
1519 *
1520 * <!-- start release-specific documentation -->
1521 * <span class="ReleaseSpecificDocumentation">
1522 * <b>HSQLDB-Specific Information:</b> <p>
1523 *
1524 * up to and including 1.7.1, HSQLDB does not support the ODBC
1525 * Extended SQL grammar; this method
1526 * always returns <code>false</code>.
1527 * </span>
1528 * <!-- end release-specific documentation -->
1529 *
1530 *
1531 * @return <code>true</code> if so; <code>false</code> otherwise
1532 * @exception SQLException if a database access error occurs
1533 */
1534 public boolean supportsExtendedSQLGrammar() throws SQLException {
1535
1536 if (Trace.TRACE) {
1537 Trace.trace();
1538 }
1539
1540 return false;
1541 }
1542
1543 /**
1544 * Retrieves whether this database supports the ANSI92 entry level SQL
1545 * grammar. <p>
1546 *
1547 * <!-- start release-specific documentation -->
1548 * <span class="ReleaseSpecificDocumentation">
1549 * <b>HSQLDB-Specific Information:</b> <p>
1550 *
1551 * up to and including 1.7.1, HSQLDB does not support the ANSI92 entry
1552 * level SQL grammar; this method
1553 * always returns <code>false</code>.
1554 * </span>
1555 * <!-- end release-specific documentation -->
1556 *
1557 *
1558 * @return <code>true</code> if so; <code>false</code> otherwise
1559 * @exception SQLException if a database access error occurs
1560 */
1561 public boolean supportsANSI92EntryLevelSQL() throws SQLException {
1562
1563 if (Trace.TRACE) {
1564 Trace.trace();
1565 }
1566
1567 return false;
1568 }
1569
1570 /**
1571 * Retrieves whether this database supports the ANSI92 intermediate SQL
1572 * grammar supported. <p>
1573 *
1574 * <!-- start release-specific documentation -->
1575 * <span class="ReleaseSpecificDocumentation">
1576 * <b>HSQLDB-Specific Information:</b> <p>
1577