2
|
1 |
/*
|
|
2 |
* Copyright 1996-2006 Sun Microsystems, Inc. All Rights Reserved.
|
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
*
|
|
5 |
* This code is free software; you can redistribute it and/or modify it
|
|
6 |
* under the terms of the GNU General Public License version 2 only, as
|
|
7 |
* published by the Free Software Foundation. Sun designates this
|
|
8 |
* particular file as subject to the "Classpath" exception as provided
|
|
9 |
* by Sun in the LICENSE file that accompanied this code.
|
|
10 |
*
|
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
* accompanied this code).
|
|
16 |
*
|
|
17 |
* You should have received a copy of the GNU General Public License version
|
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
*
|
|
21 |
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
|
|
22 |
* CA 95054 USA or visit www.sun.com if you need additional information or
|
|
23 |
* have any questions.
|
|
24 |
*/
|
|
25 |
|
|
26 |
|
|
27 |
package java.sql;
|
|
28 |
|
|
29 |
/**
|
|
30 |
* Comprehensive information about the database as a whole.
|
|
31 |
* <P>
|
|
32 |
* This interface is implemented by driver vendors to let users know the capabilities
|
|
33 |
* of a Database Management System (DBMS) in combination with
|
|
34 |
* the driver based on JDBC<sup><font size=-2>TM</font></sup> technology
|
|
35 |
* ("JDBC driver") that is used with it. Different relational DBMSs often support
|
|
36 |
* different features, implement features in different ways, and use different
|
|
37 |
* data types. In addition, a driver may implement a feature on top of what the
|
|
38 |
* DBMS offers. Information returned by methods in this interface applies
|
|
39 |
* to the capabilities of a particular driver and a particular DBMS working
|
|
40 |
* together. Note that as used in this documentation, the term "database" is
|
|
41 |
* used generically to refer to both the driver and DBMS.
|
|
42 |
* <P>
|
|
43 |
* A user for this interface is commonly a tool that needs to discover how to
|
|
44 |
* deal with the underlying DBMS. This is especially true for applications
|
|
45 |
* that are intended to be used with more than one DBMS. For example, a tool might use the method
|
|
46 |
* <code>getTypeInfo</code> to find out what data types can be used in a
|
|
47 |
* <code>CREATE TABLE</code> statement. Or a user might call the method
|
|
48 |
* <code>supportsCorrelatedSubqueries</code> to see if it is possible to use
|
|
49 |
* a correlated subquery or <code>supportsBatchUpdates</code> to see if it is
|
|
50 |
* possible to use batch updates.
|
|
51 |
* <P>
|
|
52 |
* Some <code>DatabaseMetaData</code> methods return lists of information
|
|
53 |
* in the form of <code>ResultSet</code> objects.
|
|
54 |
* Regular <code>ResultSet</code> methods, such as
|
|
55 |
* <code>getString</code> and <code>getInt</code>, can be used
|
|
56 |
* to retrieve the data from these <code>ResultSet</code> objects. If
|
|
57 |
* a given form of metadata is not available, an empty <code>ResultSet</code>
|
|
58 |
* will be returned. Additional columns beyond the columns defined to be
|
|
59 |
* returned by the <code>ResultSet</code> object for a given method
|
|
60 |
* can be defined by the JDBC driver vendor and must be accessed
|
|
61 |
* by their <B>column label</B>.
|
|
62 |
* <P>
|
|
63 |
* Some <code>DatabaseMetaData</code> methods take arguments that are
|
|
64 |
* String patterns. These arguments all have names such as fooPattern.
|
|
65 |
* Within a pattern String, "%" means match any substring of 0 or more
|
|
66 |
* characters, and "_" means match any one character. Only metadata
|
|
67 |
* entries matching the search pattern are returned. If a search pattern
|
|
68 |
* argument is set to <code>null</code>, that argument's criterion will
|
|
69 |
* be dropped from the search.
|
|
70 |
* <P>
|
|
71 |
*/
|
|
72 |
public interface DatabaseMetaData extends Wrapper {
|
|
73 |
|
|
74 |
//----------------------------------------------------------------------
|
|
75 |
// First, a variety of minor information about the target database.
|
|
76 |
|
|
77 |
/**
|
|
78 |
* Retrieves whether the current user can call all the procedures
|
|
79 |
* returned by the method <code>getProcedures</code>.
|
|
80 |
*
|
|
81 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
82 |
* @exception SQLException if a database access error occurs
|
|
83 |
*/
|
|
84 |
boolean allProceduresAreCallable() throws SQLException;
|
|
85 |
|
|
86 |
/**
|
|
87 |
* Retrieves whether the current user can use all the tables returned
|
|
88 |
* by the method <code>getTables</code> in a <code>SELECT</code>
|
|
89 |
* statement.
|
|
90 |
*
|
|
91 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
92 |
* @exception SQLException if a database access error occurs
|
|
93 |
*/
|
|
94 |
boolean allTablesAreSelectable() throws SQLException;
|
|
95 |
|
|
96 |
/**
|
|
97 |
* Retrieves the URL for this DBMS.
|
|
98 |
*
|
|
99 |
* @return the URL for this DBMS or <code>null</code> if it cannot be
|
|
100 |
* generated
|
|
101 |
* @exception SQLException if a database access error occurs
|
|
102 |
*/
|
|
103 |
String getURL() throws SQLException;
|
|
104 |
|
|
105 |
/**
|
|
106 |
* Retrieves the user name as known to this database.
|
|
107 |
*
|
|
108 |
* @return the database user name
|
|
109 |
* @exception SQLException if a database access error occurs
|
|
110 |
*/
|
|
111 |
String getUserName() throws SQLException;
|
|
112 |
|
|
113 |
/**
|
|
114 |
* Retrieves whether this database is in read-only mode.
|
|
115 |
*
|
|
116 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
117 |
* @exception SQLException if a database access error occurs
|
|
118 |
*/
|
|
119 |
boolean isReadOnly() throws SQLException;
|
|
120 |
|
|
121 |
/**
|
|
122 |
* Retrieves whether <code>NULL</code> values are sorted high.
|
|
123 |
* Sorted high means that <code>NULL</code> values
|
|
124 |
* sort higher than any other value in a domain. In an ascending order,
|
|
125 |
* if this method returns <code>true</code>, <code>NULL</code> values
|
|
126 |
* will appear at the end. By contrast, the method
|
|
127 |
* <code>nullsAreSortedAtEnd</code> indicates whether <code>NULL</code> values
|
|
128 |
* are sorted at the end regardless of sort order.
|
|
129 |
*
|
|
130 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
131 |
* @exception SQLException if a database access error occurs
|
|
132 |
*/
|
|
133 |
boolean nullsAreSortedHigh() throws SQLException;
|
|
134 |
|
|
135 |
/**
|
|
136 |
* Retrieves whether <code>NULL</code> values are sorted low.
|
|
137 |
* Sorted low means that <code>NULL</code> values
|
|
138 |
* sort lower than any other value in a domain. In an ascending order,
|
|
139 |
* if this method returns <code>true</code>, <code>NULL</code> values
|
|
140 |
* will appear at the beginning. By contrast, the method
|
|
141 |
* <code>nullsAreSortedAtStart</code> indicates whether <code>NULL</code> values
|
|
142 |
* are sorted at the beginning regardless of sort order.
|
|
143 |
*
|
|
144 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
145 |
* @exception SQLException if a database access error occurs
|
|
146 |
*/
|
|
147 |
boolean nullsAreSortedLow() throws SQLException;
|
|
148 |
|
|
149 |
/**
|
|
150 |
* Retrieves whether <code>NULL</code> values are sorted at the start regardless
|
|
151 |
* of sort order.
|
|
152 |
*
|
|
153 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
154 |
* @exception SQLException if a database access error occurs
|
|
155 |
*/
|
|
156 |
boolean nullsAreSortedAtStart() throws SQLException;
|
|
157 |
|
|
158 |
/**
|
|
159 |
* Retrieves whether <code>NULL</code> values are sorted at the end regardless of
|
|
160 |
* sort order.
|
|
161 |
*
|
|
162 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
163 |
* @exception SQLException if a database access error occurs
|
|
164 |
*/
|
|
165 |
boolean nullsAreSortedAtEnd() throws SQLException;
|
|
166 |
|
|
167 |
/**
|
|
168 |
* Retrieves the name of this database product.
|
|
169 |
*
|
|
170 |
* @return database product name
|
|
171 |
* @exception SQLException if a database access error occurs
|
|
172 |
*/
|
|
173 |
String getDatabaseProductName() throws SQLException;
|
|
174 |
|
|
175 |
/**
|
|
176 |
* Retrieves the version number of this database product.
|
|
177 |
*
|
|
178 |
* @return database version number
|
|
179 |
* @exception SQLException if a database access error occurs
|
|
180 |
*/
|
|
181 |
String getDatabaseProductVersion() throws SQLException;
|
|
182 |
|
|
183 |
/**
|
|
184 |
* Retrieves the name of this JDBC driver.
|
|
185 |
*
|
|
186 |
* @return JDBC driver name
|
|
187 |
* @exception SQLException if a database access error occurs
|
|
188 |
*/
|
|
189 |
String getDriverName() throws SQLException;
|
|
190 |
|
|
191 |
/**
|
|
192 |
* Retrieves the version number of this JDBC driver as a <code>String</code>.
|
|
193 |
*
|
|
194 |
* @return JDBC driver version
|
|
195 |
* @exception SQLException if a database access error occurs
|
|
196 |
*/
|
|
197 |
String getDriverVersion() throws SQLException;
|
|
198 |
|
|
199 |
/**
|
|
200 |
* Retrieves this JDBC driver's major version number.
|
|
201 |
*
|
|
202 |
* @return JDBC driver major version
|
|
203 |
*/
|
|
204 |
int getDriverMajorVersion();
|
|
205 |
|
|
206 |
/**
|
|
207 |
* Retrieves this JDBC driver's minor version number.
|
|
208 |
*
|
|
209 |
* @return JDBC driver minor version number
|
|
210 |
*/
|
|
211 |
int getDriverMinorVersion();
|
|
212 |
|
|
213 |
/**
|
|
214 |
* Retrieves whether this database stores tables in a local file.
|
|
215 |
*
|
|
216 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
217 |
* @exception SQLException if a database access error occurs
|
|
218 |
*/
|
|
219 |
boolean usesLocalFiles() throws SQLException;
|
|
220 |
|
|
221 |
/**
|
|
222 |
* Retrieves whether this database uses a file for each table.
|
|
223 |
*
|
|
224 |
* @return <code>true</code> if this database uses a local file for each table;
|
|
225 |
* <code>false</code> otherwise
|
|
226 |
* @exception SQLException if a database access error occurs
|
|
227 |
*/
|
|
228 |
boolean usesLocalFilePerTable() throws SQLException;
|
|
229 |
|
|
230 |
/**
|
|
231 |
* Retrieves whether this database treats mixed case unquoted SQL identifiers as
|
|
232 |
* case sensitive and as a result stores them in mixed case.
|
|
233 |
*
|
|
234 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
235 |
* @exception SQLException if a database access error occurs
|
|
236 |
*/
|
|
237 |
boolean supportsMixedCaseIdentifiers() throws SQLException;
|
|
238 |
|
|
239 |
/**
|
|
240 |
* Retrieves whether this database treats mixed case unquoted SQL identifiers as
|
|
241 |
* case insensitive and stores them in upper case.
|
|
242 |
*
|
|
243 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
244 |
* @exception SQLException if a database access error occurs
|
|
245 |
*/
|
|
246 |
boolean storesUpperCaseIdentifiers() throws SQLException;
|
|
247 |
|
|
248 |
/**
|
|
249 |
* Retrieves whether this database treats mixed case unquoted SQL identifiers as
|
|
250 |
* case insensitive and stores them in lower case.
|
|
251 |
*
|
|
252 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
253 |
* @exception SQLException if a database access error occurs
|
|
254 |
*/
|
|
255 |
boolean storesLowerCaseIdentifiers() throws SQLException;
|
|
256 |
|
|
257 |
/**
|
|
258 |
* Retrieves whether this database treats mixed case unquoted SQL identifiers as
|
|
259 |
* case insensitive and stores them in mixed case.
|
|
260 |
*
|
|
261 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
262 |
* @exception SQLException if a database access error occurs
|
|
263 |
*/
|
|
264 |
boolean storesMixedCaseIdentifiers() throws SQLException;
|
|
265 |
|
|
266 |
/**
|
|
267 |
* Retrieves whether this database treats mixed case quoted SQL identifiers as
|
|
268 |
* case sensitive and as a result stores them in mixed case.
|
|
269 |
*
|
|
270 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
271 |
* @exception SQLException if a database access error occurs
|
|
272 |
*/
|
|
273 |
boolean supportsMixedCaseQuotedIdentifiers() throws SQLException;
|
|
274 |
|
|
275 |
/**
|
|
276 |
* Retrieves whether this database treats mixed case quoted SQL identifiers as
|
|
277 |
* case insensitive and stores them in upper case.
|
|
278 |
*
|
|
279 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
280 |
* @exception SQLException if a database access error occurs
|
|
281 |
*/
|
|
282 |
boolean storesUpperCaseQuotedIdentifiers() throws SQLException;
|
|
283 |
|
|
284 |
/**
|
|
285 |
* Retrieves whether this database treats mixed case quoted SQL identifiers as
|
|
286 |
* case insensitive and stores them in lower case.
|
|
287 |
*
|
|
288 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
289 |
* @exception SQLException if a database access error occurs
|
|
290 |
*/
|
|
291 |
boolean storesLowerCaseQuotedIdentifiers() throws SQLException;
|
|
292 |
|
|
293 |
/**
|
|
294 |
* Retrieves whether this database treats mixed case quoted SQL identifiers as
|
|
295 |
* case insensitive and stores them in mixed case.
|
|
296 |
*
|
|
297 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
298 |
* @exception SQLException if a database access error occurs
|
|
299 |
*/
|
|
300 |
boolean storesMixedCaseQuotedIdentifiers() throws SQLException;
|
|
301 |
|
|
302 |
/**
|
|
303 |
* Retrieves the string used to quote SQL identifiers.
|
|
304 |
* This method returns a space " " if identifier quoting is not supported.
|
|
305 |
*
|
|
306 |
* @return the quoting string or a space if quoting is not supported
|
|
307 |
* @exception SQLException if a database access error occurs
|
|
308 |
*/
|
|
309 |
String getIdentifierQuoteString() throws SQLException;
|
|
310 |
|
|
311 |
/**
|
|
312 |
* Retrieves a comma-separated list of all of this database's SQL keywords
|
|
313 |
* that are NOT also SQL:2003 keywords.
|
|
314 |
*
|
|
315 |
* @return the list of this database's keywords that are not also
|
|
316 |
* SQL:2003 keywords
|
|
317 |
* @exception SQLException if a database access error occurs
|
|
318 |
*/
|
|
319 |
String getSQLKeywords() throws SQLException;
|
|
320 |
|
|
321 |
/**
|
|
322 |
* Retrieves a comma-separated list of math functions available with
|
|
323 |
* this database. These are the Open /Open CLI math function names used in
|
|
324 |
* the JDBC function escape clause.
|
|
325 |
*
|
|
326 |
* @return the list of math functions supported by this database
|
|
327 |
* @exception SQLException if a database access error occurs
|
|
328 |
*/
|
|
329 |
String getNumericFunctions() throws SQLException;
|
|
330 |
|
|
331 |
/**
|
|
332 |
* Retrieves a comma-separated list of string functions available with
|
|
333 |
* this database. These are the Open Group CLI string function names used
|
|
334 |
* in the JDBC function escape clause.
|
|
335 |
*
|
|
336 |
* @return the list of string functions supported by this database
|
|
337 |
* @exception SQLException if a database access error occurs
|
|
338 |
*/
|
|
339 |
String getStringFunctions() throws SQLException;
|
|
340 |
|
|
341 |
/**
|
|
342 |
* Retrieves a comma-separated list of system functions available with
|
|
343 |
* this database. These are the Open Group CLI system function names used
|
|
344 |
* in the JDBC function escape clause.
|
|
345 |
*
|
|
346 |
* @return a list of system functions supported by this database
|
|
347 |
* @exception SQLException if a database access error occurs
|
|
348 |
*/
|
|
349 |
String getSystemFunctions() throws SQLException;
|
|
350 |
|
|
351 |
/**
|
|
352 |
* Retrieves a comma-separated list of the time and date functions available
|
|
353 |
* with this database.
|
|
354 |
*
|
|
355 |
* @return the list of time and date functions supported by this database
|
|
356 |
* @exception SQLException if a database access error occurs
|
|
357 |
*/
|
|
358 |
String getTimeDateFunctions() throws SQLException;
|
|
359 |
|
|
360 |
/**
|
|
361 |
* Retrieves the string that can be used to escape wildcard characters.
|
|
362 |
* This is the string that can be used to escape '_' or '%' in
|
|
363 |
* the catalog search parameters that are a pattern (and therefore use one
|
|
364 |
* of the wildcard characters).
|
|
365 |
*
|
|
366 |
* <P>The '_' character represents any single character;
|
|
367 |
* the '%' character represents any sequence of zero or
|
|
368 |
* more characters.
|
|
369 |
*
|
|
370 |
* @return the string used to escape wildcard characters
|
|
371 |
* @exception SQLException if a database access error occurs
|
|
372 |
*/
|
|
373 |
String getSearchStringEscape() throws SQLException;
|
|
374 |
|
|
375 |
/**
|
|
376 |
* Retrieves all the "extra" characters that can be used in unquoted
|
|
377 |
* identifier names (those beyond a-z, A-Z, 0-9 and _).
|
|
378 |
*
|
|
379 |
* @return the string containing the extra characters
|
|
380 |
* @exception SQLException if a database access error occurs
|
|
381 |
*/
|
|
382 |
String getExtraNameCharacters() throws SQLException;
|
|
383 |
|
|
384 |
//--------------------------------------------------------------------
|
|
385 |
// Functions describing which features are supported.
|
|
386 |
|
|
387 |
/**
|
|
388 |
* Retrieves whether this database supports <code>ALTER TABLE</code>
|
|
389 |
* with add column.
|
|
390 |
*
|
|
391 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
392 |
* @exception SQLException if a database access error occurs
|
|
393 |
*/
|
|
394 |
boolean supportsAlterTableWithAddColumn() throws SQLException;
|
|
395 |
|
|
396 |
/**
|
|
397 |
* Retrieves whether this database supports <code>ALTER TABLE</code>
|
|
398 |
* with drop column.
|
|
399 |
*
|
|
400 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
401 |
* @exception SQLException if a database access error occurs
|
|
402 |
*/
|
|
403 |
boolean supportsAlterTableWithDropColumn() throws SQLException;
|
|
404 |
|
|
405 |
/**
|
|
406 |
* Retrieves whether this database supports column aliasing.
|
|
407 |
*
|
|
408 |
* <P>If so, the SQL AS clause can be used to provide names for
|
|
409 |
* computed columns or to provide alias names for columns as
|
|
410 |
* required.
|
|
411 |
*
|
|
412 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
413 |
* @exception SQLException if a database access error occurs
|
|
414 |
*/
|
|
415 |
boolean supportsColumnAliasing() throws SQLException;
|
|
416 |
|
|
417 |
/**
|
|
418 |
* Retrieves whether this database supports concatenations between
|
|
419 |
* <code>NULL</code> and non-<code>NULL</code> values being
|
|
420 |
* <code>NULL</code>.
|
|
421 |
*
|
|
422 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
423 |
* @exception SQLException if a database access error occurs
|
|
424 |
*/
|
|
425 |
boolean nullPlusNonNullIsNull() throws SQLException;
|
|
426 |
|
|
427 |
/**
|
|
428 |
* Retrieves whether this database supports the JDBC scalar function
|
|
429 |
* <code>CONVERT</code> for the conversion of one JDBC type to another.
|
|
430 |
* The JDBC types are the generic SQL data types defined
|
|
431 |
* in <code>java.sql.Types</code>.
|
|
432 |
*
|
|
433 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
434 |
* @exception SQLException if a database access error occurs
|
|
435 |
*/
|
|
436 |
boolean supportsConvert() throws SQLException;
|
|
437 |
|
|
438 |
/**
|
|
439 |
* Retrieves whether this database supports the JDBC scalar function
|
|
440 |
* <code>CONVERT</code> for conversions between the JDBC types <i>fromType</i>
|
|
441 |
* and <i>toType</i>. The JDBC types are the generic SQL data types defined
|
|
442 |
* in <code>java.sql.Types</code>.
|
|
443 |
*
|
|
444 |
* @param fromType the type to convert from; one of the type codes from
|
|
445 |
* the class <code>java.sql.Types</code>
|
|
446 |
* @param toType the type to convert to; one of the type codes from
|
|
447 |
* the class <code>java.sql.Types</code>
|
|
448 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
449 |
* @exception SQLException if a database access error occurs
|
|
450 |
* @see Types
|
|
451 |
*/
|
|
452 |
boolean supportsConvert(int fromType, int toType) throws SQLException;
|
|
453 |
|
|
454 |
/**
|
|
455 |
* Retrieves whether this database supports table correlation names.
|
|
456 |
*
|
|
457 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
458 |
* @exception SQLException if a database access error occurs
|
|
459 |
*/
|
|
460 |
boolean supportsTableCorrelationNames() throws SQLException;
|
|
461 |
|
|
462 |
/**
|
|
463 |
* Retrieves whether, when table correlation names are supported, they
|
|
464 |
* are restricted to being different from the names of the tables.
|
|
465 |
*
|
|
466 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
467 |
* @exception SQLException if a database access error occurs
|
|
468 |
*/
|
|
469 |
boolean supportsDifferentTableCorrelationNames() throws SQLException;
|
|
470 |
|
|
471 |
/**
|
|
472 |
* Retrieves whether this database supports expressions in
|
|
473 |
* <code>ORDER BY</code> lists.
|
|
474 |
*
|
|
475 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
476 |
* @exception SQLException if a database access error occurs
|
|
477 |
*/
|
|
478 |
boolean supportsExpressionsInOrderBy() throws SQLException;
|
|
479 |
|
|
480 |
/**
|
|
481 |
* Retrieves whether this database supports using a column that is
|
|
482 |
* not in the <code>SELECT</code> statement in an
|
|
483 |
* <code>ORDER BY</code> clause.
|
|
484 |
*
|
|
485 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
486 |
* @exception SQLException if a database access error occurs
|
|
487 |
*/
|
|
488 |
boolean supportsOrderByUnrelated() throws SQLException;
|
|
489 |
|
|
490 |
/**
|
|
491 |
* Retrieves whether this database supports some form of
|
|
492 |
* <code>GROUP BY</code> clause.
|
|
493 |
*
|
|
494 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
495 |
* @exception SQLException if a database access error occurs
|
|
496 |
*/
|
|
497 |
boolean supportsGroupBy() throws SQLException;
|
|
498 |
|
|
499 |
/**
|
|
500 |
* Retrieves whether this database supports using a column that is
|
|
501 |
* not in the <code>SELECT</code> statement in a
|
|
502 |
* <code>GROUP BY</code> clause.
|
|
503 |
*
|
|
504 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
505 |
* @exception SQLException if a database access error occurs
|
|
506 |
*/
|
|
507 |
boolean supportsGroupByUnrelated() throws SQLException;
|
|
508 |
|
|
509 |
/**
|
|
510 |
* Retrieves whether this database supports using columns not included in
|
|
511 |
* the <code>SELECT</code> statement in a <code>GROUP BY</code> clause
|
|
512 |
* provided that all of the columns in the <code>SELECT</code> statement
|
|
513 |
* are included in the <code>GROUP BY</code> clause.
|
|
514 |
*
|
|
515 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
516 |
* @exception SQLException if a database access error occurs
|
|
517 |
*/
|
|
518 |
boolean supportsGroupByBeyondSelect() throws SQLException;
|
|
519 |
|
|
520 |
/**
|
|
521 |
* Retrieves whether this database supports specifying a
|
|
522 |
* <code>LIKE</code> escape clause.
|
|
523 |
*
|
|
524 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
525 |
* @exception SQLException if a database access error occurs
|
|
526 |
*/
|
|
527 |
boolean supportsLikeEscapeClause() throws SQLException;
|
|
528 |
|
|
529 |
/**
|
|
530 |
* Retrieves whether this database supports getting multiple
|
|
531 |
* <code>ResultSet</code> objects from a single call to the
|
|
532 |
* method <code>execute</code>.
|
|
533 |
*
|
|
534 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
535 |
* @exception SQLException if a database access error occurs
|
|
536 |
*/
|
|
537 |
boolean supportsMultipleResultSets() throws SQLException;
|
|
538 |
|
|
539 |
/**
|
|
540 |
* Retrieves whether this database allows having multiple
|
|
541 |
* transactions open at once (on different connections).
|
|
542 |
*
|
|
543 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
544 |
* @exception SQLException if a database access error occurs
|
|
545 |
*/
|
|
546 |
boolean supportsMultipleTransactions() throws SQLException;
|
|
547 |
|
|
548 |
/**
|
|
549 |
* Retrieves whether columns in this database may be defined as non-nullable.
|
|
550 |
*
|
|
551 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
552 |
* @exception SQLException if a database access error occurs
|
|
553 |
*/
|
|
554 |
boolean supportsNonNullableColumns() throws SQLException;
|
|
555 |
|
|
556 |
/**
|
|
557 |
* Retrieves whether this database supports the ODBC Minimum SQL grammar.
|
|
558 |
*
|
|
559 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
560 |
* @exception SQLException if a database access error occurs
|
|
561 |
*/
|
|
562 |
boolean supportsMinimumSQLGrammar() throws SQLException;
|
|
563 |
|
|
564 |
/**
|
|
565 |
* Retrieves whether this database supports the ODBC Core SQL grammar.
|
|
566 |
*
|
|
567 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
568 |
* @exception SQLException if a database access error occurs
|
|
569 |
*/
|
|
570 |
boolean supportsCoreSQLGrammar() throws SQLException;
|
|
571 |
|
|
572 |
/**
|
|
573 |
* Retrieves whether this database supports the ODBC Extended SQL grammar.
|
|
574 |
*
|
|
575 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
576 |
* @exception SQLException if a database access error occurs
|
|
577 |
*/
|
|
578 |
boolean supportsExtendedSQLGrammar() throws SQLException;
|
|
579 |
|
|
580 |
/**
|
|
581 |
* Retrieves whether this database supports the ANSI92 entry level SQL
|
|
582 |
* grammar.
|
|
583 |
*
|
|
584 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
585 |
* @exception SQLException if a database access error occurs
|
|
586 |
*/
|
|
587 |
boolean supportsANSI92EntryLevelSQL() throws SQLException;
|
|
588 |
|
|
589 |
/**
|
|
590 |
* Retrieves whether this database supports the ANSI92 intermediate SQL grammar supported.
|
|
591 |
*
|
|
592 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
593 |
* @exception SQLException if a database access error occurs
|
|
594 |
*/
|
|
595 |
boolean supportsANSI92IntermediateSQL() throws SQLException;
|
|
596 |
|
|
597 |
/**
|
|
598 |
* Retrieves whether this database supports the ANSI92 full SQL grammar supported.
|
|
599 |
*
|
|
600 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
601 |
* @exception SQLException if a database access error occurs
|
|
602 |
*/
|
|
603 |
boolean supportsANSI92FullSQL() throws SQLException;
|
|
604 |
|
|
605 |
/**
|
|
606 |
* Retrieves whether this database supports the SQL Integrity
|
|
607 |
* Enhancement Facility.
|
|
608 |
*
|
|
609 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
610 |
* @exception SQLException if a database access error occurs
|
|
611 |
*/
|
|
612 |
boolean supportsIntegrityEnhancementFacility() throws SQLException;
|
|
613 |
|
|
614 |
/**
|
|
615 |
* Retrieves whether this database supports some form of outer join.
|
|
616 |
*
|
|
617 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
618 |
* @exception SQLException if a database access error occurs
|
|
619 |
*/
|
|
620 |
boolean supportsOuterJoins() throws SQLException;
|
|
621 |
|
|
622 |
/**
|
|
623 |
* Retrieves whether this database supports full nested outer joins.
|
|
624 |
*
|
|
625 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
626 |
* @exception SQLException if a database access error occurs
|
|
627 |
*/
|
|
628 |
boolean supportsFullOuterJoins() throws SQLException;
|
|
629 |
|
|
630 |
/**
|
|
631 |
* Retrieves whether this database provides limited support for outer
|
|
632 |
* joins. (This will be <code>true</code> if the method
|
|
633 |
* <code>supportsFullOuterJoins</code> returns <code>true</code>).
|
|
634 |
*
|
|
635 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
636 |
* @exception SQLException if a database access error occurs
|
|
637 |
*/
|
|
638 |
boolean supportsLimitedOuterJoins() throws SQLException;
|
|
639 |
|
|
640 |
/**
|
|
641 |
* Retrieves the database vendor's preferred term for "schema".
|
|
642 |
*
|
|
643 |
* @return the vendor term for "schema"
|
|
644 |
* @exception SQLException if a database access error occurs
|
|
645 |
*/
|
|
646 |
String getSchemaTerm() throws SQLException;
|
|
647 |
|
|
648 |
/**
|
|
649 |
* Retrieves the database vendor's preferred term for "procedure".
|
|
650 |
*
|
|
651 |
* @return the vendor term for "procedure"
|
|
652 |
* @exception SQLException if a database access error occurs
|
|
653 |
*/
|
|
654 |
String getProcedureTerm() throws SQLException;
|
|
655 |
|
|
656 |
/**
|
|
657 |
* Retrieves the database vendor's preferred term for "catalog".
|
|
658 |
*
|
|
659 |
* @return the vendor term for "catalog"
|
|
660 |
* @exception SQLException if a database access error occurs
|
|
661 |
*/
|
|
662 |
String getCatalogTerm() throws SQLException;
|
|
663 |
|
|
664 |
/**
|
|
665 |
* Retrieves whether a catalog appears at the start of a fully qualified
|
|
666 |
* table name. If not, the catalog appears at the end.
|
|
667 |
*
|
|
668 |
* @return <code>true</code> if the catalog name appears at the beginning
|
|
669 |
* of a fully qualified table name; <code>false</code> otherwise
|
|
670 |
* @exception SQLException if a database access error occurs
|
|
671 |
*/
|
|
672 |
boolean isCatalogAtStart() throws SQLException;
|
|
673 |
|
|
674 |
/**
|
|
675 |
* Retrieves the <code>String</code> that this database uses as the
|
|
676 |
* separator between a catalog and table name.
|
|
677 |
*
|
|
678 |
* @return the separator string
|
|
679 |
* @exception SQLException if a database access error occurs
|
|
680 |
*/
|
|
681 |
String getCatalogSeparator() throws SQLException;
|
|
682 |
|
|
683 |
/**
|
|
684 |
* Retrieves whether a schema name can be used in a data manipulation statement.
|
|
685 |
*
|
|
686 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
687 |
* @exception SQLException if a database access error occurs
|
|
688 |
*/
|
|
689 |
boolean supportsSchemasInDataManipulation() throws SQLException;
|
|
690 |
|
|
691 |
/**
|
|
692 |
* Retrieves whether a schema name can be used in a procedure call statement.
|
|
693 |
*
|
|
694 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
695 |
* @exception SQLException if a database access error occurs
|
|
696 |
*/
|
|
697 |
boolean supportsSchemasInProcedureCalls() throws SQLException;
|
|
698 |
|
|
699 |
/**
|
|
700 |
* Retrieves whether a schema name can be used in a table definition statement.
|
|
701 |
*
|
|
702 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
703 |
* @exception SQLException if a database access error occurs
|
|
704 |
*/
|
|
705 |
boolean supportsSchemasInTableDefinitions() throws SQLException;
|
|
706 |
|
|
707 |
/**
|
|
708 |
* Retrieves whether a schema name can be used in an index definition statement.
|
|
709 |
*
|
|
710 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
711 |
* @exception SQLException if a database access error occurs
|
|
712 |
*/
|
|
713 |
boolean supportsSchemasInIndexDefinitions() throws SQLException;
|
|
714 |
|
|
715 |
/**
|
|
716 |
* Retrieves whether a schema name can be used in a privilege definition statement.
|
|
717 |
*
|
|
718 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
719 |
* @exception SQLException if a database access error occurs
|
|
720 |
*/
|
|
721 |
boolean supportsSchemasInPrivilegeDefinitions() throws SQLException;
|
|
722 |
|
|
723 |
/**
|
|
724 |
* Retrieves whether a catalog name can be used in a data manipulation statement.
|
|
725 |
*
|
|
726 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
727 |
* @exception SQLException if a database access error occurs
|
|
728 |
*/
|
|
729 |
boolean supportsCatalogsInDataManipulation() throws SQLException;
|
|
730 |
|
|
731 |
/**
|
|
732 |
* Retrieves whether a catalog name can be used in a procedure call statement.
|
|
733 |
*
|
|
734 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
735 |
* @exception SQLException if a database access error occurs
|
|
736 |
*/
|
|
737 |
boolean supportsCatalogsInProcedureCalls() throws SQLException;
|
|
738 |
|
|
739 |
/**
|
|
740 |
* Retrieves whether a catalog name can be used in a table definition statement.
|
|
741 |
*
|
|
742 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
743 |
* @exception SQLException if a database access error occurs
|
|
744 |
*/
|
|
745 |
boolean supportsCatalogsInTableDefinitions() throws SQLException;
|
|
746 |
|
|
747 |
/**
|
|
748 |
* Retrieves whether a catalog name can be used in an index definition statement.
|
|
749 |
*
|
|
750 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
751 |
* @exception SQLException if a database access error occurs
|
|
752 |
*/
|
|
753 |
boolean supportsCatalogsInIndexDefinitions() throws SQLException;
|
|
754 |
|
|
755 |
/**
|
|
756 |
* Retrieves whether a catalog name can be used in a privilege definition statement.
|
|
757 |
*
|
|
758 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
759 |
* @exception SQLException if a database access error occurs
|
|
760 |
*/
|
|
761 |
boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException;
|
|
762 |
|
|
763 |
|
|
764 |
/**
|
|
765 |
* Retrieves whether this database supports positioned <code>DELETE</code>
|
|
766 |
* statements.
|
|
767 |
*
|
|
768 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
769 |
* @exception SQLException if a database access error occurs
|
|
770 |
*/
|
|
771 |
boolean supportsPositionedDelete() throws SQLException;
|
|
772 |
|
|
773 |
/**
|
|
774 |
* Retrieves whether this database supports positioned <code>UPDATE</code>
|
|
775 |
* statements.
|
|
776 |
*
|
|
777 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
778 |
* @exception SQLException if a database access error occurs
|
|
779 |
*/
|
|
780 |
boolean supportsPositionedUpdate() throws SQLException;
|
|
781 |
|
|
782 |
/**
|
|
783 |
* Retrieves whether this database supports <code>SELECT FOR UPDATE</code>
|
|
784 |
* statements.
|
|
785 |
*
|
|
786 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
787 |
* @exception SQLException if a database access error occurs
|
|
788 |
*/
|
|
789 |
boolean supportsSelectForUpdate() throws SQLException;
|
|
790 |
|
|
791 |
/**
|
|
792 |
* Retrieves whether this database supports stored procedure calls
|
|
793 |
* that use the stored procedure escape syntax.
|
|
794 |
*
|
|
795 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
796 |
* @exception SQLException if a database access error occurs
|
|
797 |
*/
|
|
798 |
boolean supportsStoredProcedures() throws SQLException;
|
|
799 |
|
|
800 |
/**
|
|
801 |
* Retrieves whether this database supports subqueries in comparison
|
|
802 |
* expressions.
|
|
803 |
*
|
|
804 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
805 |
* @exception SQLException if a database access error occurs
|
|
806 |
*/
|
|
807 |
boolean supportsSubqueriesInComparisons() throws SQLException;
|
|
808 |
|
|
809 |
/**
|
|
810 |
* Retrieves whether this database supports subqueries in
|
|
811 |
* <code>EXISTS</code> expressions.
|
|
812 |
*
|
|
813 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
814 |
* @exception SQLException if a database access error occurs
|
|
815 |
*/
|
|
816 |
boolean supportsSubqueriesInExists() throws SQLException;
|
|
817 |
|
|
818 |
/**
|
|
819 |
* Retrieves whether this database supports subqueries in
|
|
820 |
* <code>IN</code> expressions.
|
|
821 |
*
|
|
822 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
823 |
* @exception SQLException if a database access error occurs
|
|
824 |
*/
|
|
825 |
boolean supportsSubqueriesInIns() throws SQLException;
|
|
826 |
|
|
827 |
/**
|
|
828 |
* Retrieves whether this database supports subqueries in quantified
|
|
829 |
* expressions.
|
|
830 |
*
|
|
831 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
832 |
* @exception SQLException if a database access error occurs
|
|
833 |
*/
|
|
834 |
boolean supportsSubqueriesInQuantifieds() throws SQLException;
|
|
835 |
|
|
836 |
/**
|
|
837 |
* Retrieves whether this database supports correlated subqueries.
|
|
838 |
*
|
|
839 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
840 |
* @exception SQLException if a database access error occurs
|
|
841 |
*/
|
|
842 |
boolean supportsCorrelatedSubqueries() throws SQLException;
|
|
843 |
|
|
844 |
/**
|
|
845 |
* Retrieves whether this database supports SQL <code>UNION</code>.
|
|
846 |
*
|
|
847 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
848 |
* @exception SQLException if a database access error occurs
|
|
849 |
*/
|
|
850 |
boolean supportsUnion() throws SQLException;
|
|
851 |
|
|
852 |
/**
|
|
853 |
* Retrieves whether this database supports SQL <code>UNION ALL</code>.
|
|
854 |
*
|
|
855 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
856 |
* @exception SQLException if a database access error occurs
|
|
857 |
*/
|
|
858 |
boolean supportsUnionAll() throws SQLException;
|
|
859 |
|
|
860 |
/**
|
|
861 |
* Retrieves whether this database supports keeping cursors open
|
|
862 |
* across commits.
|
|
863 |
*
|
|
864 |
* @return <code>true</code> if cursors always remain open;
|
|
865 |
* <code>false</code> if they might not remain open
|
|
866 |
* @exception SQLException if a database access error occurs
|
|
867 |
*/
|
|
868 |
boolean supportsOpenCursorsAcrossCommit() throws SQLException;
|
|
869 |
|
|
870 |
/**
|
|
871 |
* Retrieves whether this database supports keeping cursors open
|
|
872 |
* across rollbacks.
|
|
873 |
*
|
|
874 |
* @return <code>true</code> if cursors always remain open;
|
|
875 |
* <code>false</code> if they might not remain open
|
|
876 |
* @exception SQLException if a database access error occurs
|
|
877 |
*/
|
|
878 |
boolean supportsOpenCursorsAcrossRollback() throws SQLException;
|
|
879 |
|
|
880 |
/**
|
|
881 |
* Retrieves whether this database supports keeping statements open
|
|
882 |
* across commits.
|
|
883 |
*
|
|
884 |
* @return <code>true</code> if statements always remain open;
|
|
885 |
* <code>false</code> if they might not remain open
|
|
886 |
* @exception SQLException if a database access error occurs
|
|
887 |
*/
|
|
888 |
boolean supportsOpenStatementsAcrossCommit() throws SQLException;
|
|
889 |
|
|
890 |
/**
|
|
891 |
* Retrieves whether this database supports keeping statements open
|
|
892 |
* across rollbacks.
|
|
893 |
*
|
|
894 |
* @return <code>true</code> if statements always remain open;
|
|
895 |
* <code>false</code> if they might not remain open
|
|
896 |
* @exception SQLException if a database access error occurs
|
|
897 |
*/
|
|
898 |
boolean supportsOpenStatementsAcrossRollback() throws SQLException;
|
|
899 |
|
|
900 |
|
|
901 |
|
|
902 |
//----------------------------------------------------------------------
|
|
903 |
// The following group of methods exposes various limitations
|
|
904 |
// based on the target database with the current driver.
|
|
905 |
// Unless otherwise specified, a result of zero means there is no
|
|
906 |
// limit, or the limit is not known.
|
|
907 |
|
|
908 |
/**
|
|
909 |
* Retrieves the maximum number of hex characters this database allows in an
|
|
910 |
* inline binary literal.
|
|
911 |
*
|
|
912 |
* @return max the maximum length (in hex characters) for a binary literal;
|
|
913 |
* a result of zero means that there is no limit or the limit
|
|
914 |
* is not known
|
|
915 |
* @exception SQLException if a database access error occurs
|
|
916 |
*/
|
|
917 |
int getMaxBinaryLiteralLength() throws SQLException;
|
|
918 |
|
|
919 |
/**
|
|
920 |
* Retrieves the maximum number of characters this database allows
|
|
921 |
* for a character literal.
|
|
922 |
*
|
|
923 |
* @return the maximum number of characters allowed for a character literal;
|
|
924 |
* a result of zero means that there is no limit or the limit is
|
|
925 |
* not known
|
|
926 |
* @exception SQLException if a database access error occurs
|
|
927 |
*/
|
|
928 |
int getMaxCharLiteralLength() throws SQLException;
|
|
929 |
|
|
930 |
/**
|
|
931 |
* Retrieves the maximum number of characters this database allows
|
|
932 |
* for a column name.
|
|
933 |
*
|
|
934 |
* @return the maximum number of characters allowed for a column name;
|
|
935 |
* a result of zero means that there is no limit or the limit
|
|
936 |
* is not known
|
|
937 |
* @exception SQLException if a database access error occurs
|
|
938 |
*/
|
|
939 |
int getMaxColumnNameLength() throws SQLException;
|
|
940 |
|
|
941 |
/**
|
|
942 |
* Retrieves the maximum number of columns this database allows in a
|
|
943 |
* <code>GROUP BY</code> clause.
|
|
944 |
*
|
|
945 |
* @return the maximum number of columns allowed;
|
|
946 |
* a result of zero means that there is no limit or the limit
|
|
947 |
* is not known
|
|
948 |
* @exception SQLException if a database access error occurs
|
|
949 |
*/
|
|
950 |
int getMaxColumnsInGroupBy() throws SQLException;
|
|
951 |
|
|
952 |
/**
|
|
953 |
* Retrieves the maximum number of columns this database allows in an index.
|
|
954 |
*
|
|
955 |
* @return the maximum number of columns allowed;
|
|
956 |
* a result of zero means that there is no limit or the limit
|
|
957 |
* is not known
|
|
958 |
* @exception SQLException if a database access error occurs
|
|
959 |
*/
|
|
960 |
int getMaxColumnsInIndex() throws SQLException;
|
|
961 |
|
|
962 |
/**
|
|
963 |
* Retrieves the maximum number of columns this database allows in an
|
|
964 |
* <code>ORDER BY</code> clause.
|
|
965 |
*
|
|
966 |
* @return the maximum number of columns allowed;
|
|
967 |
* a result of zero means that there is no limit or the limit
|
|
968 |
* is not known
|
|
969 |
* @exception SQLException if a database access error occurs
|
|
970 |
*/
|
|
971 |
int getMaxColumnsInOrderBy() throws SQLException;
|
|
972 |
|
|
973 |
/**
|
|
974 |
* Retrieves the maximum number of columns this database allows in a
|
|
975 |
* <code>SELECT</code> list.
|
|
976 |
*
|
|
977 |
* @return the maximum number of columns allowed;
|
|
978 |
* a result of zero means that there is no limit or the limit
|
|
979 |
* is not known
|
|
980 |
* @exception SQLException if a database access error occurs
|
|
981 |
*/
|
|
982 |
int getMaxColumnsInSelect() throws SQLException;
|
|
983 |
|
|
984 |
/**
|
|
985 |
* Retrieves the maximum number of columns this database allows in a table.
|
|
986 |
*
|
|
987 |
* @return the maximum number of columns allowed;
|
|
988 |
* a result of zero means that there is no limit or the limit
|
|
989 |
* is not known
|
|
990 |
* @exception SQLException if a database access error occurs
|
|
991 |
*/
|
|
992 |
int getMaxColumnsInTable() throws SQLException;
|
|
993 |
|
|
994 |
/**
|
|
995 |
* Retrieves the maximum number of concurrent connections to this
|
|
996 |
* database that are possible.
|
|
997 |
*
|
|
998 |
* @return the maximum number of active connections possible at one time;
|
|
999 |
* a result of zero means that there is no limit or the limit
|
|
1000 |
* is not known
|
|
1001 |
* @exception SQLException if a database access error occurs
|
|
1002 |
*/
|
|
1003 |
int getMaxConnections() throws SQLException;
|
|
1004 |
|
|
1005 |
/**
|
|
1006 |
* Retrieves the maximum number of characters that this database allows in a
|
|
1007 |
* cursor name.
|
|
1008 |
*
|
|
1009 |
* @return the maximum number of characters allowed in a cursor name;
|
|
1010 |
* a result of zero means that there is no limit or the limit
|
|
1011 |
* is not known
|
|
1012 |
* @exception SQLException if a database access error occurs
|
|
1013 |
*/
|
|
1014 |
int getMaxCursorNameLength() throws SQLException;
|
|
1015 |
|
|
1016 |
/**
|
|
1017 |
* Retrieves the maximum number of bytes this database allows for an
|
|
1018 |
* index, including all of the parts of the index.
|
|
1019 |
*
|
|
1020 |
* @return the maximum number of bytes allowed; this limit includes the
|
|
1021 |
* composite of all the constituent parts of the index;
|
|
1022 |
* a result of zero means that there is no limit or the limit
|
|
1023 |
* is not known
|
|
1024 |
* @exception SQLException if a database access error occurs
|
|
1025 |
*/
|
|
1026 |
int getMaxIndexLength() throws SQLException;
|
|
1027 |
|
|
1028 |
/**
|
|
1029 |
* Retrieves the maximum number of characters that this database allows in a
|
|
1030 |
* schema name.
|
|
1031 |
*
|
|
1032 |
* @return the maximum number of characters allowed in a schema name;
|
|
1033 |
* a result of zero means that there is no limit or the limit
|
|
1034 |
* is not known
|
|
1035 |
* @exception SQLException if a database access error occurs
|
|
1036 |
*/
|
|
1037 |
int getMaxSchemaNameLength() throws SQLException;
|
|
1038 |
|
|
1039 |
/**
|
|
1040 |
* Retrieves the maximum number of characters that this database allows in a
|
|
1041 |
* procedure name.
|
|
1042 |
*
|
|
1043 |
* @return the maximum number of characters allowed in a procedure name;
|
|
1044 |
* a result of zero means that there is no limit or the limit
|
|
1045 |
* is not known
|
|
1046 |
* @exception SQLException if a database access error occurs
|
|
1047 |
*/
|
|
1048 |
int getMaxProcedureNameLength() throws SQLException;
|
|
1049 |
|
|
1050 |
/**
|
|
1051 |
* Retrieves the maximum number of characters that this database allows in a
|
|
1052 |
* catalog name.
|
|
1053 |
*
|
|
1054 |
* @return the maximum number of characters allowed in a catalog name;
|
|
1055 |
* a result of zero means that there is no limit or the limit
|
|
1056 |
* is not known
|
|
1057 |
* @exception SQLException if a database access error occurs
|
|
1058 |
*/
|
|
1059 |
int getMaxCatalogNameLength() throws SQLException;
|
|
1060 |
|
|
1061 |
/**
|
|
1062 |
* Retrieves the maximum number of bytes this database allows in
|
|
1063 |
* a single row.
|
|
1064 |
*
|
|
1065 |
* @return the maximum number of bytes allowed for a row; a result of
|
|
1066 |
* zero means that there is no limit or the limit is not known
|
|
1067 |
* @exception SQLException if a database access error occurs
|
|
1068 |
*/
|
|
1069 |
int getMaxRowSize() throws SQLException;
|
|
1070 |
|
|
1071 |
/**
|
|
1072 |
* Retrieves whether the return value for the method
|
|
1073 |
* <code>getMaxRowSize</code> includes the SQL data types
|
|
1074 |
* <code>LONGVARCHAR</code> and <code>LONGVARBINARY</code>.
|
|
1075 |
*
|
|
1076 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
1077 |
* @exception SQLException if a database access error occurs
|
|
1078 |
*/
|
|
1079 |
boolean doesMaxRowSizeIncludeBlobs() throws SQLException;
|
|
1080 |
|
|
1081 |
/**
|
|
1082 |
* Retrieves the maximum number of characters this database allows in
|
|
1083 |
* an SQL statement.
|
|
1084 |
*
|
|
1085 |
* @return the maximum number of characters allowed for an SQL statement;
|
|
1086 |
* a result of zero means that there is no limit or the limit
|
|
1087 |
* is not known
|
|
1088 |
* @exception SQLException if a database access error occurs
|
|
1089 |
*/
|
|
1090 |
int getMaxStatementLength() throws SQLException;
|
|
1091 |
|
|
1092 |
/**
|
|
1093 |
* Retrieves the maximum number of active statements to this database
|
|
1094 |
* that can be open at the same time.
|
|
1095 |
*
|
|
1096 |
* @return the maximum number of statements that can be open at one time;
|
|
1097 |
* a result of zero means that there is no limit or the limit
|
|
1098 |
* is not known
|
|
1099 |
* @exception SQLException if a database access error occurs
|
|
1100 |
*/
|
|
1101 |
int getMaxStatements() throws SQLException;
|
|
1102 |
|
|
1103 |
/**
|
|
1104 |
* Retrieves the maximum number of characters this database allows in
|
|
1105 |
* a table name.
|
|
1106 |
*
|
|
1107 |
* @return the maximum number of characters allowed for a table name;
|
|
1108 |
* a result of zero means that there is no limit or the limit
|
|
1109 |
* is not known
|
|
1110 |
* @exception SQLException if a database access error occurs
|
|
1111 |
*/
|
|
1112 |
int getMaxTableNameLength() throws SQLException;
|
|
1113 |
|
|
1114 |
/**
|
|
1115 |
* Retrieves the maximum number of tables this database allows in a
|
|
1116 |
* <code>SELECT</code> statement.
|
|
1117 |
*
|
|
1118 |
* @return the maximum number of tables allowed in a <code>SELECT</code>
|
|
1119 |
* statement; a result of zero means that there is no limit or
|
|
1120 |
* the limit is not known
|
|
1121 |
* @exception SQLException if a database access error occurs
|
|
1122 |
*/
|
|
1123 |
int getMaxTablesInSelect() throws SQLException;
|
|
1124 |
|
|
1125 |
/**
|
|
1126 |
* Retrieves the maximum number of characters this database allows in
|
|
1127 |
* a user name.
|
|
1128 |
*
|
|
1129 |
* @return the maximum number of characters allowed for a user name;
|
|
1130 |
* a result of zero means that there is no limit or the limit
|
|
1131 |
* is not known
|
|
1132 |
* @exception SQLException if a database access error occurs
|
|
1133 |
*/
|
|
1134 |
int getMaxUserNameLength() throws SQLException;
|
|
1135 |
|
|
1136 |
//----------------------------------------------------------------------
|
|
1137 |
|
|
1138 |
/**
|
|
1139 |
* Retrieves this database's default transaction isolation level. The
|
|
1140 |
* possible values are defined in <code>java.sql.Connection</code>.
|
|
1141 |
*
|
|
1142 |
* @return the default isolation level
|
|
1143 |
* @exception SQLException if a database access error occurs
|
|
1144 |
* @see Connection
|
|
1145 |
*/
|
|
1146 |
int getDefaultTransactionIsolation() throws SQLException;
|
|
1147 |
|
|
1148 |
/**
|
|
1149 |
* Retrieves whether this database supports transactions. If not, invoking the
|
|
1150 |
* method <code>commit</code> is a noop, and the isolation level is
|
|
1151 |
* <code>TRANSACTION_NONE</code>.
|
|
1152 |
*
|
|
1153 |
* @return <code>true</code> if transactions are supported;
|
|
1154 |
* <code>false</code> otherwise
|
|
1155 |
* @exception SQLException if a database access error occurs
|
|
1156 |
*/
|
|
1157 |
boolean supportsTransactions() throws SQLException;
|
|
1158 |
|
|
1159 |
/**
|
|
1160 |
* Retrieves whether this database supports the given transaction isolation level.
|
|
1161 |
*
|
|
1162 |
* @param level one of the transaction isolation levels defined in
|
|
1163 |
* <code>java.sql.Connection</code>
|
|
1164 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
1165 |
* @exception SQLException if a database access error occurs
|
|
1166 |
* @see Connection
|
|
1167 |
*/
|
|
1168 |
boolean supportsTransactionIsolationLevel(int level)
|
|
1169 |
throws SQLException;
|
|
1170 |
|
|
1171 |
/**
|
|
1172 |
* Retrieves whether this database supports both data definition and
|
|
1173 |
* data manipulation statements within a transaction.
|
|
1174 |
*
|
|
1175 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
1176 |
* @exception SQLException if a database access error occurs
|
|
1177 |
*/
|
|
1178 |
boolean supportsDataDefinitionAndDataManipulationTransactions()
|
|
1179 |
throws SQLException;
|
|
1180 |
/**
|
|
1181 |
* Retrieves whether this database supports only data manipulation
|
|
1182 |
* statements within a transaction.
|
|
1183 |
*
|
|
1184 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
1185 |
* @exception SQLException if a database access error occurs
|
|
1186 |
*/
|
|
1187 |
boolean supportsDataManipulationTransactionsOnly()
|
|
1188 |
throws SQLException;
|
|
1189 |
|
|
1190 |
/**
|
|
1191 |
* Retrieves whether a data definition statement within a transaction forces
|
|
1192 |
* the transaction to commit.
|
|
1193 |
*
|
|
1194 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
1195 |
* @exception SQLException if a database access error occurs
|
|
1196 |
*/
|
|
1197 |
boolean dataDefinitionCausesTransactionCommit()
|
|
1198 |
throws SQLException;
|
|
1199 |
|
|
1200 |
/**
|
|
1201 |
* Retrieves whether this database ignores a data definition statement
|
|
1202 |
* within a transaction.
|
|
1203 |
*
|
|
1204 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
1205 |
* @exception SQLException if a database access error occurs
|
|
1206 |
*/
|
|
1207 |
boolean dataDefinitionIgnoredInTransactions()
|
|
1208 |
throws SQLException;
|
|
1209 |
|
|
1210 |
/**
|
|
1211 |
* Retrieves a description of the stored procedures available in the given
|
|
1212 |
* catalog.
|
|
1213 |
* <P>
|
|
1214 |
* Only procedure descriptions matching the schema and
|
|
1215 |
* procedure name criteria are returned. They are ordered by
|
|
1216 |
* <code>PROCEDURE_CAT</code>, <code>PROCEDURE_SCHEM</code>,
|
|
1217 |
* <code>PROCEDURE_NAME</code> and <code>SPECIFIC_ NAME</code>.
|
|
1218 |
*
|
|
1219 |
* <P>Each procedure description has the the following columns:
|
|
1220 |
* <OL>
|
|
1221 |
* <LI><B>PROCEDURE_CAT</B> String => procedure catalog (may be <code>null</code>)
|
|
1222 |
* <LI><B>PROCEDURE_SCHEM</B> String => procedure schema (may be <code>null</code>)
|
|
1223 |
* <LI><B>PROCEDURE_NAME</B> String => procedure name
|
|
1224 |
* <LI> reserved for future use
|
|
1225 |
* <LI> reserved for future use
|
|
1226 |
* <LI> reserved for future use
|
|
1227 |
* <LI><B>REMARKS</B> String => explanatory comment on the procedure
|
|
1228 |
* <LI><B>PROCEDURE_TYPE</B> short => kind of procedure:
|
|
1229 |
* <UL>
|
|
1230 |
* <LI> procedureResultUnknown - Cannot determine if a return value
|
|
1231 |
* will be returned
|
|
1232 |
* <LI> procedureNoResult - Does not return a return value
|
|
1233 |
* <LI> procedureReturnsResult - Returns a return value
|
|
1234 |
* </UL>
|
|
1235 |
* <LI><B>SPECIFIC_NAME</B> String => The name which uniquely identifies this
|
|
1236 |
* procedure within its schema.
|
|
1237 |
* </OL>
|
|
1238 |
* <p>
|
|
1239 |
* A user may not have permissions to execute any of the procedures that are
|
|
1240 |
* returned by <code>getProcedures</code>
|
|
1241 |
*
|
|
1242 |
* @param catalog a catalog name; must match the catalog name as it
|
|
1243 |
* is stored in the database; "" retrieves those without a catalog;
|
|
1244 |
* <code>null</code> means that the catalog name should not be used to narrow
|
|
1245 |
* the search
|
|
1246 |
* @param schemaPattern a schema name pattern; must match the schema name
|
|
1247 |
* as it is stored in the database; "" retrieves those without a schema;
|
|
1248 |
* <code>null</code> means that the schema name should not be used to narrow
|
|
1249 |
* the search
|
|
1250 |
* @param procedureNamePattern a procedure name pattern; must match the
|
|
1251 |
* procedure name as it is stored in the database
|
|
1252 |
* @return <code>ResultSet</code> - each row is a procedure description
|
|
1253 |
* @exception SQLException if a database access error occurs
|
|
1254 |
* @see #getSearchStringEscape
|
|
1255 |
*/
|
|
1256 |
ResultSet getProcedures(String catalog, String schemaPattern,
|
|
1257 |
String procedureNamePattern) throws SQLException;
|
|
1258 |
|
|
1259 |
/**
|
|
1260 |
* Indicates that it is not known whether the procedure returns
|
|
1261 |
* a result.
|
|
1262 |
* <P>
|
|
1263 |
* A possible value for column <code>PROCEDURE_TYPE</code> in the
|
|
1264 |
* <code>ResultSet</code> object returned by the method
|
|
1265 |
* <code>getProcedures</code>.
|
|
1266 |
*/
|
|
1267 |
int procedureResultUnknown = 0;
|
|
1268 |
|
|
1269 |
/**
|
|
1270 |
* Indicates that the procedure does not return a result.
|
|
1271 |
* <P>
|
|
1272 |
* A possible value for column <code>PROCEDURE_TYPE</code> in the
|
|
1273 |
* <code>ResultSet</code> object returned by the method
|
|
1274 |
* <code>getProcedures</code>.
|
|
1275 |
*/
|
|
1276 |
int procedureNoResult = 1;
|
|
1277 |
|
|
1278 |
/**
|
|
1279 |
* Indicates that the procedure returns a result.
|
|
1280 |
* <P>
|
|
1281 |
* A possible value for column <code>PROCEDURE_TYPE</code> in the
|
|
1282 |
* <code>ResultSet</code> object returned by the method
|
|
1283 |
* <code>getProcedures</code>.
|
|
1284 |
*/
|
|
1285 |
int procedureReturnsResult = 2;
|
|
1286 |
|
|
1287 |
/**
|
|
1288 |
* Retrieves a description of the given catalog's stored procedure parameter
|
|
1289 |
* and result columns.
|
|
1290 |
*
|
|
1291 |
* <P>Only descriptions matching the schema, procedure and
|
|
1292 |
* parameter name criteria are returned. They are ordered by
|
|
1293 |
* PROCEDURE_CAT, PROCEDURE_SCHEM, PROCEDURE_NAME and SPECIFIC_NAME. Within this, the return value,
|
|
1294 |
* if any, is first. Next are the parameter descriptions in call
|
|
1295 |
* order. The column descriptions follow in column number order.
|
|
1296 |
*
|
|
1297 |
* <P>Each row in the <code>ResultSet</code> is a parameter description or
|
|
1298 |
* column description with the following fields:
|
|
1299 |
* <OL>
|
|
1300 |
* <LI><B>PROCEDURE_CAT</B> String => procedure catalog (may be <code>null</code>)
|
|
1301 |
* <LI><B>PROCEDURE_SCHEM</B> String => procedure schema (may be <code>null</code>)
|
|
1302 |
* <LI><B>PROCEDURE_NAME</B> String => procedure name
|
|
1303 |
* <LI><B>COLUMN_NAME</B> String => column/parameter name
|
|
1304 |
* <LI><B>COLUMN_TYPE</B> Short => kind of column/parameter:
|
|
1305 |
* <UL>
|
|
1306 |
* <LI> procedureColumnUnknown - nobody knows
|
|
1307 |
* <LI> procedureColumnIn - IN parameter
|
|
1308 |
* <LI> procedureColumnInOut - INOUT parameter
|
|
1309 |
* <LI> procedureColumnOut - OUT parameter
|
|
1310 |
* <LI> procedureColumnReturn - procedure return value
|
|
1311 |
* <LI> procedureColumnResult - result column in <code>ResultSet</code>
|
|
1312 |
* </UL>
|
|
1313 |
* <LI><B>DATA_TYPE</B> int => SQL type from java.sql.Types
|
|
1314 |
* <LI><B>TYPE_NAME</B> String => SQL type name, for a UDT type the
|
|
1315 |
* type name is fully qualified
|
|
1316 |
* <LI><B>PRECISION</B> int => precision
|
|
1317 |
* <LI><B>LENGTH</B> int => length in bytes of data
|
|
1318 |
* <LI><B>SCALE</B> short => scale - null is returned for data types where
|
|
1319 |
* SCALE is not applicable.
|
|
1320 |
* <LI><B>RADIX</B> short => radix
|
|
1321 |
* <LI><B>NULLABLE</B> short => can it contain NULL.
|
|
1322 |
* <UL>
|
|
1323 |
* <LI> procedureNoNulls - does not allow NULL values
|
|
1324 |
* <LI> procedureNullable - allows NULL values
|
|
1325 |
* <LI> procedureNullableUnknown - nullability unknown
|
|
1326 |
* </UL>
|
|
1327 |
* <LI><B>REMARKS</B> String => comment describing parameter/column
|
|
1328 |
* <LI><B>COLUMN_DEF</B> String => default value for the column, which should be interpreted as a string when the value is enclosed in single quotes (may be <code>null</code>)
|
|
1329 |
* <UL>
|
|
1330 |
* <LI> The string NULL (not enclosed in quotes) - if NULL was specified as the default value
|
|
1331 |
* <LI> TRUNCATE (not enclosed in quotes) - if the specified default value cannot be represented without truncation
|
|
1332 |
* <LI> NULL - if a default value was not specified
|
|
1333 |
* </UL>
|
|
1334 |
* <LI><B>SQL_DATA_TYPE</B> int => reserved for future use
|
|
1335 |
* <LI><B>SQL_DATETIME_SUB</B> int => reserved for future use
|
|
1336 |
* <LI><B>CHAR_OCTET_LENGTH</B> int => the maximum length of binary and character based columns. For any other datatype the returned value is a
|
|
1337 |
* NULL
|
|
1338 |
* <LI><B>ORDINAL_POSITION</B> int => the ordinal position, starting from 1, for the input and output parameters for a procedure. A value of 0
|
|
1339 |
*is returned if this row describes the procedure's return value. For result set columns, it is the
|
|
1340 |
*ordinal position of the column in the result set starting from 1. If there are
|
|
1341 |
*multiple result sets, the column ordinal positions are implementation
|
|
1342 |
* defined.
|
|
1343 |
* <LI><B>IS_NULLABLE</B> String => ISO rules are used to determine the nullability for a column.
|
|
1344 |
* <UL>
|
|
1345 |
* <LI> YES --- if the parameter can include NULLs
|
|
1346 |
* <LI> NO --- if the parameter cannot include NULLs
|
|
1347 |
* <LI> empty string --- if the nullability for the
|
|
1348 |
* parameter is unknown
|
|
1349 |
* </UL>
|
|
1350 |
* <LI><B>SPECIFIC_NAME</B> String => the name which uniquely identifies this procedure within its schema.
|
|
1351 |
* </OL>
|
|
1352 |
*
|
|
1353 |
* <P><B>Note:</B> Some databases may not return the column
|
|
1354 |
* descriptions for a procedure.
|
|
1355 |
*
|
|
1356 |
* <p>The PRECISION column represents the specified column size for the given column.
|
|
1357 |
* For numeric data, this is the maximum precision. For character data, this is the length in characters.
|
|
1358 |
* For datetime datatypes, this is the length in characters of the String representation (assuming the
|
|
1359 |
* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,
|
|
1360 |
* this is the length in bytes. Null is returned for data types where the
|
|
1361 |
* column size is not applicable.
|
|
1362 |
* @param catalog a catalog name; must match the catalog name as it
|
|
1363 |
* is stored in the database; "" retrieves those without a catalog;
|
|
1364 |
* <code>null</code> means that the catalog name should not be used to narrow
|
|
1365 |
* the search
|
|
1366 |
* @param schemaPattern a schema name pattern; must match the schema name
|
|
1367 |
* as it is stored in the database; "" retrieves those without a schema;
|
|
1368 |
* <code>null</code> means that the schema name should not be used to narrow
|
|
1369 |
* the search
|
|
1370 |
* @param procedureNamePattern a procedure name pattern; must match the
|
|
1371 |
* procedure name as it is stored in the database
|
|
1372 |
* @param columnNamePattern a column name pattern; must match the column name
|
|
1373 |
* as it is stored in the database
|
|
1374 |
* @return <code>ResultSet</code> - each row describes a stored procedure parameter or
|
|
1375 |
* column
|
|
1376 |
* @exception SQLException if a database access error occurs
|
|
1377 |
* @see #getSearchStringEscape
|
|
1378 |
*/
|
|
1379 |
ResultSet getProcedureColumns(String catalog,
|
|
1380 |
String schemaPattern,
|
|
1381 |
String procedureNamePattern,
|
|
1382 |
String columnNamePattern) throws SQLException;
|
|
1383 |
|
|
1384 |
/**
|
|
1385 |
* Indicates that type of the column is unknown.
|
|
1386 |
* <P>
|
|
1387 |
* A possible value for the column
|
|
1388 |
* <code>COLUMN_TYPE</code>
|
|
1389 |
* in the <code>ResultSet</code>
|
|
1390 |
* returned by the method <code>getProcedureColumns</code>.
|
|
1391 |
*/
|
|
1392 |
int procedureColumnUnknown = 0;
|
|
1393 |
|
|
1394 |
/**
|
|
1395 |
* Indicates that the column stores IN parameters.
|
|
1396 |
* <P>
|
|
1397 |
* A possible value for the column
|
|
1398 |
* <code>COLUMN_TYPE</code>
|
|
1399 |
* in the <code>ResultSet</code>
|
|
1400 |
* returned by the method <code>getProcedureColumns</code>.
|
|
1401 |
*/
|
|
1402 |
int procedureColumnIn = 1;
|
|
1403 |
|
|
1404 |
/**
|
|
1405 |
* Indicates that the column stores INOUT parameters.
|
|
1406 |
* <P>
|
|
1407 |
* A possible value for the column
|
|
1408 |
* <code>COLUMN_TYPE</code>
|
|
1409 |
* in the <code>ResultSet</code>
|
|
1410 |
* returned by the method <code>getProcedureColumns</code>.
|
|
1411 |
*/
|
|
1412 |
int procedureColumnInOut = 2;
|
|
1413 |
|
|
1414 |
/**
|
|
1415 |
* Indicates that the column stores OUT parameters.
|
|
1416 |
* <P>
|
|
1417 |
* A possible value for the column
|
|
1418 |
* <code>COLUMN_TYPE</code>
|
|
1419 |
* in the <code>ResultSet</code>
|
|
1420 |
* returned by the method <code>getProcedureColumns</code>.
|
|
1421 |
*/
|
|
1422 |
int procedureColumnOut = 4;
|
|
1423 |
/**
|
|
1424 |
* Indicates that the column stores return values.
|
|
1425 |
* <P>
|
|
1426 |
* A possible value for the column
|
|
1427 |
* <code>COLUMN_TYPE</code>
|
|
1428 |
* in the <code>ResultSet</code>
|
|
1429 |
* returned by the method <code>getProcedureColumns</code>.
|
|
1430 |
*/
|
|
1431 |
int procedureColumnReturn = 5;
|
|
1432 |
|
|
1433 |
/**
|
|
1434 |
* Indicates that the column stores results.
|
|
1435 |
* <P>
|
|
1436 |
* A possible value for the column
|
|
1437 |
* <code>COLUMN_TYPE</code>
|
|
1438 |
* in the <code>ResultSet</code>
|
|
1439 |
* returned by the method <code>getProcedureColumns</code>.
|
|
1440 |
*/
|
|
1441 |
int procedureColumnResult = 3;
|
|
1442 |
|
|
1443 |
/**
|
|
1444 |
* Indicates that <code>NULL</code> values are not allowed.
|
|
1445 |
* <P>
|
|
1446 |
* A possible value for the column
|
|
1447 |
* <code>NULLABLE</code>
|
|
1448 |
* in the <code>ResultSet</code> object
|
|
1449 |
* returned by the method <code>getProcedureColumns</code>.
|
|
1450 |
*/
|
|
1451 |
int procedureNoNulls = 0;
|
|
1452 |
|
|
1453 |
/**
|
|
1454 |
* Indicates that <code>NULL</code> values are allowed.
|
|
1455 |
* <P>
|
|
1456 |
* A possible value for the column
|
|
1457 |
* <code>NULLABLE</code>
|
|
1458 |
* in the <code>ResultSet</code> object
|
|
1459 |
* returned by the method <code>getProcedureColumns</code>.
|
|
1460 |
*/
|
|
1461 |
int procedureNullable = 1;
|
|
1462 |
|
|
1463 |
/**
|
|
1464 |
* Indicates that whether <code>NULL</code> values are allowed
|
|
1465 |
* is unknown.
|
|
1466 |
* <P>
|
|
1467 |
* A possible value for the column
|
|
1468 |
* <code>NULLABLE</code>
|
|
1469 |
* in the <code>ResultSet</code> object
|
|
1470 |
* returned by the method <code>getProcedureColumns</code>.
|
|
1471 |
*/
|
|
1472 |
int procedureNullableUnknown = 2;
|
|
1473 |
|
|
1474 |
|
|
1475 |
/**
|
|
1476 |
* Retrieves a description of the tables available in the given catalog.
|
|
1477 |
* Only table descriptions matching the catalog, schema, table
|
|
1478 |
* name and type criteria are returned. They are ordered by
|
|
1479 |
* <code>TABLE_TYPE</code>, <code>TABLE_CAT</code>,
|
|
1480 |
* <code>TABLE_SCHEM</code> and <code>TABLE_NAME</code>.
|
|
1481 |
* <P>
|
|
1482 |
* Each table description has the following columns:
|
|
1483 |
* <OL>
|
|
1484 |
* <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
|
|
1485 |
* <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
|
|
1486 |
* <LI><B>TABLE_NAME</B> String => table name
|
|
1487 |
* <LI><B>TABLE_TYPE</B> String => table type. Typical types are "TABLE",
|
|
1488 |
* "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY",
|
|
1489 |
* "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
|
|
1490 |
* <LI><B>REMARKS</B> String => explanatory comment on the table
|
|
1491 |
* <LI><B>TYPE_CAT</B> String => the types catalog (may be <code>null</code>)
|
|
1492 |
* <LI><B>TYPE_SCHEM</B> String => the types schema (may be <code>null</code>)
|
|
1493 |
* <LI><B>TYPE_NAME</B> String => type name (may be <code>null</code>)
|
|
1494 |
* <LI><B>SELF_REFERENCING_COL_NAME</B> String => name of the designated
|
|
1495 |
* "identifier" column of a typed table (may be <code>null</code>)
|
|
1496 |
* <LI><B>REF_GENERATION</B> String => specifies how values in
|
|
1497 |
* SELF_REFERENCING_COL_NAME are created. Values are
|
|
1498 |
* "SYSTEM", "USER", "DERIVED". (may be <code>null</code>)
|
|
1499 |
* </OL>
|
|
1500 |
*
|
|
1501 |
* <P><B>Note:</B> Some databases may not return information for
|
|
1502 |
* all tables.
|
|
1503 |
*
|
|
1504 |
* @param catalog a catalog name; must match the catalog name as it
|
|
1505 |
* is stored in the database; "" retrieves those without a catalog;
|
|
1506 |
* <code>null</code> means that the catalog name should not be used to narrow
|
|
1507 |
* the search
|
|
1508 |
* @param schemaPattern a schema name pattern; must match the schema name
|
|
1509 |
* as it is stored in the database; "" retrieves those without a schema;
|
|
1510 |
* <code>null</code> means that the schema name should not be used to narrow
|
|
1511 |
* the search
|
|
1512 |
* @param tableNamePattern a table name pattern; must match the
|
|
1513 |
* table name as it is stored in the database
|
|
1514 |
* @param types a list of table types, which must be from the list of table types
|
|
1515 |
* returned from {@link #getTableTypes},to include; <code>null</code> returns
|
|
1516 |
* all types
|
|
1517 |
* @return <code>ResultSet</code> - each row is a table description
|
|
1518 |
* @exception SQLException if a database access error occurs
|
|
1519 |
* @see #getSearchStringEscape
|
|
1520 |
*/
|
|
1521 |
ResultSet getTables(String catalog, String schemaPattern,
|
|
1522 |
String tableNamePattern, String types[]) throws SQLException;
|
|
1523 |
|
|
1524 |
/**
|
|
1525 |
* Retrieves the schema names available in this database. The results
|
|
1526 |
* are ordered by <code>TABLE_CATALOG</code> and
|
|
1527 |
* <code>TABLE_SCHEM</code>.
|
|
1528 |
*
|
|
1529 |
* <P>The schema columns are:
|
|
1530 |
* <OL>
|
|
1531 |
* <LI><B>TABLE_SCHEM</B> String => schema name
|
|
1532 |
* <LI><B>TABLE_CATALOG</B> String => catalog name (may be <code>null</code>)
|
|
1533 |
* </OL>
|
|
1534 |
*
|
|
1535 |
* @return a <code>ResultSet</code> object in which each row is a
|
|
1536 |
* schema description
|
|
1537 |
* @exception SQLException if a database access error occurs
|
|
1538 |
*
|
|
1539 |
*/
|
|
1540 |
ResultSet getSchemas() throws SQLException;
|
|
1541 |
|
|
1542 |
/**
|
|
1543 |
* Retrieves the catalog names available in this database. The results
|
|
1544 |
* are ordered by catalog name.
|
|
1545 |
*
|
|
1546 |
* <P>The catalog column is:
|
|
1547 |
* <OL>
|
|
1548 |
* <LI><B>TABLE_CAT</B> String => catalog name
|
|
1549 |
* </OL>
|
|
1550 |
*
|
|
1551 |
* @return a <code>ResultSet</code> object in which each row has a
|
|
1552 |
* single <code>String</code> column that is a catalog name
|
|
1553 |
* @exception SQLException if a database access error occurs
|
|
1554 |
*/
|
|
1555 |
ResultSet getCatalogs() throws SQLException;
|
|
1556 |
|
|
1557 |
/**
|
|
1558 |
* Retrieves the table types available in this database. The results
|
|
1559 |
* are ordered by table type.
|
|
1560 |
*
|
|
1561 |
* <P>The table type is:
|
|
1562 |
* <OL>
|
|
1563 |
* <LI><B>TABLE_TYPE</B> String => table type. Typical types are "TABLE",
|
|
1564 |
* "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY",
|
|
1565 |
* "LOCAL TEMPORARY", "ALIAS", "SYNONYM".
|
|
1566 |
* </OL>
|
|
1567 |
*
|
|
1568 |
* @return a <code>ResultSet</code> object in which each row has a
|
|
1569 |
* single <code>String</code> column that is a table type
|
|
1570 |
* @exception SQLException if a database access error occurs
|
|
1571 |
*/
|
|
1572 |
ResultSet getTableTypes() throws SQLException;
|
|
1573 |
|
|
1574 |
/**
|
|
1575 |
* Retrieves a description of table columns available in
|
|
1576 |
* the specified catalog.
|
|
1577 |
*
|
|
1578 |
* <P>Only column descriptions matching the catalog, schema, table
|
|
1579 |
* and column name criteria are returned. They are ordered by
|
|
1580 |
* <code>TABLE_CAT</code>,<code>TABLE_SCHEM</code>,
|
|
1581 |
* <code>TABLE_NAME</code>, and <code>ORDINAL_POSITION</code>.
|
|
1582 |
*
|
|
1583 |
* <P>Each column description has the following columns:
|
|
1584 |
* <OL>
|
|
1585 |
* <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
|
|
1586 |
* <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
|
|
1587 |
* <LI><B>TABLE_NAME</B> String => table name
|
|
1588 |
* <LI><B>COLUMN_NAME</B> String => column name
|
|
1589 |
* <LI><B>DATA_TYPE</B> int => SQL type from java.sql.Types
|
|
1590 |
* <LI><B>TYPE_NAME</B> String => Data source dependent type name,
|
|
1591 |
* for a UDT the type name is fully qualified
|
|
1592 |
* <LI><B>COLUMN_SIZE</B> int => column size.
|
|
1593 |
* <LI><B>BUFFER_LENGTH</B> is not used.
|
|
1594 |
* <LI><B>DECIMAL_DIGITS</B> int => the number of fractional digits. Null is returned for data types where
|
|
1595 |
* DECIMAL_DIGITS is not applicable.
|
|
1596 |
* <LI><B>NUM_PREC_RADIX</B> int => Radix (typically either 10 or 2)
|
|
1597 |
* <LI><B>NULLABLE</B> int => is NULL allowed.
|
|
1598 |
* <UL>
|
|
1599 |
* <LI> columnNoNulls - might not allow <code>NULL</code> values
|
|
1600 |
* <LI> columnNullable - definitely allows <code>NULL</code> values
|
|
1601 |
* <LI> columnNullableUnknown - nullability unknown
|
|
1602 |
* </UL>
|
|
1603 |
* <LI><B>REMARKS</B> String => comment describing column (may be <code>null</code>)
|
|
1604 |
* <LI><B>COLUMN_DEF</B> String => default value for the column, which should be interpreted as a string when the value is enclosed in single quotes (may be <code>null</code>)
|
|
1605 |
* <LI><B>SQL_DATA_TYPE</B> int => unused
|
|
1606 |
* <LI><B>SQL_DATETIME_SUB</B> int => unused
|
|
1607 |
* <LI><B>CHAR_OCTET_LENGTH</B> int => for char types the
|
|
1608 |
* maximum number of bytes in the column
|
|
1609 |
* <LI><B>ORDINAL_POSITION</B> int => index of column in table
|
|
1610 |
* (starting at 1)
|
|
1611 |
* <LI><B>IS_NULLABLE</B> String => ISO rules are used to determine the nullability for a column.
|
|
1612 |
* <UL>
|
|
1613 |
* <LI> YES --- if the parameter can include NULLs
|
|
1614 |
* <LI> NO --- if the parameter cannot include NULLs
|
|
1615 |
* <LI> empty string --- if the nullability for the
|
|
1616 |
* parameter is unknown
|
|
1617 |
* </UL>
|
|
1618 |
* <LI><B>SCOPE_CATLOG</B> String => catalog of table that is the scope
|
|
1619 |
* of a reference attribute (<code>null</code> if DATA_TYPE isn't REF)
|
|
1620 |
* <LI><B>SCOPE_SCHEMA</B> String => schema of table that is the scope
|
|
1621 |
* of a reference attribute (<code>null</code> if the DATA_TYPE isn't REF)
|
|
1622 |
* <LI><B>SCOPE_TABLE</B> String => table name that this the scope
|
|
1623 |
* of a reference attribure (<code>null</code> if the DATA_TYPE isn't REF)
|
|
1624 |
* <LI><B>SOURCE_DATA_TYPE</B> short => source type of a distinct type or user-generated
|
|
1625 |
* Ref type, SQL type from java.sql.Types (<code>null</code> if DATA_TYPE
|
|
1626 |
* isn't DISTINCT or user-generated REF)
|
|
1627 |
* <LI><B>IS_AUTOINCREMENT</B> String => Indicates whether this column is auto incremented
|
|
1628 |
* <UL>
|
|
1629 |
* <LI> YES --- if the column is auto incremented
|
|
1630 |
* <LI> NO --- if the column is not auto incremented
|
|
1631 |
* <LI> empty string --- if it cannot be determined whether the column is auto incremented
|
|
1632 |
* parameter is unknown
|
|
1633 |
* </UL>
|
|
1634 |
* </OL>
|
|
1635 |
*
|
|
1636 |
* <p>The COLUMN_SIZE column the specified column size for the given column.
|
|
1637 |
* For numeric data, this is the maximum precision. For character data, this is the length in characters.
|
|
1638 |
* For datetime datatypes, this is the length in characters of the String representation (assuming the
|
|
1639 |
* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,
|
|
1640 |
* this is the length in bytes. Null is returned for data types where the
|
|
1641 |
* column size is not applicable.
|
|
1642 |
*
|
|
1643 |
* @param catalog a catalog name; must match the catalog name as it
|
|
1644 |
* is stored in the database; "" retrieves those without a catalog;
|
|
1645 |
* <code>null</code> means that the catalog name should not be used to narrow
|
|
1646 |
* the search
|
|
1647 |
* @param schemaPattern a schema name pattern; must match the schema name
|
|
1648 |
* as it is stored in the database; "" retrieves those without a schema;
|
|
1649 |
* <code>null</code> means that the schema name should not be used to narrow
|
|
1650 |
* the search
|
|
1651 |
* @param tableNamePattern a table name pattern; must match the
|
|
1652 |
* table name as it is stored in the database
|
|
1653 |
* @param columnNamePattern a column name pattern; must match the column
|
|
1654 |
* name as it is stored in the database
|
|
1655 |
* @return <code>ResultSet</code> - each row is a column description
|
|
1656 |
* @exception SQLException if a database access error occurs
|
|
1657 |
* @see #getSearchStringEscape
|
|
1658 |
*/
|
|
1659 |
ResultSet getColumns(String catalog, String schemaPattern,
|
|
1660 |
String tableNamePattern, String columnNamePattern)
|
|
1661 |
throws SQLException;
|
|
1662 |
|
|
1663 |
/**
|
|
1664 |
* Indicates that the column might not allow <code>NULL</code> values.
|
|
1665 |
* <P>
|
|
1666 |
* A possible value for the column
|
|
1667 |
* <code>NULLABLE</code>
|
|
1668 |
* in the <code>ResultSet</code> returned by the method
|
|
1669 |
* <code>getColumns</code>.
|
|
1670 |
*/
|
|
1671 |
int columnNoNulls = 0;
|
|
1672 |
|
|
1673 |
/**
|
|
1674 |
* Indicates that the column definitely allows <code>NULL</code> values.
|
|
1675 |
* <P>
|
|
1676 |
* A possible value for the column
|
|
1677 |
* <code>NULLABLE</code>
|
|
1678 |
* in the <code>ResultSet</code> returned by the method
|
|
1679 |
* <code>getColumns</code>.
|
|
1680 |
*/
|
|
1681 |
int columnNullable = 1;
|
|
1682 |
|
|
1683 |
/**
|
|
1684 |
* Indicates that the nullability of columns is unknown.
|
|
1685 |
* <P>
|
|
1686 |
* A possible value for the column
|
|
1687 |
* <code>NULLABLE</code>
|
|
1688 |
* in the <code>ResultSet</code> returned by the method
|
|
1689 |
* <code>getColumns</code>.
|
|
1690 |
*/
|
|
1691 |
int columnNullableUnknown = 2;
|
|
1692 |
|
|
1693 |
/**
|
|
1694 |
* Retrieves a description of the access rights for a table's columns.
|
|
1695 |
*
|
|
1696 |
* <P>Only privileges matching the column name criteria are
|
|
1697 |
* returned. They are ordered by COLUMN_NAME and PRIVILEGE.
|
|
1698 |
*
|
|
1699 |
* <P>Each privilige description has the following columns:
|
|
1700 |
* <OL>
|
|
1701 |
* <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
|
|
1702 |
* <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
|
|
1703 |
* <LI><B>TABLE_NAME</B> String => table name
|
|
1704 |
* <LI><B>COLUMN_NAME</B> String => column name
|
|
1705 |
* <LI><B>GRANTOR</B> String => grantor of access (may be <code>null</code>)
|
|
1706 |
* <LI><B>GRANTEE</B> String => grantee of access
|
|
1707 |
* <LI><B>PRIVILEGE</B> String => name of access (SELECT,
|
|
1708 |
* INSERT, UPDATE, REFRENCES, ...)
|
|
1709 |
* <LI><B>IS_GRANTABLE</B> String => "YES" if grantee is permitted
|
|
1710 |
* to grant to others; "NO" if not; <code>null</code> if unknown
|
|
1711 |
* </OL>
|
|
1712 |
*
|
|
1713 |
* @param catalog a catalog name; must match the catalog name as it
|
|
1714 |
* is stored in the database; "" retrieves those without a catalog;
|
|
1715 |
* <code>null</code> means that the catalog name should not be used to narrow
|
|
1716 |
* the search
|
|
1717 |
* @param schema a schema name; must match the schema name as it is
|
|
1718 |
* stored in the database; "" retrieves those without a schema;
|
|
1719 |
* <code>null</code> means that the schema name should not be used to narrow
|
|
1720 |
* the search
|
|
1721 |
* @param table a table name; must match the table name as it is
|
|
1722 |
* stored in the database
|
|
1723 |
* @param columnNamePattern a column name pattern; must match the column
|
|
1724 |
* name as it is stored in the database
|
|
1725 |
* @return <code>ResultSet</code> - each row is a column privilege description
|
|
1726 |
* @exception SQLException if a database access error occurs
|
|
1727 |
* @see #getSearchStringEscape
|
|
1728 |
*/
|
|
1729 |
ResultSet getColumnPrivileges(String catalog, String schema,
|
|
1730 |
String table, String columnNamePattern) throws SQLException;
|
|
1731 |
|
|
1732 |
/**
|
|
1733 |
* Retrieves a description of the access rights for each table available
|
|
1734 |
* in a catalog. Note that a table privilege applies to one or
|
|
1735 |
* more columns in the table. It would be wrong to assume that
|
|
1736 |
* this privilege applies to all columns (this may be true for
|
|
1737 |
* some systems but is not true for all.)
|
|
1738 |
*
|
|
1739 |
* <P>Only privileges matching the schema and table name
|
|
1740 |
* criteria are returned. They are ordered by
|
|
1741 |
* <code>TABLE_CAT</code>,
|
|
1742 |
* <code>TABLE_SCHEM</code>, <code>TABLE_NAME</code>,
|
|
1743 |
* and <code>PRIVILEGE</code>.
|
|
1744 |
*
|
|
1745 |
* <P>Each privilige description has the following columns:
|
|
1746 |
* <OL>
|
|
1747 |
* <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
|
|
1748 |
* <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
|
|
1749 |
* <LI><B>TABLE_NAME</B> String => table name
|
|
1750 |
* <LI><B>GRANTOR</B> String => grantor of access (may be <code>null</code>)
|
|
1751 |
* <LI><B>GRANTEE</B> String => grantee of access
|
|
1752 |
* <LI><B>PRIVILEGE</B> String => name of access (SELECT,
|
|
1753 |
* INSERT, UPDATE, REFRENCES, ...)
|
|
1754 |
* <LI><B>IS_GRANTABLE</B> String => "YES" if grantee is permitted
|
|
1755 |
* to grant to others; "NO" if not; <code>null</code> if unknown
|
|
1756 |
* </OL>
|
|
1757 |
*
|
|
1758 |
* @param catalog a catalog name; must match the catalog name as it
|
|
1759 |
* is stored in the database; "" retrieves those without a catalog;
|
|
1760 |
* <code>null</code> means that the catalog name should not be used to narrow
|
|
1761 |
* the search
|
|
1762 |
* @param schemaPattern a schema name pattern; must match the schema name
|
|
1763 |
* as it is stored in the database; "" retrieves those without a schema;
|
|
1764 |
* <code>null</code> means that the schema name should not be used to narrow
|
|
1765 |
* the search
|
|
1766 |
* @param tableNamePattern a table name pattern; must match the
|
|
1767 |
* table name as it is stored in the database
|
|
1768 |
* @return <code>ResultSet</code> - each row is a table privilege description
|
|
1769 |
* @exception SQLException if a database access error occurs
|
|
1770 |
* @see #getSearchStringEscape
|
|
1771 |
*/
|
|
1772 |
ResultSet getTablePrivileges(String catalog, String schemaPattern,
|
|
1773 |
String tableNamePattern) throws SQLException;
|
|
1774 |
|
|
1775 |
/**
|
|
1776 |
* Retrieves a description of a table's optimal set of columns that
|
|
1777 |
* uniquely identifies a row. They are ordered by SCOPE.
|
|
1778 |
*
|
|
1779 |
* <P>Each column description has the following columns:
|
|
1780 |
* <OL>
|
|
1781 |
* <LI><B>SCOPE</B> short => actual scope of result
|
|
1782 |
* <UL>
|
|
1783 |
* <LI> bestRowTemporary - very temporary, while using row
|
|
1784 |
* <LI> bestRowTransaction - valid for remainder of current transaction
|
|
1785 |
* <LI> bestRowSession - valid for remainder of current session
|
|
1786 |
* </UL>
|
|
1787 |
* <LI><B>COLUMN_NAME</B> String => column name
|
|
1788 |
* <LI><B>DATA_TYPE</B> int => SQL data type from java.sql.Types
|
|
1789 |
* <LI><B>TYPE_NAME</B> String => Data source dependent type name,
|
|
1790 |
* for a UDT the type name is fully qualified
|
|
1791 |
* <LI><B>COLUMN_SIZE</B> int => precision
|
|
1792 |
* <LI><B>BUFFER_LENGTH</B> int => not used
|
|
1793 |
* <LI><B>DECIMAL_DIGITS</B> short => scale - Null is returned for data types where
|
|
1794 |
* DECIMAL_DIGITS is not applicable.
|
|
1795 |
* <LI><B>PSEUDO_COLUMN</B> short => is this a pseudo column
|
|
1796 |
* like an Oracle ROWID
|
|
1797 |
* <UL>
|
|
1798 |
* <LI> bestRowUnknown - may or may not be pseudo column
|
|
1799 |
* <LI> bestRowNotPseudo - is NOT a pseudo column
|
|
1800 |
* <LI> bestRowPseudo - is a pseudo column
|
|
1801 |
* </UL>
|
|
1802 |
* </OL>
|
|
1803 |
*
|
|
1804 |
* <p>The COLUMN_SIZE column represents the specified column size for the given column.
|
|
1805 |
* For numeric data, this is the maximum precision. For character data, this is the length in characters.
|
|
1806 |
* For datetime datatypes, this is the length in characters of the String representation (assuming the
|
|
1807 |
* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,
|
|
1808 |
* this is the length in bytes. Null is returned for data types where the
|
|
1809 |
* column size is not applicable.
|
|
1810 |
*
|
|
1811 |
* @param catalog a catalog name; must match the catalog name as it
|
|
1812 |
* is stored in the database; "" retrieves those without a catalog;
|
|
1813 |
* <code>null</code> means that the catalog name should not be used to narrow
|
|
1814 |
* the search
|
|
1815 |
* @param schema a schema name; must match the schema name
|
|
1816 |
* as it is stored in the database; "" retrieves those without a schema;
|
|
1817 |
* <code>null</code> means that the schema name should not be used to narrow
|
|
1818 |
* the search
|
|
1819 |
* @param table a table name; must match the table name as it is stored
|
|
1820 |
* in the database
|
|
1821 |
* @param scope the scope of interest; use same values as SCOPE
|
|
1822 |
* @param nullable include columns that are nullable.
|
|
1823 |
* @return <code>ResultSet</code> - each row is a column description
|
|
1824 |
* @exception SQLException if a database access error occurs
|
|
1825 |
*/
|
|
1826 |
ResultSet getBestRowIdentifier(String catalog, String schema,
|
|
1827 |
String table, int scope, boolean nullable) throws SQLException;
|
|
1828 |
|
|
1829 |
/**
|
|
1830 |
* Indicates that the scope of the best row identifier is
|
|
1831 |
* very temporary, lasting only while the
|
|
1832 |
* row is being used.
|
|
1833 |
* <P>
|
|
1834 |
* A possible value for the column
|
|
1835 |
* <code>SCOPE</code>
|
|
1836 |
* in the <code>ResultSet</code> object
|
|
1837 |
* returned by the method <code>getBestRowIdentifier</code>.
|
|
1838 |
*/
|
|
1839 |
int bestRowTemporary = 0;
|
|
1840 |
|
|
1841 |
/**
|
|
1842 |
* Indicates that the scope of the best row identifier is
|
|
1843 |
* the remainder of the current transaction.
|
|
1844 |
* <P>
|
|
1845 |
* A possible value for the column
|
|
1846 |
* <code>SCOPE</code>
|
|
1847 |
* in the <code>ResultSet</code> object
|
|
1848 |
* returned by the method <code>getBestRowIdentifier</code>.
|
|
1849 |
*/
|
|
1850 |
int bestRowTransaction = 1;
|
|
1851 |
|
|
1852 |
/**
|
|
1853 |
* Indicates that the scope of the best row identifier is
|
|
1854 |
* the remainder of the current session.
|
|
1855 |
* <P>
|
|
1856 |
* A possible value for the column
|
|
1857 |
* <code>SCOPE</code>
|
|
1858 |
* in the <code>ResultSet</code> object
|
|
1859 |
* returned by the method <code>getBestRowIdentifier</code>.
|
|
1860 |
*/
|
|
1861 |
int bestRowSession = 2;
|
|
1862 |
|
|
1863 |
/**
|
|
1864 |
* Indicates that the best row identifier may or may not be a pseudo column.
|
|
1865 |
* <P>
|
|
1866 |
* A possible value for the column
|
|
1867 |
* <code>PSEUDO_COLUMN</code>
|
|
1868 |
* in the <code>ResultSet</code> object
|
|
1869 |
* returned by the method <code>getBestRowIdentifier</code>.
|
|
1870 |
*/
|
|
1871 |
int bestRowUnknown = 0;
|
|
1872 |
|
|
1873 |
/**
|
|
1874 |
* Indicates that the best row identifier is NOT a pseudo column.
|
|
1875 |
* <P>
|
|
1876 |
* A possible value for the column
|
|
1877 |
* <code>PSEUDO_COLUMN</code>
|
|
1878 |
* in the <code>ResultSet</code> object
|
|
1879 |
* returned by the method <code>getBestRowIdentifier</code>.
|
|
1880 |
*/
|
|
1881 |
int bestRowNotPseudo = 1;
|
|
1882 |
|
|
1883 |
/**
|
|
1884 |
* Indicates that the best row identifier is a pseudo column.
|
|
1885 |
* <P>
|
|
1886 |
* A possible value for the column
|
|
1887 |
* <code>PSEUDO_COLUMN</code>
|
|
1888 |
* in the <code>ResultSet</code> object
|
|
1889 |
* returned by the method <code>getBestRowIdentifier</code>.
|
|
1890 |
*/
|
|
1891 |
int bestRowPseudo = 2;
|
|
1892 |
|
|
1893 |
/**
|
|
1894 |
* Retrieves a description of a table's columns that are automatically
|
|
1895 |
* updated when any value in a row is updated. They are
|
|
1896 |
* unordered.
|
|
1897 |
*
|
|
1898 |
* <P>Each column description has the following columns:
|
|
1899 |
* <OL>
|
|
1900 |
* <LI><B>SCOPE</B> short => is not used
|
|
1901 |
* <LI><B>COLUMN_NAME</B> String => column name
|
|
1902 |
* <LI><B>DATA_TYPE</B> int => SQL data type from <code>java.sql.Types</code>
|
|
1903 |
* <LI><B>TYPE_NAME</B> String => Data source-dependent type name
|
|
1904 |
* <LI><B>COLUMN_SIZE</B> int => precision
|
|
1905 |
* <LI><B>BUFFER_LENGTH</B> int => length of column value in bytes
|
|
1906 |
* <LI><B>DECIMAL_DIGITS</B> short => scale - Null is returned for data types where
|
|
1907 |
* DECIMAL_DIGITS is not applicable.
|
|
1908 |
* <LI><B>PSEUDO_COLUMN</B> short => whether this is pseudo column
|
|
1909 |
* like an Oracle ROWID
|
|
1910 |
* <UL>
|
|
1911 |
* <LI> versionColumnUnknown - may or may not be pseudo column
|
|
1912 |
* <LI> versionColumnNotPseudo - is NOT a pseudo column
|
|
1913 |
* <LI> versionColumnPseudo - is a pseudo column
|
|
1914 |
* </UL>
|
|
1915 |
* </OL>
|
|
1916 |
*
|
|
1917 |
* <p>The COLUMN_SIZE column represents the specified column size for the given column.
|
|
1918 |
* For numeric data, this is the maximum precision. For character data, this is the length in characters.
|
|
1919 |
* For datetime datatypes, this is the length in characters of the String representation (assuming the
|
|
1920 |
* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,
|
|
1921 |
* this is the length in bytes. Null is returned for data types where the
|
|
1922 |
* column size is not applicable.
|
|
1923 |
* @param catalog a catalog name; must match the catalog name as it
|
|
1924 |
* is stored in the database; "" retrieves those without a catalog;
|
|
1925 |
* <code>null</code> means that the catalog name should not be used to narrow
|
|
1926 |
* the search
|
|
1927 |
* @param schema a schema name; must match the schema name
|
|
1928 |
* as it is stored in the database; "" retrieves those without a schema;
|
|
1929 |
* <code>null</code> means that the schema name should not be used to narrow
|
|
1930 |
* the search
|
|
1931 |
* @param table a table name; must match the table name as it is stored
|
|
1932 |
* in the database
|
|
1933 |
* @return a <code>ResultSet</code> object in which each row is a
|
|
1934 |
* column description
|
|
1935 |
* @exception SQLException if a database access error occurs
|
|
1936 |
*/
|
|
1937 |
ResultSet getVersionColumns(String catalog, String schema,
|
|
1938 |
String table) throws SQLException;
|
|
1939 |
|
|
1940 |
/**
|
|
1941 |
* Indicates that this version column may or may not be a pseudo column.
|
|
1942 |
* <P>
|
|
1943 |
* A possible value for the column
|
|
1944 |
* <code>PSEUDO_COLUMN</code>
|
|
1945 |
* in the <code>ResultSet</code> object
|
|
1946 |
* returned by the method <code>getVersionColumns</code>.
|
|
1947 |
*/
|
|
1948 |
int versionColumnUnknown = 0;
|
|
1949 |
|
|
1950 |
/**
|
|
1951 |
* Indicates that this version column is NOT a pseudo column.
|
|
1952 |
* <P>
|
|
1953 |
* A possible value for the column
|
|
1954 |
* <code>PSEUDO_COLUMN</code>
|
|
1955 |
* in the <code>ResultSet</code> object
|
|
1956 |
* returned by the method <code>getVersionColumns</code>.
|
|
1957 |
*/
|
|
1958 |
int versionColumnNotPseudo = 1;
|
|
1959 |
|
|
1960 |
/**
|
|
1961 |
* Indicates that this version column is a pseudo column.
|
|
1962 |
* <P>
|
|
1963 |
* A possible value for the column
|
|
1964 |
* <code>PSEUDO_COLUMN</code>
|
|
1965 |
* in the <code>ResultSet</code> object
|
|
1966 |
* returned by the method <code>getVersionColumns</code>.
|
|
1967 |
*/
|
|
1968 |
int versionColumnPseudo = 2;
|
|
1969 |
|
|
1970 |
/**
|
|
1971 |
* Retrieves a description of the given table's primary key columns. They
|
|
1972 |
* are ordered by COLUMN_NAME.
|
|
1973 |
*
|
|
1974 |
* <P>Each primary key column description has the following columns:
|
|
1975 |
* <OL>
|
|
1976 |
* <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
|
|
1977 |
* <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
|
|
1978 |
* <LI><B>TABLE_NAME</B> String => table name
|
|
1979 |
* <LI><B>COLUMN_NAME</B> String => column name
|
|
1980 |
* <LI><B>KEY_SEQ</B> short => sequence number within primary key( a value
|
|
1981 |
* of 1 represents the first column of the primary key, a value of 2 would
|
|
1982 |
* represent the second column within the primary key).
|
|
1983 |
* <LI><B>PK_NAME</B> String => primary key name (may be <code>null</code>)
|
|
1984 |
* </OL>
|
|
1985 |
*
|
|
1986 |
* @param catalog a catalog name; must match the catalog name as it
|
|
1987 |
* is stored in the database; "" retrieves those without a catalog;
|
|
1988 |
* <code>null</code> means that the catalog name should not be used to narrow
|
|
1989 |
* the search
|
|
1990 |
* @param schema a schema name; must match the schema name
|
|
1991 |
* as it is stored in the database; "" retrieves those without a schema;
|
|
1992 |
* <code>null</code> means that the schema name should not be used to narrow
|
|
1993 |
* the search
|
|
1994 |
* @param table a table name; must match the table name as it is stored
|
|
1995 |
* in the database
|
|
1996 |
* @return <code>ResultSet</code> - each row is a primary key column description
|
|
1997 |
* @exception SQLException if a database access error occurs
|
|
1998 |
*/
|
|
1999 |
ResultSet getPrimaryKeys(String catalog, String schema,
|
|
2000 |
String table) throws SQLException;
|
|
2001 |
|
|
2002 |
/**
|
|
2003 |
* Retrieves a description of the primary key columns that are
|
|
2004 |
* referenced by the given table's foreign key columns (the primary keys
|
|
2005 |
* imported by a table). They are ordered by PKTABLE_CAT,
|
|
2006 |
* PKTABLE_SCHEM, PKTABLE_NAME, and KEY_SEQ.
|
|
2007 |
*
|
|
2008 |
* <P>Each primary key column description has the following columns:
|
|
2009 |
* <OL>
|
|
2010 |
* <LI><B>PKTABLE_CAT</B> String => primary key table catalog
|
|
2011 |
* being imported (may be <code>null</code>)
|
|
2012 |
* <LI><B>PKTABLE_SCHEM</B> String => primary key table schema
|
|
2013 |
* being imported (may be <code>null</code>)
|
|
2014 |
* <LI><B>PKTABLE_NAME</B> String => primary key table name
|
|
2015 |
* being imported
|
|
2016 |
* <LI><B>PKCOLUMN_NAME</B> String => primary key column name
|
|
2017 |
* being imported
|
|
2018 |
* <LI><B>FKTABLE_CAT</B> String => foreign key table catalog (may be <code>null</code>)
|
|
2019 |
* <LI><B>FKTABLE_SCHEM</B> String => foreign key table schema (may be <code>null</code>)
|
|
2020 |
* <LI><B>FKTABLE_NAME</B> String => foreign key table name
|
|
2021 |
* <LI><B>FKCOLUMN_NAME</B> String => foreign key column name
|
|
2022 |
* <LI><B>KEY_SEQ</B> short => sequence number within a foreign key( a value
|
|
2023 |
* of 1 represents the first column of the foreign key, a value of 2 would
|
|
2024 |
* represent the second column within the foreign key).
|
|
2025 |
* <LI><B>UPDATE_RULE</B> short => What happens to a
|
|
2026 |
* foreign key when the primary key is updated:
|
|
2027 |
* <UL>
|
|
2028 |
* <LI> importedNoAction - do not allow update of primary
|
|
2029 |
* key if it has been imported
|
|
2030 |
* <LI> importedKeyCascade - change imported key to agree
|
|
2031 |
* with primary key update
|
|
2032 |
* <LI> importedKeySetNull - change imported key to <code>NULL</code>
|
|
2033 |
* if its primary key has been updated
|
|
2034 |
* <LI> importedKeySetDefault - change imported key to default values
|
|
2035 |
* if its primary key has been updated
|
|
2036 |
* <LI> importedKeyRestrict - same as importedKeyNoAction
|
|
2037 |
* (for ODBC 2.x compatibility)
|
|
2038 |
* </UL>
|
|
2039 |
* <LI><B>DELETE_RULE</B> short => What happens to
|
|
2040 |
* the foreign key when primary is deleted.
|
|
2041 |
* <UL>
|
|
2042 |
* <LI> importedKeyNoAction - do not allow delete of primary
|
|
2043 |
* key if it has been imported
|
|
2044 |
* <LI> importedKeyCascade - delete rows that import a deleted key
|
|
2045 |
* <LI> importedKeySetNull - change imported key to NULL if
|
|
2046 |
* its primary key has been deleted
|
|
2047 |
* <LI> importedKeyRestrict - same as importedKeyNoAction
|
|
2048 |
* (for ODBC 2.x compatibility)
|
|
2049 |
* <LI> importedKeySetDefault - change imported key to default if
|
|
2050 |
* its primary key has been deleted
|
|
2051 |
* </UL>
|
|
2052 |
* <LI><B>FK_NAME</B> String => foreign key name (may be <code>null</code>)
|
|
2053 |
* <LI><B>PK_NAME</B> String => primary key name (may be <code>null</code>)
|
|
2054 |
* <LI><B>DEFERRABILITY</B> short => can the evaluation of foreign key
|
|
2055 |
* constraints be deferred until commit
|
|
2056 |
* <UL>
|
|
2057 |
* <LI> importedKeyInitiallyDeferred - see SQL92 for definition
|
|
2058 |
* <LI> importedKeyInitiallyImmediate - see SQL92 for definition
|
|
2059 |
* <LI> importedKeyNotDeferrable - see SQL92 for definition
|
|
2060 |
* </UL>
|
|
2061 |
* </OL>
|
|
2062 |
*
|
|
2063 |
* @param catalog a catalog name; must match the catalog name as it
|
|
2064 |
* is stored in the database; "" retrieves those without a catalog;
|
|
2065 |
* <code>null</code> means that the catalog name should not be used to narrow
|
|
2066 |
* the search
|
|
2067 |
* @param schema a schema name; must match the schema name
|
|
2068 |
* as it is stored in the database; "" retrieves those without a schema;
|
|
2069 |
* <code>null</code> means that the schema name should not be used to narrow
|
|
2070 |
* the search
|
|
2071 |
* @param table a table name; must match the table name as it is stored
|
|
2072 |
* in the database
|
|
2073 |
* @return <code>ResultSet</code> - each row is a primary key column description
|
|
2074 |
* @exception SQLException if a database access error occurs
|
|
2075 |
* @see #getExportedKeys
|
|
2076 |
*/
|
|
2077 |
ResultSet getImportedKeys(String catalog, String schema,
|
|
2078 |
String table) throws SQLException;
|
|
2079 |
|
|
2080 |
/**
|
|
2081 |
* For the column <code>UPDATE_RULE</code>,
|
|
2082 |
* indicates that
|
|
2083 |
* when the primary key is updated, the foreign key (imported key)
|
|
2084 |
* is changed to agree with it.
|
|
2085 |
* For the column <code>DELETE_RULE</code>,
|
|
2086 |
* it indicates that
|
|
2087 |
* when the primary key is deleted, rows that imported that key
|
|
2088 |
* are deleted.
|
|
2089 |
* <P>
|
|
2090 |
* A possible value for the columns <code>UPDATE_RULE</code>
|
|
2091 |
* and <code>DELETE_RULE</code> in the
|
|
2092 |
* <code>ResultSet</code> objects returned by the methods
|
|
2093 |
* <code>getImportedKeys</code>, <code>getExportedKeys</code>,
|
|
2094 |
* and <code>getCrossReference</code>.
|
|
2095 |
*/
|
|
2096 |
int importedKeyCascade = 0;
|
|
2097 |
|
|
2098 |
/**
|
|
2099 |
* For the column <code>UPDATE_RULE</code>, indicates that
|
|
2100 |
* a primary key may not be updated if it has been imported by
|
|
2101 |
* another table as a foreign key.
|
|
2102 |
* For the column <code>DELETE_RULE</code>, indicates that
|
|
2103 |
* a primary key may not be deleted if it has been imported by
|
|
2104 |
* another table as a foreign key.
|
|
2105 |
* <P>
|
|
2106 |
* A possible value for the columns <code>UPDATE_RULE</code>
|
|
2107 |
* and <code>DELETE_RULE</code> in the
|
|
2108 |
* <code>ResultSet</code> objects returned by the methods
|
|
2109 |
* <code>getImportedKeys</code>, <code>getExportedKeys</code>,
|
|
2110 |
* and <code>getCrossReference</code>.
|
|
2111 |
*/
|
|
2112 |
int importedKeyRestrict = 1;
|
|
2113 |
|
|
2114 |
/**
|
|
2115 |
* For the columns <code>UPDATE_RULE</code>
|
|
2116 |
* and <code>DELETE_RULE</code>, indicates that
|
|
2117 |
* when the primary key is updated or deleted, the foreign key (imported key)
|
|
2118 |
* is changed to <code>NULL</code>.
|
|
2119 |
* <P>
|
|
2120 |
* A possible value for the columns <code>UPDATE_RULE</code>
|
|
2121 |
* and <code>DELETE_RULE</code> in the
|
|
2122 |
* <code>ResultSet</code> objects returned by the methods
|
|
2123 |
* <code>getImportedKeys</code>, <code>getExportedKeys</code>,
|
|
2124 |
* and <code>getCrossReference</code>.
|
|
2125 |
*/
|
|
2126 |
int importedKeySetNull = 2;
|
|
2127 |
|
|
2128 |
/**
|
|
2129 |
* For the columns <code>UPDATE_RULE</code>
|
|
2130 |
* and <code>DELETE_RULE</code>, indicates that
|
|
2131 |
* if the primary key has been imported, it cannot be updated or deleted.
|
|
2132 |
* <P>
|
|
2133 |
* A possible value for the columns <code>UPDATE_RULE</code>
|
|
2134 |
* and <code>DELETE_RULE</code> in the
|
|
2135 |
* <code>ResultSet</code> objects returned by the methods
|
|
2136 |
* <code>getImportedKeys</code>, <code>getExportedKeys</code>,
|
|
2137 |
* and <code>getCrossReference</code>.
|
|
2138 |
*/
|
|
2139 |
int importedKeyNoAction = 3;
|
|
2140 |
|
|
2141 |
/**
|
|
2142 |
* For the columns <code>UPDATE_RULE</code>
|
|
2143 |
* and <code>DELETE_RULE</code>, indicates that
|
|
2144 |
* if the primary key is updated or deleted, the foreign key (imported key)
|
|
2145 |
* is set to the default value.
|
|
2146 |
* <P>
|
|
2147 |
* A possible value for the columns <code>UPDATE_RULE</code>
|
|
2148 |
* and <code>DELETE_RULE</code> in the
|
|
2149 |
* <code>ResultSet</code> objects returned by the methods
|
|
2150 |
* <code>getImportedKeys</code>, <code>getExportedKeys</code>,
|
|
2151 |
* and <code>getCrossReference</code>.
|
|
2152 |
*/
|
|
2153 |
int importedKeySetDefault = 4;
|
|
2154 |
|
|
2155 |
/**
|
|
2156 |
* Indicates deferrability. See SQL-92 for a definition.
|
|
2157 |
* <P>
|
|
2158 |
* A possible value for the column <code>DEFERRABILITY</code>
|
|
2159 |
* in the <code>ResultSet</code> objects returned by the methods
|
|
2160 |
* <code>getImportedKeys</code>, <code>getExportedKeys</code>,
|
|
2161 |
* and <code>getCrossReference</code>.
|
|
2162 |
*/
|
|
2163 |
int importedKeyInitiallyDeferred = 5;
|
|
2164 |
|
|
2165 |
/**
|
|
2166 |
* Indicates deferrability. See SQL-92 for a definition.
|
|
2167 |
* <P>
|
|
2168 |
* A possible value for the column <code>DEFERRABILITY</code>
|
|
2169 |
* in the <code>ResultSet</code> objects returned by the methods
|
|
2170 |
* <code>getImportedKeys</code>, <code>getExportedKeys</code>,
|
|
2171 |
* and <code>getCrossReference</code>.
|
|
2172 |
*/
|
|
2173 |
int importedKeyInitiallyImmediate = 6;
|
|
2174 |
|
|
2175 |
/**
|
|
2176 |
* Indicates deferrability. See SQL-92 for a definition.
|
|
2177 |
* <P>
|
|
2178 |
* A possible value for the column <code>DEFERRABILITY</code>
|
|
2179 |
* in the <code>ResultSet</code> objects returned by the methods
|
|
2180 |
* <code>getImportedKeys</code>, <code>getExportedKeys</code>,
|
|
2181 |
* and <code>getCrossReference</code>.
|
|
2182 |
*/
|
|
2183 |
int importedKeyNotDeferrable = 7;
|
|
2184 |
|
|
2185 |
/**
|
|
2186 |
* Retrieves a description of the foreign key columns that reference the
|
|
2187 |
* given table's primary key columns (the foreign keys exported by a
|
|
2188 |
* table). They are ordered by FKTABLE_CAT, FKTABLE_SCHEM,
|
|
2189 |
* FKTABLE_NAME, and KEY_SEQ.
|
|
2190 |
*
|
|
2191 |
* <P>Each foreign key column description has the following columns:
|
|
2192 |
* <OL>
|
|
2193 |
* <LI><B>PKTABLE_CAT</B> String => primary key table catalog (may be <code>null</code>)
|
|
2194 |
* <LI><B>PKTABLE_SCHEM</B> String => primary key table schema (may be <code>null</code>)
|
|
2195 |
* <LI><B>PKTABLE_NAME</B> String => primary key table name
|
|
2196 |
* <LI><B>PKCOLUMN_NAME</B> String => primary key column name
|
|
2197 |
* <LI><B>FKTABLE_CAT</B> String => foreign key table catalog (may be <code>null</code>)
|
|
2198 |
* being exported (may be <code>null</code>)
|
|
2199 |
* <LI><B>FKTABLE_SCHEM</B> String => foreign key table schema (may be <code>null</code>)
|
|
2200 |
* being exported (may be <code>null</code>)
|
|
2201 |
* <LI><B>FKTABLE_NAME</B> String => foreign key table name
|
|
2202 |
* being exported
|
|
2203 |
* <LI><B>FKCOLUMN_NAME</B> String => foreign key column name
|
|
2204 |
* being exported
|
|
2205 |
* <LI><B>KEY_SEQ</B> short => sequence number within foreign key( a value
|
|
2206 |
* of 1 represents the first column of the foreign key, a value of 2 would
|
|
2207 |
* represent the second column within the foreign key).
|
|
2208 |
* <LI><B>UPDATE_RULE</B> short => What happens to
|
|
2209 |
* foreign key when primary is updated:
|
|
2210 |
* <UL>
|
|
2211 |
* <LI> importedNoAction - do not allow update of primary
|
|
2212 |
* key if it has been imported
|
|
2213 |
* <LI> importedKeyCascade - change imported key to agree
|
|
2214 |
* with primary key update
|
|
2215 |
* <LI> importedKeySetNull - change imported key to <code>NULL</code> if
|
|
2216 |
* its primary key has been updated
|
|
2217 |
* <LI> importedKeySetDefault - change imported key to default values
|
|
2218 |
* if its primary key has been updated
|
|
2219 |
* <LI> importedKeyRestrict - same as importedKeyNoAction
|
|
2220 |
* (for ODBC 2.x compatibility)
|
|
2221 |
* </UL>
|
|
2222 |
* <LI><B>DELETE_RULE</B> short => What happens to
|
|
2223 |
* the foreign key when primary is deleted.
|
|
2224 |
* <UL>
|
|
2225 |
* <LI> importedKeyNoAction - do not allow delete of primary
|
|
2226 |
* key if it has been imported
|
|
2227 |
* <LI> importedKeyCascade - delete rows that import a deleted key
|
|
2228 |
* <LI> importedKeySetNull - change imported key to <code>NULL</code> if
|
|
2229 |
* its primary key has been deleted
|
|
2230 |
* <LI> importedKeyRestrict - same as importedKeyNoAction
|
|
2231 |
* (for ODBC 2.x compatibility)
|
|
2232 |
* <LI> importedKeySetDefault - change imported key to default if
|
|
2233 |
* its primary key has been deleted
|
|
2234 |
* </UL>
|
|
2235 |
* <LI><B>FK_NAME</B> String => foreign key name (may be <code>null</code>)
|
|
2236 |
* <LI><B>PK_NAME</B> String => primary key name (may be <code>null</code>)
|
|
2237 |
* <LI><B>DEFERRABILITY</B> short => can the evaluation of foreign key
|
|
2238 |
* constraints be deferred until commit
|
|
2239 |
* <UL>
|
|
2240 |
* <LI> importedKeyInitiallyDeferred - see SQL92 for definition
|
|
2241 |
* <LI> importedKeyInitiallyImmediate - see SQL92 for definition
|
|
2242 |
* <LI> importedKeyNotDeferrable - see SQL92 for definition
|
|
2243 |
* </UL>
|
|
2244 |
* </OL>
|
|
2245 |
*
|
|
2246 |
* @param catalog a catalog name; must match the catalog name as it
|
|
2247 |
* is stored in this database; "" retrieves those without a catalog;
|
|
2248 |
* <code>null</code> means that the catalog name should not be used to narrow
|
|
2249 |
* the search
|
|
2250 |
* @param schema a schema name; must match the schema name
|
|
2251 |
* as it is stored in the database; "" retrieves those without a schema;
|
|
2252 |
* <code>null</code> means that the schema name should not be used to narrow
|
|
2253 |
* the search
|
|
2254 |
* @param table a table name; must match the table name as it is stored
|
|
2255 |
* in this database
|
|
2256 |
* @return a <code>ResultSet</code> object in which each row is a
|
|
2257 |
* foreign key column description
|
|
2258 |
* @exception SQLException if a database access error occurs
|
|
2259 |
* @see #getImportedKeys
|
|
2260 |
*/
|
|
2261 |
ResultSet getExportedKeys(String catalog, String schema,
|
|
2262 |
String table) throws SQLException;
|
|
2263 |
|
|
2264 |
/**
|
|
2265 |
* Retrieves a description of the foreign key columns in the given foreign key
|
|
2266 |
* table that reference the primary key or the columns representing a unique constraint of the parent table (could be the same or a different table).
|
|
2267 |
* The number of columns returned from the parent table must match the number of
|
|
2268 |
* columns that make up the foreign key. They
|
|
2269 |
* are ordered by FKTABLE_CAT, FKTABLE_SCHEM, FKTABLE_NAME, and
|
|
2270 |
* KEY_SEQ.
|
|
2271 |
*
|
|
2272 |
* <P>Each foreign key column description has the following columns:
|
|
2273 |
* <OL>
|
|
2274 |
* <LI><B>PKTABLE_CAT</B> String => parent key table catalog (may be <code>null</code>)
|
|
2275 |
* <LI><B>PKTABLE_SCHEM</B> String => parent key table schema (may be <code>null</code>)
|
|
2276 |
* <LI><B>PKTABLE_NAME</B> String => parent key table name
|
|
2277 |
* <LI><B>PKCOLUMN_NAME</B> String => parent key column name
|
|
2278 |
* <LI><B>FKTABLE_CAT</B> String => foreign key table catalog (may be <code>null</code>)
|
|
2279 |
* being exported (may be <code>null</code>)
|
|
2280 |
* <LI><B>FKTABLE_SCHEM</B> String => foreign key table schema (may be <code>null</code>)
|
|
2281 |
* being exported (may be <code>null</code>)
|
|
2282 |
* <LI><B>FKTABLE_NAME</B> String => foreign key table name
|
|
2283 |
* being exported
|
|
2284 |
* <LI><B>FKCOLUMN_NAME</B> String => foreign key column name
|
|
2285 |
* being exported
|
|
2286 |
* <LI><B>KEY_SEQ</B> short => sequence number within foreign key( a value
|
|
2287 |
* of 1 represents the first column of the foreign key, a value of 2 would
|
|
2288 |
* represent the second column within the foreign key).
|
|
2289 |
* <LI><B>UPDATE_RULE</B> short => What happens to
|
|
2290 |
* foreign key when parent key is updated:
|
|
2291 |
* <UL>
|
|
2292 |
* <LI> importedNoAction - do not allow update of parent
|
|
2293 |
* key if it has been imported
|
|
2294 |
* <LI> importedKeyCascade - change imported key to agree
|
|
2295 |
* with parent key update
|
|
2296 |
* <LI> importedKeySetNull - change imported key to <code>NULL</code> if
|
|
2297 |
* its parent key has been updated
|
|
2298 |
* <LI> importedKeySetDefault - change imported key to default values
|
|
2299 |
* if its parent key has been updated
|
|
2300 |
* <LI> importedKeyRestrict - same as importedKeyNoAction
|
|
2301 |
* (for ODBC 2.x compatibility)
|
|
2302 |
* </UL>
|
|
2303 |
* <LI><B>DELETE_RULE</B> short => What happens to
|
|
2304 |
* the foreign key when parent key is deleted.
|
|
2305 |
* <UL>
|
|
2306 |
* <LI> importedKeyNoAction - do not allow delete of parent
|
|
2307 |
* key if it has been imported
|
|
2308 |
* <LI> importedKeyCascade - delete rows that import a deleted key
|
|
2309 |
* <LI> importedKeySetNull - change imported key to <code>NULL</code> if
|
|
2310 |
* its primary key has been deleted
|
|
2311 |
* <LI> importedKeyRestrict - same as importedKeyNoAction
|
|
2312 |
* (for ODBC 2.x compatibility)
|
|
2313 |
* <LI> importedKeySetDefault - change imported key to default if
|
|
2314 |
* its parent key has been deleted
|
|
2315 |
* </UL>
|
|
2316 |
* <LI><B>FK_NAME</B> String => foreign key name (may be <code>null</code>)
|
|
2317 |
* <LI><B>PK_NAME</B> String => parent key name (may be <code>null</code>)
|
|
2318 |
* <LI><B>DEFERRABILITY</B> short => can the evaluation of foreign key
|
|
2319 |
* constraints be deferred until commit
|
|
2320 |
* <UL>
|
|
2321 |
* <LI> importedKeyInitiallyDeferred - see SQL92 for definition
|
|
2322 |
* <LI> importedKeyInitiallyImmediate - see SQL92 for definition
|
|
2323 |
* <LI> importedKeyNotDeferrable - see SQL92 for definition
|
|
2324 |
* </UL>
|
|
2325 |
* </OL>
|
|
2326 |
*
|
|
2327 |
* @param parentCatalog a catalog name; must match the catalog name
|
|
2328 |
* as it is stored in the database; "" retrieves those without a
|
|
2329 |
* catalog; <code>null</code> means drop catalog name from the selection criteria
|
|
2330 |
* @param parentSchema a schema name; must match the schema name as
|
|
2331 |
* it is stored in the database; "" retrieves those without a schema;
|
|
2332 |
* <code>null</code> means drop schema name from the selection criteria
|
|
2333 |
* @param parentTable the name of the table that exports the key; must match
|
|
2334 |
* the table name as it is stored in the database
|
|
2335 |
* @param foreignCatalog a catalog name; must match the catalog name as
|
|
2336 |
* it is stored in the database; "" retrieves those without a
|
|
2337 |
* catalog; <code>null</code> means drop catalog name from the selection criteria
|
|
2338 |
* @param foreignSchema a schema name; must match the schema name as it
|
|
2339 |
* is stored in the database; "" retrieves those without a schema;
|
|
2340 |
* <code>null</code> means drop schema name from the selection criteria
|
|
2341 |
* @param foreignTable the name of the table that imports the key; must match
|
|
2342 |
* the table name as it is stored in the database
|
|
2343 |
* @return <code>ResultSet</code> - each row is a foreign key column description
|
|
2344 |
* @exception SQLException if a database access error occurs
|
|
2345 |
* @see #getImportedKeys
|
|
2346 |
*/
|
|
2347 |
ResultSet getCrossReference(
|
|
2348 |
String parentCatalog, String parentSchema, String parentTable,
|
|
2349 |
String foreignCatalog, String foreignSchema, String foreignTable
|
|
2350 |
) throws SQLException;
|
|
2351 |
|
|
2352 |
/**
|
|
2353 |
* Retrieves a description of all the data types supported by
|
|
2354 |
* this database. They are ordered by DATA_TYPE and then by how
|
|
2355 |
* closely the data type maps to the corresponding JDBC SQL type.
|
|
2356 |
*
|
|
2357 |
* <P>If the database supports SQL distinct types, then getTypeInfo() will return
|
|
2358 |
* a single row with a TYPE_NAME of DISTINCT and a DATA_TYPE of Types.DISTINCT.
|
|
2359 |
* If the database supports SQL structured types, then getTypeInfo() will return
|
|
2360 |
* a single row with a TYPE_NAME of STRUCT and a DATA_TYPE of Types.STRUCT.
|
|
2361 |
*
|
|
2362 |
* <P>If SQL distinct or structured types are supported, then information on the
|
|
2363 |
* individual types may be obtained from the getUDTs() method.
|
|
2364 |
*
|
|
2365 |
|
|
2366 |
*
|
|
2367 |
* <P>Each type description has the following columns:
|
|
2368 |
* <OL>
|
|
2369 |
* <LI><B>TYPE_NAME</B> String => Type name
|
|
2370 |
* <LI><B>DATA_TYPE</B> int => SQL data type from java.sql.Types
|
|
2371 |
* <LI><B>PRECISION</B> int => maximum precision
|
|
2372 |
* <LI><B>LITERAL_PREFIX</B> String => prefix used to quote a literal
|
|
2373 |
* (may be <code>null</code>)
|
|
2374 |
* <LI><B>LITERAL_SUFFIX</B> String => suffix used to quote a literal
|
|
2375 |
(may be <code>null</code>)
|
|
2376 |
* <LI><B>CREATE_PARAMS</B> String => parameters used in creating
|
|
2377 |
* the type (may be <code>null</code>)
|
|
2378 |
* <LI><B>NULLABLE</B> short => can you use NULL for this type.
|
|
2379 |
* <UL>
|
|
2380 |
* <LI> typeNoNulls - does not allow NULL values
|
|
2381 |
* <LI> typeNullable - allows NULL values
|
|
2382 |
* <LI> typeNullableUnknown - nullability unknown
|
|
2383 |
* </UL>
|
|
2384 |
* <LI><B>CASE_SENSITIVE</B> boolean=> is it case sensitive.
|
|
2385 |
* <LI><B>SEARCHABLE</B> short => can you use "WHERE" based on this type:
|
|
2386 |
* <UL>
|
|
2387 |
* <LI> typePredNone - No support
|
|
2388 |
* <LI> typePredChar - Only supported with WHERE .. LIKE
|
|
2389 |
* <LI> typePredBasic - Supported except for WHERE .. LIKE
|
|
2390 |
* <LI> typeSearchable - Supported for all WHERE ..
|
|
2391 |
* </UL>
|
|
2392 |
* <LI><B>UNSIGNED_ATTRIBUTE</B> boolean => is it unsigned.
|
|
2393 |
* <LI><B>FIXED_PREC_SCALE</B> boolean => can it be a money value.
|
|
2394 |
* <LI><B>AUTO_INCREMENT</B> boolean => can it be used for an
|
|
2395 |
* auto-increment value.
|
|
2396 |
* <LI><B>LOCAL_TYPE_NAME</B> String => localized version of type name
|
|
2397 |
* (may be <code>null</code>)
|
|
2398 |
* <LI><B>MINIMUM_SCALE</B> short => minimum scale supported
|
|
2399 |
* <LI><B>MAXIMUM_SCALE</B> short => maximum scale supported
|
|
2400 |
* <LI><B>SQL_DATA_TYPE</B> int => unused
|
|
2401 |
* <LI><B>SQL_DATETIME_SUB</B> int => unused
|
|
2402 |
* <LI><B>NUM_PREC_RADIX</B> int => usually 2 or 10
|
|
2403 |
* </OL>
|
|
2404 |
*
|
|
2405 |
* <p>The PRECISION column represents the maximum column size that the server supports for the given datatype.
|
|
2406 |
* For numeric data, this is the maximum precision. For character data, this is the length in characters.
|
|
2407 |
* For datetime datatypes, this is the length in characters of the String representation (assuming the
|
|
2408 |
* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,
|
|
2409 |
* this is the length in bytes. Null is returned for data types where the
|
|
2410 |
* column size is not applicable.
|
|
2411 |
*
|
|
2412 |
* @return a <code>ResultSet</code> object in which each row is an SQL
|
|
2413 |
* type description
|
|
2414 |
* @exception SQLException if a database access error occurs
|
|
2415 |
*/
|
|
2416 |
ResultSet getTypeInfo() throws SQLException;
|
|
2417 |
|
|
2418 |
/**
|
|
2419 |
* Indicates that a <code>NULL</code> value is NOT allowed for this
|
|
2420 |
* data type.
|
|
2421 |
* <P>
|
|
2422 |
* A possible value for column <code>NULLABLE</code> in the
|
|
2423 |
* <code>ResultSet</code> object returned by the method
|
|
2424 |
* <code>getTypeInfo</code>.
|
|
2425 |
*/
|
|
2426 |
int typeNoNulls = 0;
|
|
2427 |
|
|
2428 |
/**
|
|
2429 |
* Indicates that a <code>NULL</code> value is allowed for this
|
|
2430 |
* data type.
|
|
2431 |
* <P>
|
|
2432 |
* A possible value for column <code>NULLABLE</code> in the
|
|
2433 |
* <code>ResultSet</code> object returned by the method
|
|
2434 |
* <code>getTypeInfo</code>.
|
|
2435 |
*/
|
|
2436 |
int typeNullable = 1;
|
|
2437 |
|
|
2438 |
/**
|
|
2439 |
* Indicates that it is not known whether a <code>NULL</code> value
|
|
2440 |
* is allowed for this data type.
|
|
2441 |
* <P>
|
|
2442 |
* A possible value for column <code>NULLABLE</code> in the
|
|
2443 |
* <code>ResultSet</code> object returned by the method
|
|
2444 |
* <code>getTypeInfo</code>.
|
|
2445 |
*/
|
|
2446 |
int typeNullableUnknown = 2;
|
|
2447 |
|
|
2448 |
/**
|
|
2449 |
* Indicates that <code>WHERE</code> search clauses are not supported
|
|
2450 |
* for this type.
|
|
2451 |
* <P>
|
|
2452 |
* A possible value for column <code>SEARCHABLE</code> in the
|
|
2453 |
* <code>ResultSet</code> object returned by the method
|
|
2454 |
* <code>getTypeInfo</code>.
|
|
2455 |
*/
|
|
2456 |
int typePredNone = 0;
|
|
2457 |
|
|
2458 |
/**
|
|
2459 |
* Indicates that the data type
|
|
2460 |
* can be only be used in <code>WHERE</code> search clauses
|
|
2461 |
* that use <code>LIKE</code> predicates.
|
|
2462 |
* <P>
|
|
2463 |
* A possible value for column <code>SEARCHABLE</code> in the
|
|
2464 |
* <code>ResultSet</code> object returned by the method
|
|
2465 |
* <code>getTypeInfo</code>.
|
|
2466 |
*/
|
|
2467 |
int typePredChar = 1;
|
|
2468 |
|
|
2469 |
/**
|
|
2470 |
* Indicates that the data type can be only be used in <code>WHERE</code>
|
|
2471 |
* search clauses
|
|
2472 |
* that do not use <code>LIKE</code> predicates.
|
|
2473 |
* <P>
|
|
2474 |
* A possible value for column <code>SEARCHABLE</code> in the
|
|
2475 |
* <code>ResultSet</code> object returned by the method
|
|
2476 |
* <code>getTypeInfo</code>.
|
|
2477 |
*/
|
|
2478 |
int typePredBasic = 2;
|
|
2479 |
|
|
2480 |
/**
|
|
2481 |
* Indicates that all <code>WHERE</code> search clauses can be
|
|
2482 |
* based on this type.
|
|
2483 |
* <P>
|
|
2484 |
* A possible value for column <code>SEARCHABLE</code> in the
|
|
2485 |
* <code>ResultSet</code> object returned by the method
|
|
2486 |
* <code>getTypeInfo</code>.
|
|
2487 |
*/
|
|
2488 |
int typeSearchable = 3;
|
|
2489 |
|
|
2490 |
/**
|
|
2491 |
* Retrieves a description of the given table's indices and statistics. They are
|
|
2492 |
* ordered by NON_UNIQUE, TYPE, INDEX_NAME, and ORDINAL_POSITION.
|
|
2493 |
*
|
|
2494 |
* <P>Each index column description has the following columns:
|
|
2495 |
* <OL>
|
|
2496 |
* <LI><B>TABLE_CAT</B> String => table catalog (may be <code>null</code>)
|
|
2497 |
* <LI><B>TABLE_SCHEM</B> String => table schema (may be <code>null</code>)
|
|
2498 |
* <LI><B>TABLE_NAME</B> String => table name
|
|
2499 |
* <LI><B>NON_UNIQUE</B> boolean => Can index values be non-unique.
|
|
2500 |
* false when TYPE is tableIndexStatistic
|
|
2501 |
* <LI><B>INDEX_QUALIFIER</B> String => index catalog (may be <code>null</code>);
|
|
2502 |
* <code>null</code> when TYPE is tableIndexStatistic
|
|
2503 |
* <LI><B>INDEX_NAME</B> String => index name; <code>null</code> when TYPE is
|
|
2504 |
* tableIndexStatistic
|
|
2505 |
* <LI><B>TYPE</B> short => index type:
|
|
2506 |
* <UL>
|
|
2507 |
* <LI> tableIndexStatistic - this identifies table statistics that are
|
|
2508 |
* returned in conjuction with a table's index descriptions
|
|
2509 |
* <LI> tableIndexClustered - this is a clustered index
|
|
2510 |
* <LI> tableIndexHashed - this is a hashed index
|
|
2511 |
* <LI> tableIndexOther - this is some other style of index
|
|
2512 |
* </UL>
|
|
2513 |
* <LI><B>ORDINAL_POSITION</B> short => column sequence number
|
|
2514 |
* within index; zero when TYPE is tableIndexStatistic
|
|
2515 |
* <LI><B>COLUMN_NAME</B> String => column name; <code>null</code> when TYPE is
|
|
2516 |
* tableIndexStatistic
|
|
2517 |
* <LI><B>ASC_OR_DESC</B> String => column sort sequence, "A" => ascending,
|
|
2518 |
* "D" => descending, may be <code>null</code> if sort sequence is not supported;
|
|
2519 |
* <code>null</code> when TYPE is tableIndexStatistic
|
|
2520 |
* <LI><B>CARDINALITY</B> int => When TYPE is tableIndexStatistic, then
|
|
2521 |
* this is the number of rows in the table; otherwise, it is the
|
|
2522 |
* number of unique values in the index.
|
|
2523 |
* <LI><B>PAGES</B> int => When TYPE is tableIndexStatisic then
|
|
2524 |
* this is the number of pages used for the table, otherwise it
|
|
2525 |
* is the number of pages used for the current index.
|
|
2526 |
* <LI><B>FILTER_CONDITION</B> String => Filter condition, if any.
|
|
2527 |
* (may be <code>null</code>)
|
|
2528 |
* </OL>
|
|
2529 |
*
|
|
2530 |
* @param catalog a catalog name; must match the catalog name as it
|
|
2531 |
* is stored in this database; "" retrieves those without a catalog;
|
|
2532 |
* <code>null</code> means that the catalog name should not be used to narrow
|
|
2533 |
* the search
|
|
2534 |
* @param schema a schema name; must match the schema name
|
|
2535 |
* as it is stored in this database; "" retrieves those without a schema;
|
|
2536 |
* <code>null</code> means that the schema name should not be used to narrow
|
|
2537 |
* the search
|
|
2538 |
* @param table a table name; must match the table name as it is stored
|
|
2539 |
* in this database
|
|
2540 |
* @param unique when true, return only indices for unique values;
|
|
2541 |
* when false, return indices regardless of whether unique or not
|
|
2542 |
* @param approximate when true, result is allowed to reflect approximate
|
|
2543 |
* or out of data values; when false, results are requested to be
|
|
2544 |
* accurate
|
|
2545 |
* @return <code>ResultSet</code> - each row is an index column description
|
|
2546 |
* @exception SQLException if a database access error occurs
|
|
2547 |
*/
|
|
2548 |
ResultSet getIndexInfo(String catalog, String schema, String table,
|
|
2549 |
boolean unique, boolean approximate)
|
|
2550 |
throws SQLException;
|
|
2551 |
|
|
2552 |
/**
|
|
2553 |
* Indicates that this column contains table statistics that
|
|
2554 |
* are returned in conjunction with a table's index descriptions.
|
|
2555 |
* <P>
|
|
2556 |
* A possible value for column <code>TYPE</code> in the
|
|
2557 |
* <code>ResultSet</code> object returned by the method
|
|
2558 |
* <code>getIndexInfo</code>.
|
|
2559 |
*/
|
|
2560 |
short tableIndexStatistic = 0;
|
|
2561 |
|
|
2562 |
/**
|
|
2563 |
* Indicates that this table index is a clustered index.
|
|
2564 |
* <P>
|
|
2565 |
* A possible value for column <code>TYPE</code> in the
|
|
2566 |
* <code>ResultSet</code> object returned by the method
|
|
2567 |
* <code>getIndexInfo</code>.
|
|
2568 |
*/
|
|
2569 |
short tableIndexClustered = 1;
|
|
2570 |
|
|
2571 |
/**
|
|
2572 |
* Indicates that this table index is a hashed index.
|
|
2573 |
* <P>
|
|
2574 |
* A possible value for column <code>TYPE</code> in the
|
|
2575 |
* <code>ResultSet</code> object returned by the method
|
|
2576 |
* <code>getIndexInfo</code>.
|
|
2577 |
*/
|
|
2578 |
short tableIndexHashed = 2;
|
|
2579 |
|
|
2580 |
/**
|
|
2581 |
* Indicates that this table index is not a clustered
|
|
2582 |
* index, a hashed index, or table statistics;
|
|
2583 |
* it is something other than these.
|
|
2584 |
* <P>
|
|
2585 |
* A possible value for column <code>TYPE</code> in the
|
|
2586 |
* <code>ResultSet</code> object returned by the method
|
|
2587 |
* <code>getIndexInfo</code>.
|
|
2588 |
*/
|
|
2589 |
short tableIndexOther = 3;
|
|
2590 |
|
|
2591 |
//--------------------------JDBC 2.0-----------------------------
|
|
2592 |
|
|
2593 |
/**
|
|
2594 |
* Retrieves whether this database supports the given result set type.
|
|
2595 |
*
|
|
2596 |
* @param type defined in <code>java.sql.ResultSet</code>
|
|
2597 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
2598 |
* @exception SQLException if a database access error occurs
|
|
2599 |
* @see Connection
|
|
2600 |
* @since 1.2
|
|
2601 |
*/
|
|
2602 |
boolean supportsResultSetType(int type) throws SQLException;
|
|
2603 |
|
|
2604 |
/**
|
|
2605 |
* Retrieves whether this database supports the given concurrency type
|
|
2606 |
* in combination with the given result set type.
|
|
2607 |
*
|
|
2608 |
* @param type defined in <code>java.sql.ResultSet</code>
|
|
2609 |
* @param concurrency type defined in <code>java.sql.ResultSet</code>
|
|
2610 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
2611 |
* @exception SQLException if a database access error occurs
|
|
2612 |
* @see Connection
|
|
2613 |
* @since 1.2
|
|
2614 |
*/
|
|
2615 |
boolean supportsResultSetConcurrency(int type, int concurrency)
|
|
2616 |
throws SQLException;
|
|
2617 |
|
|
2618 |
/**
|
|
2619 |
*
|
|
2620 |
* Retrieves whether for the given type of <code>ResultSet</code> object,
|
|
2621 |
* the result set's own updates are visible.
|
|
2622 |
*
|
|
2623 |
* @param type the <code>ResultSet</code> type; one of
|
|
2624 |
* <code>ResultSet.TYPE_FORWARD_ONLY</code>,
|
|
2625 |
* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
|
|
2626 |
* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
|
|
2627 |
* @return <code>true</code> if updates are visible for the given result set type;
|
|
2628 |
* <code>false</code> otherwise
|
|
2629 |
* @exception SQLException if a database access error occurs
|
|
2630 |
* @since 1.2
|
|
2631 |
*/
|
|
2632 |
boolean ownUpdatesAreVisible(int type) throws SQLException;
|
|
2633 |
|
|
2634 |
/**
|
|
2635 |
* Retrieves whether a result set's own deletes are visible.
|
|
2636 |
*
|
|
2637 |
* @param type the <code>ResultSet</code> type; one of
|
|
2638 |
* <code>ResultSet.TYPE_FORWARD_ONLY</code>,
|
|
2639 |
* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
|
|
2640 |
* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
|
|
2641 |
* @return <code>true</code> if deletes are visible for the given result set type;
|
|
2642 |
* <code>false</code> otherwise
|
|
2643 |
* @exception SQLException if a database access error occurs
|
|
2644 |
* @since 1.2
|
|
2645 |
*/
|
|
2646 |
boolean ownDeletesAreVisible(int type) throws SQLException;
|
|
2647 |
|
|
2648 |
/**
|
|
2649 |
* Retrieves whether a result set's own inserts are visible.
|
|
2650 |
*
|
|
2651 |
* @param type the <code>ResultSet</code> type; one of
|
|
2652 |
* <code>ResultSet.TYPE_FORWARD_ONLY</code>,
|
|
2653 |
* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
|
|
2654 |
* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
|
|
2655 |
* @return <code>true</code> if inserts are visible for the given result set type;
|
|
2656 |
* <code>false</code> otherwise
|
|
2657 |
* @exception SQLException if a database access error occurs
|
|
2658 |
* @since 1.2
|
|
2659 |
*/
|
|
2660 |
boolean ownInsertsAreVisible(int type) throws SQLException;
|
|
2661 |
|
|
2662 |
/**
|
|
2663 |
* Retrieves whether updates made by others are visible.
|
|
2664 |
*
|
|
2665 |
* @param type the <code>ResultSet</code> type; one of
|
|
2666 |
* <code>ResultSet.TYPE_FORWARD_ONLY</code>,
|
|
2667 |
* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
|
|
2668 |
* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
|
|
2669 |
* @return <code>true</code> if updates made by others
|
|
2670 |
* are visible for the given result set type;
|
|
2671 |
* <code>false</code> otherwise
|
|
2672 |
* @exception SQLException if a database access error occurs
|
|
2673 |
* @since 1.2
|
|
2674 |
*/
|
|
2675 |
boolean othersUpdatesAreVisible(int type) throws SQLException;
|
|
2676 |
|
|
2677 |
/**
|
|
2678 |
* Retrieves whether deletes made by others are visible.
|
|
2679 |
*
|
|
2680 |
* @param type the <code>ResultSet</code> type; one of
|
|
2681 |
* <code>ResultSet.TYPE_FORWARD_ONLY</code>,
|
|
2682 |
* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
|
|
2683 |
* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
|
|
2684 |
* @return <code>true</code> if deletes made by others
|
|
2685 |
* are visible for the given result set type;
|
|
2686 |
* <code>false</code> otherwise
|
|
2687 |
* @exception SQLException if a database access error occurs
|
|
2688 |
* @since 1.2
|
|
2689 |
*/
|
|
2690 |
boolean othersDeletesAreVisible(int type) throws SQLException;
|
|
2691 |
|
|
2692 |
/**
|
|
2693 |
* Retrieves whether inserts made by others are visible.
|
|
2694 |
*
|
|
2695 |
* @param type the <code>ResultSet</code> type; one of
|
|
2696 |
* <code>ResultSet.TYPE_FORWARD_ONLY</code>,
|
|
2697 |
* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
|
|
2698 |
* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
|
|
2699 |
* @return <code>true</code> if inserts made by others
|
|
2700 |
* are visible for the given result set type;
|
|
2701 |
* <code>false</code> otherwise
|
|
2702 |
* @exception SQLException if a database access error occurs
|
|
2703 |
* @since 1.2
|
|
2704 |
*/
|
|
2705 |
boolean othersInsertsAreVisible(int type) throws SQLException;
|
|
2706 |
|
|
2707 |
/**
|
|
2708 |
* Retrieves whether or not a visible row update can be detected by
|
|
2709 |
* calling the method <code>ResultSet.rowUpdated</code>.
|
|
2710 |
*
|
|
2711 |
* @param type the <code>ResultSet</code> type; one of
|
|
2712 |
* <code>ResultSet.TYPE_FORWARD_ONLY</code>,
|
|
2713 |
* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
|
|
2714 |
* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
|
|
2715 |
* @return <code>true</code> if changes are detected by the result set type;
|
|
2716 |
* <code>false</code> otherwise
|
|
2717 |
* @exception SQLException if a database access error occurs
|
|
2718 |
* @since 1.2
|
|
2719 |
*/
|
|
2720 |
boolean updatesAreDetected(int type) throws SQLException;
|
|
2721 |
|
|
2722 |
/**
|
|
2723 |
* Retrieves whether or not a visible row delete can be detected by
|
|
2724 |
* calling the method <code>ResultSet.rowDeleted</code>. If the method
|
|
2725 |
* <code>deletesAreDetected</code> returns <code>false</code>, it means that
|
|
2726 |
* deleted rows are removed from the result set.
|
|
2727 |
*
|
|
2728 |
* @param type the <code>ResultSet</code> type; one of
|
|
2729 |
* <code>ResultSet.TYPE_FORWARD_ONLY</code>,
|
|
2730 |
* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
|
|
2731 |
* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
|
|
2732 |
* @return <code>true</code> if deletes are detected by the given result set type;
|
|
2733 |
* <code>false</code> otherwise
|
|
2734 |
* @exception SQLException if a database access error occurs
|
|
2735 |
* @since 1.2
|
|
2736 |
*/
|
|
2737 |
boolean deletesAreDetected(int type) throws SQLException;
|
|
2738 |
|
|
2739 |
/**
|
|
2740 |
* Retrieves whether or not a visible row insert can be detected
|
|
2741 |
* by calling the method <code>ResultSet.rowInserted</code>.
|
|
2742 |
*
|
|
2743 |
* @param type the <code>ResultSet</code> type; one of
|
|
2744 |
* <code>ResultSet.TYPE_FORWARD_ONLY</code>,
|
|
2745 |
* <code>ResultSet.TYPE_SCROLL_INSENSITIVE</code>, or
|
|
2746 |
* <code>ResultSet.TYPE_SCROLL_SENSITIVE</code>
|
|
2747 |
* @return <code>true</code> if changes are detected by the specified result
|
|
2748 |
* set type; <code>false</code> otherwise
|
|
2749 |
* @exception SQLException if a database access error occurs
|
|
2750 |
* @since 1.2
|
|
2751 |
*/
|
|
2752 |
boolean insertsAreDetected(int type) throws SQLException;
|
|
2753 |
|
|
2754 |
/**
|
|
2755 |
* Retrieves whether this database supports batch updates.
|
|
2756 |
*
|
|
2757 |
* @return <code>true</code> if this database supports batch upcates;
|
|
2758 |
* <code>false</code> otherwise
|
|
2759 |
* @exception SQLException if a database access error occurs
|
|
2760 |
* @since 1.2
|
|
2761 |
*/
|
|
2762 |
boolean supportsBatchUpdates() throws SQLException;
|
|
2763 |
|
|
2764 |
/**
|
|
2765 |
* Retrieves a description of the user-defined types (UDTs) defined
|
|
2766 |
* in a particular schema. Schema-specific UDTs may have type
|
|
2767 |
* <code>JAVA_OBJECT</code>, <code>STRUCT</code>,
|
|
2768 |
* or <code>DISTINCT</code>.
|
|
2769 |
*
|
|
2770 |
* <P>Only types matching the catalog, schema, type name and type
|
|
2771 |
* criteria are returned. They are ordered by <code>DATA_TYPE</code>,
|
|
2772 |
* <code>TYPE_CAT</code>, <code>TYPE_SCHEM</code> and
|
|
2773 |
* <code>TYPE_NAME</code>. The type name parameter may be a fully-qualified
|
|
2774 |
* name. In this case, the catalog and schemaPattern parameters are
|
|
2775 |
* ignored.
|
|
2776 |
*
|
|
2777 |
* <P>Each type description has the following columns:
|
|
2778 |
* <OL>
|
|
2779 |
* <LI><B>TYPE_CAT</B> String => the type's catalog (may be <code>null</code>)
|
|
2780 |
* <LI><B>TYPE_SCHEM</B> String => type's schema (may be <code>null</code>)
|
|
2781 |
* <LI><B>TYPE_NAME</B> String => type name
|
|
2782 |
* <LI><B>CLASS_NAME</B> String => Java class name
|
|
2783 |
* <LI><B>DATA_TYPE</B> int => type value defined in java.sql.Types.
|
|
2784 |
* One of JAVA_OBJECT, STRUCT, or DISTINCT
|
|
2785 |
* <LI><B>REMARKS</B> String => explanatory comment on the type
|
|
2786 |
* <LI><B>BASE_TYPE</B> short => type code of the source type of a
|
|
2787 |
* DISTINCT type or the type that implements the user-generated
|
|
2788 |
* reference type of the SELF_REFERENCING_COLUMN of a structured
|
|
2789 |
* type as defined in java.sql.Types (<code>null</code> if DATA_TYPE is not
|
|
2790 |
* DISTINCT or not STRUCT with REFERENCE_GENERATION = USER_DEFINED)
|
|
2791 |
* </OL>
|
|
2792 |
*
|
|
2793 |
* <P><B>Note:</B> If the driver does not support UDTs, an empty
|
|
2794 |
* result set is returned.
|
|
2795 |
*
|
|
2796 |
* @param catalog a catalog name; must match the catalog name as it
|
|
2797 |
* is stored in the database; "" retrieves those without a catalog;
|
|
2798 |
* <code>null</code> means that the catalog name should not be used to narrow
|
|
2799 |
* the search
|
|
2800 |
* @param schemaPattern a schema pattern name; must match the schema name
|
|
2801 |
* as it is stored in the database; "" retrieves those without a schema;
|
|
2802 |
* <code>null</code> means that the schema name should not be used to narrow
|
|
2803 |
* the search
|
|
2804 |
* @param typeNamePattern a type name pattern; must match the type name
|
|
2805 |
* as it is stored in the database; may be a fully qualified name
|
|
2806 |
* @param types a list of user-defined types (JAVA_OBJECT,
|
|
2807 |
* STRUCT, or DISTINCT) to include; <code>null</code> returns all types
|
|
2808 |
* @return <code>ResultSet</code> object in which each row describes a UDT
|
|
2809 |
* @exception SQLException if a database access error occurs
|
|
2810 |
* @see #getSearchStringEscape
|
|
2811 |
* @since 1.2
|
|
2812 |
*/
|
|
2813 |
ResultSet getUDTs(String catalog, String schemaPattern,
|
|
2814 |
String typeNamePattern, int[] types)
|
|
2815 |
throws SQLException;
|
|
2816 |
|
|
2817 |
/**
|
|
2818 |
* Retrieves the connection that produced this metadata object.
|
|
2819 |
* <P>
|
|
2820 |
* @return the connection that produced this metadata object
|
|
2821 |
* @exception SQLException if a database access error occurs
|
|
2822 |
* @since 1.2
|
|
2823 |
*/
|
|
2824 |
Connection getConnection() throws SQLException;
|
|
2825 |
|
|
2826 |
// ------------------- JDBC 3.0 -------------------------
|
|
2827 |
|
|
2828 |
/**
|
|
2829 |
* Retrieves whether this database supports savepoints.
|
|
2830 |
*
|
|
2831 |
* @return <code>true</code> if savepoints are supported;
|
|
2832 |
* <code>false</code> otherwise
|
|
2833 |
* @exception SQLException if a database access error occurs
|
|
2834 |
* @since 1.4
|
|
2835 |
*/
|
|
2836 |
boolean supportsSavepoints() throws SQLException;
|
|
2837 |
|
|
2838 |
/**
|
|
2839 |
* Retrieves whether this database supports named parameters to callable
|
|
2840 |
* statements.
|
|
2841 |
*
|
|
2842 |
* @return <code>true</code> if named parameters are supported;
|
|
2843 |
* <code>false</code> otherwise
|
|
2844 |
* @exception SQLException if a database access error occurs
|
|
2845 |
* @since 1.4
|
|
2846 |
*/
|
|
2847 |
boolean supportsNamedParameters() throws SQLException;
|
|
2848 |
|
|
2849 |
/**
|
|
2850 |
* Retrieves whether it is possible to have multiple <code>ResultSet</code> objects
|
|
2851 |
* returned from a <code>CallableStatement</code> object
|
|
2852 |
* simultaneously.
|
|
2853 |
*
|
|
2854 |
* @return <code>true</code> if a <code>CallableStatement</code> object
|
|
2855 |
* can return multiple <code>ResultSet</code> objects
|
|
2856 |
* simultaneously; <code>false</code> otherwise
|
|
2857 |
* @exception SQLException if a datanase access error occurs
|
|
2858 |
* @since 1.4
|
|
2859 |
*/
|
|
2860 |
boolean supportsMultipleOpenResults() throws SQLException;
|
|
2861 |
|
|
2862 |
/**
|
|
2863 |
* Retrieves whether auto-generated keys can be retrieved after
|
|
2864 |
* a statement has been executed
|
|
2865 |
*
|
|
2866 |
* @return <code>true</code> if auto-generated keys can be retrieved
|
|
2867 |
* after a statement has executed; <code>false</code> otherwise
|
|
2868 |
*<p>If <code>true</code> is returned, the JDBC driver must support the
|
|
2869 |
* returning of auto-generated keys for at least SQL INSERT statements
|
|
2870 |
*<p>
|
|
2871 |
* @exception SQLException if a database access error occurs
|
|
2872 |
* @since 1.4
|
|
2873 |
*/
|
|
2874 |
boolean supportsGetGeneratedKeys() throws SQLException;
|
|
2875 |
|
|
2876 |
/**
|
|
2877 |
* Retrieves a description of the user-defined type (UDT) hierarchies defined in a
|
|
2878 |
* particular schema in this database. Only the immediate super type/
|
|
2879 |
* sub type relationship is modeled.
|
|
2880 |
* <P>
|
|
2881 |
* Only supertype information for UDTs matching the catalog,
|
|
2882 |
* schema, and type name is returned. The type name parameter
|
|
2883 |
* may be a fully-qualified name. When the UDT name supplied is a
|
|
2884 |
* fully-qualified name, the catalog and schemaPattern parameters are
|
|
2885 |
* ignored.
|
|
2886 |
* <P>
|
|
2887 |
* If a UDT does not have a direct super type, it is not listed here.
|
|
2888 |
* A row of the <code>ResultSet</code> object returned by this method
|
|
2889 |
* describes the designated UDT and a direct supertype. A row has the following
|
|
2890 |
* columns:
|
|
2891 |
* <OL>
|
|
2892 |
* <LI><B>TYPE_CAT</B> String => the UDT's catalog (may be <code>null</code>)
|
|
2893 |
* <LI><B>TYPE_SCHEM</B> String => UDT's schema (may be <code>null</code>)
|
|
2894 |
* <LI><B>TYPE_NAME</B> String => type name of the UDT
|
|
2895 |
* <LI><B>SUPERTYPE_CAT</B> String => the direct super type's catalog
|
|
2896 |
* (may be <code>null</code>)
|
|
2897 |
* <LI><B>SUPERTYPE_SCHEM</B> String => the direct super type's schema
|
|
2898 |
* (may be <code>null</code>)
|
|
2899 |
* <LI><B>SUPERTYPE_NAME</B> String => the direct super type's name
|
|
2900 |
* </OL>
|
|
2901 |
*
|
|
2902 |
* <P><B>Note:</B> If the driver does not support type hierarchies, an
|
|
2903 |
* empty result set is returned.
|
|
2904 |
*
|
|
2905 |
* @param catalog a catalog name; "" retrieves those without a catalog;
|
|
2906 |
* <code>null</code> means drop catalog name from the selection criteria
|
|
2907 |
* @param schemaPattern a schema name pattern; "" retrieves those
|
|
2908 |
* without a schema
|
|
2909 |
* @param typeNamePattern a UDT name pattern; may be a fully-qualified
|
|
2910 |
* name
|
|
2911 |
* @return a <code>ResultSet</code> object in which a row gives information
|
|
2912 |
* about the designated UDT
|
|
2913 |
* @throws SQLException if a database access error occurs
|
|
2914 |
* @see #getSearchStringEscape
|
|
2915 |
* @since 1.4
|
|
2916 |
*/
|
|
2917 |
ResultSet getSuperTypes(String catalog, String schemaPattern,
|
|
2918 |
String typeNamePattern) throws SQLException;
|
|
2919 |
|
|
2920 |
/**
|
|
2921 |
* Retrieves a description of the table hierarchies defined in a particular
|
|
2922 |
* schema in this database.
|
|
2923 |
*
|
|
2924 |
* <P>Only supertable information for tables matching the catalog, schema
|
|
2925 |
* and table name are returned. The table name parameter may be a fully-
|
|
2926 |
* qualified name, in which case, the catalog and schemaPattern parameters
|
|
2927 |
* are ignored. If a table does not have a super table, it is not listed here.
|
|
2928 |
* Supertables have to be defined in the same catalog and schema as the
|
|
2929 |
* sub tables. Therefore, the type description does not need to include
|
|
2930 |
* this information for the supertable.
|
|
2931 |
*
|
|
2932 |
* <P>Each type description has the following columns:
|
|
2933 |
* <OL>
|
|
2934 |
* <LI><B>TABLE_CAT</B> String => the type's catalog (may be <code>null</code>)
|
|
2935 |
* <LI><B>TABLE_SCHEM</B> String => type's schema (may be <code>null</code>)
|
|
2936 |
* <LI><B>TABLE_NAME</B> String => type name
|
|
2937 |
* <LI><B>SUPERTABLE_NAME</B> String => the direct super type's name
|
|
2938 |
* </OL>
|
|
2939 |
*
|
|
2940 |
* <P><B>Note:</B> If the driver does not support type hierarchies, an
|
|
2941 |
* empty result set is returned.
|
|
2942 |
*
|
|
2943 |
* @param catalog a catalog name; "" retrieves those without a catalog;
|
|
2944 |
* <code>null</code> means drop catalog name from the selection criteria
|
|
2945 |
* @param schemaPattern a schema name pattern; "" retrieves those
|
|
2946 |
* without a schema
|
|
2947 |
* @param tableNamePattern a table name pattern; may be a fully-qualified
|
|
2948 |
* name
|
|
2949 |
* @return a <code>ResultSet</code> object in which each row is a type description
|
|
2950 |
* @throws SQLException if a database access error occurs
|
|
2951 |
* @see #getSearchStringEscape
|
|
2952 |
* @since 1.4
|
|
2953 |
*/
|
|
2954 |
ResultSet getSuperTables(String catalog, String schemaPattern,
|
|
2955 |
String tableNamePattern) throws SQLException;
|
|
2956 |
|
|
2957 |
/**
|
|
2958 |
* Indicates that <code>NULL</code> values might not be allowed.
|
|
2959 |
* <P>
|
|
2960 |
* A possible value for the column
|
|
2961 |
* <code>NULLABLE</code> in the <code>ResultSet</code> object
|
|
2962 |
* returned by the method <code>getAttributes</code>.
|
|
2963 |
*/
|
|
2964 |
short attributeNoNulls = 0;
|
|
2965 |
|
|
2966 |
/**
|
|
2967 |
* Indicates that <code>NULL</code> values are definitely allowed.
|
|
2968 |
* <P>
|
|
2969 |
* A possible value for the column <code>NULLABLE</code>
|
|
2970 |
* in the <code>ResultSet</code> object
|
|
2971 |
* returned by the method <code>getAttributes</code>.
|
|
2972 |
*/
|
|
2973 |
short attributeNullable = 1;
|
|
2974 |
|
|
2975 |
/**
|
|
2976 |
* Indicates that whether <code>NULL</code> values are allowed is not
|
|
2977 |
* known.
|
|
2978 |
* <P>
|
|
2979 |
* A possible value for the column <code>NULLABLE</code>
|
|
2980 |
* in the <code>ResultSet</code> object
|
|
2981 |
* returned by the method <code>getAttributes</code>.
|
|
2982 |
*/
|
|
2983 |
short attributeNullableUnknown = 2;
|
|
2984 |
|
|
2985 |
/**
|
|
2986 |
* Retrieves a description of the given attribute of the given type
|
|
2987 |
* for a user-defined type (UDT) that is available in the given schema
|
|
2988 |
* and catalog.
|
|
2989 |
* <P>
|
|
2990 |
* Descriptions are returned only for attributes of UDTs matching the
|
|
2991 |
* catalog, schema, type, and attribute name criteria. They are ordered by
|
|
2992 |
* <code>TYPE_CAT</code>, <code>TYPE_SCHEM</code>,
|
|
2993 |
* <code>TYPE_NAME</code> and <code>ORDINAL_POSITION</code>. This description
|
|
2994 |
* does not contain inherited attributes.
|
|
2995 |
* <P>
|
|
2996 |
* The <code>ResultSet</code> object that is returned has the following
|
|
2997 |
* columns:
|
|
2998 |
* <OL>
|
|
2999 |
* <LI><B>TYPE_CAT</B> String => type catalog (may be <code>null</code>)
|
|
3000 |
* <LI><B>TYPE_SCHEM</B> String => type schema (may be <code>null</code>)
|
|
3001 |
* <LI><B>TYPE_NAME</B> String => type name
|
|
3002 |
* <LI><B>ATTR_NAME</B> String => attribute name
|
|
3003 |
* <LI><B>DATA_TYPE</B> int => attribute type SQL type from java.sql.Types
|
|
3004 |
* <LI><B>ATTR_TYPE_NAME</B> String => Data source dependent type name.
|
|
3005 |
* For a UDT, the type name is fully qualified. For a REF, the type name is
|
|
3006 |
* fully qualified and represents the target type of the reference type.
|
|
3007 |
* <LI><B>ATTR_SIZE</B> int => column size. For char or date
|
|
3008 |
* types this is the maximum number of characters; for numeric or
|
|
3009 |
* decimal types this is precision.
|
|
3010 |
* <LI><B>DECIMAL_DIGITS</B> int => the number of fractional digits. Null is returned for data types where
|
|
3011 |
* DECIMAL_DIGITS is not applicable.
|
|
3012 |
* <LI><B>NUM_PREC_RADIX</B> int => Radix (typically either 10 or 2)
|
|
3013 |
* <LI><B>NULLABLE</B> int => whether NULL is allowed
|
|
3014 |
* <UL>
|
|
3015 |
* <LI> attributeNoNulls - might not allow NULL values
|
|
3016 |
* <LI> attributeNullable - definitely allows NULL values
|
|
3017 |
* <LI> attributeNullableUnknown - nullability unknown
|
|
3018 |
* </UL>
|
|
3019 |
* <LI><B>REMARKS</B> String => comment describing column (may be <code>null</code>)
|
|
3020 |
* <LI><B>ATTR_DEF</B> String => default value (may be <code>null</code>)
|
|
3021 |
* <LI><B>SQL_DATA_TYPE</B> int => unused
|
|
3022 |
* <LI><B>SQL_DATETIME_SUB</B> int => unused
|
|
3023 |
* <LI><B>CHAR_OCTET_LENGTH</B> int => for char types the
|
|
3024 |
* maximum number of bytes in the column
|
|
3025 |
* <LI><B>ORDINAL_POSITION</B> int => index of the attribute in the UDT
|
|
3026 |
* (starting at 1)
|
|
3027 |
* <LI><B>IS_NULLABLE</B> String => ISO rules are used to determine
|
|
3028 |
* the nullability for a attribute.
|
|
3029 |
* <UL>
|
|
3030 |
* <LI> YES --- if the attribute can include NULLs
|
|
3031 |
* <LI> NO --- if the attribute cannot include NULLs
|
|
3032 |
* <LI> empty string --- if the nullability for the
|
|
3033 |
* attribute is unknown
|
|
3034 |
* </UL>
|
|
3035 |
* <LI><B>SCOPE_CATALOG</B> String => catalog of table that is the
|
|
3036 |
* scope of a reference attribute (<code>null</code> if DATA_TYPE isn't REF)
|
|
3037 |
* <LI><B>SCOPE_SCHEMA</B> String => schema of table that is the
|
|
3038 |
* scope of a reference attribute (<code>null</code> if DATA_TYPE isn't REF)
|
|
3039 |
* <LI><B>SCOPE_TABLE</B> String => table name that is the scope of a
|
|
3040 |
* reference attribute (<code>null</code> if the DATA_TYPE isn't REF)
|
|
3041 |
* <LI><B>SOURCE_DATA_TYPE</B> short => source type of a distinct type or user-generated
|
|
3042 |
* Ref type,SQL type from java.sql.Types (<code>null</code> if DATA_TYPE
|
|
3043 |
* isn't DISTINCT or user-generated REF)
|
|
3044 |
* </OL>
|
|
3045 |
* @param catalog a catalog name; must match the catalog name as it
|
|
3046 |
* is stored in the database; "" retrieves those without a catalog;
|
|
3047 |
* <code>null</code> means that the catalog name should not be used to narrow
|
|
3048 |
* the search
|
|
3049 |
* @param schemaPattern a schema name pattern; must match the schema name
|
|
3050 |
* as it is stored in the database; "" retrieves those without a schema;
|
|
3051 |
* <code>null</code> means that the schema name should not be used to narrow
|
|
3052 |
* the search
|
|
3053 |
* @param typeNamePattern a type name pattern; must match the
|
|
3054 |
* type name as it is stored in the database
|
|
3055 |
* @param attributeNamePattern an attribute name pattern; must match the attribute
|
|
3056 |
* name as it is declared in the database
|
|
3057 |
* @return a <code>ResultSet</code> object in which each row is an
|
|
3058 |
* attribute description
|
|
3059 |
* @exception SQLException if a database access error occurs
|
|
3060 |
* @see #getSearchStringEscape
|
|
3061 |
* @since 1.4
|
|
3062 |
*/
|
|
3063 |
ResultSet getAttributes(String catalog, String schemaPattern,
|
|
3064 |
String typeNamePattern, String attributeNamePattern)
|
|
3065 |
throws SQLException;
|
|
3066 |
|
|
3067 |
/**
|
|
3068 |
* Retrieves whether this database supports the given result set holdability.
|
|
3069 |
*
|
|
3070 |
* @param holdability one of the following constants:
|
|
3071 |
* <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
|
|
3072 |
* <code>ResultSet.CLOSE_CURSORS_AT_COMMIT<code>
|
|
3073 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
3074 |
* @exception SQLException if a database access error occurs
|
|
3075 |
* @see Connection
|
|
3076 |
* @since 1.4
|
|
3077 |
*/
|
|
3078 |
boolean supportsResultSetHoldability(int holdability) throws SQLException;
|
|
3079 |
|
|
3080 |
/**
|
|
3081 |
* Retrieves this database's default holdability for <code>ResultSet</code>
|
|
3082 |
* objects.
|
|
3083 |
*
|
|
3084 |
* @return the default holdability; either
|
|
3085 |
* <code>ResultSet.HOLD_CURSORS_OVER_COMMIT</code> or
|
|
3086 |
* <code>ResultSet.CLOSE_CURSORS_AT_COMMIT</code>
|
|
3087 |
* @exception SQLException if a database access error occurs
|
|
3088 |
* @since 1.4
|
|
3089 |
*/
|
|
3090 |
int getResultSetHoldability() throws SQLException;
|
|
3091 |
|
|
3092 |
/**
|
|
3093 |
* Retrieves the major version number of the underlying database.
|
|
3094 |
*
|
|
3095 |
* @return the underlying database's major version
|
|
3096 |
* @exception SQLException if a database access error occurs
|
|
3097 |
* @since 1.4
|
|
3098 |
*/
|
|
3099 |
int getDatabaseMajorVersion() throws SQLException;
|
|
3100 |
|
|
3101 |
/**
|
|
3102 |
* Retrieves the minor version number of the underlying database.
|
|
3103 |
*
|
|
3104 |
* @return underlying database's minor version
|
|
3105 |
* @exception SQLException if a database access error occurs
|
|
3106 |
* @since 1.4
|
|
3107 |
*/
|
|
3108 |
int getDatabaseMinorVersion() throws SQLException;
|
|
3109 |
|
|
3110 |
/**
|
|
3111 |
* Retrieves the major JDBC version number for this
|
|
3112 |
* driver.
|
|
3113 |
*
|
|
3114 |
* @return JDBC version major number
|
|
3115 |
* @exception SQLException if a database access error occurs
|
|
3116 |
* @since 1.4
|
|
3117 |
*/
|
|
3118 |
int getJDBCMajorVersion() throws SQLException;
|
|
3119 |
|
|
3120 |
/**
|
|
3121 |
* Retrieves the minor JDBC version number for this
|
|
3122 |
* driver.
|
|
3123 |
*
|
|
3124 |
* @return JDBC version minor number
|
|
3125 |
* @exception SQLException if a database access error occurs
|
|
3126 |
* @since 1.4
|
|
3127 |
*/
|
|
3128 |
int getJDBCMinorVersion() throws SQLException;
|
|
3129 |
|
|
3130 |
/**
|
|
3131 |
* A possible return value for the method
|
|
3132 |
* <code>DatabaseMetaData.getSQLStateType</code> which is used to indicate
|
|
3133 |
* whether the value returned by the method
|
|
3134 |
* <code>SQLException.getSQLState</code> is an
|
|
3135 |
* X/Open (now know as Open Group) SQL CLI SQLSTATE value.
|
|
3136 |
* <P>
|
|
3137 |
* @since 1.4
|
|
3138 |
*/
|
|
3139 |
int sqlStateXOpen = 1;
|
|
3140 |
|
|
3141 |
/**
|
|
3142 |
* A possible return value for the method
|
|
3143 |
* <code>DatabaseMetaData.getSQLStateType</code> which is used to indicate
|
|
3144 |
* whether the value returned by the method
|
|
3145 |
* <code>SQLException.getSQLState</code> is an SQLSTATE value.
|
|
3146 |
* <P>
|
|
3147 |
* @since 1.6
|
|
3148 |
*/
|
|
3149 |
int sqlStateSQL = 2;
|
|
3150 |
|
|
3151 |
/**
|
|
3152 |
* A possible return value for the method
|
|
3153 |
* <code>DatabaseMetaData.getSQLStateType</code> which is used to indicate
|
|
3154 |
* whether the value returned by the method
|
|
3155 |
* <code>SQLException.getSQLState</code> is an SQL99 SQLSTATE value.
|
|
3156 |
* <P>
|
|
3157 |
* <b>Note:</b>This constant remains only for compatibility reasons. Developers
|
|
3158 |
* should use the constant <code>sqlStateSQL</code> instead.
|
|
3159 |
*
|
|
3160 |
* @since 1.4
|
|
3161 |
*/
|
|
3162 |
int sqlStateSQL99 = sqlStateSQL;
|
|
3163 |
|
|
3164 |
/**
|
|
3165 |
* Indicates whether the SQLSTATE returned by <code>SQLException.getSQLState</code>
|
|
3166 |
* is X/Open (now known as Open Group) SQL CLI or SQL:2003.
|
|
3167 |
* @return the type of SQLSTATE; one of:
|
|
3168 |
* sqlStateXOpen or
|
|
3169 |
* sqlStateSQL
|
|
3170 |
* @throws SQLException if a database access error occurs
|
|
3171 |
* @since 1.4
|
|
3172 |
*/
|
|
3173 |
int getSQLStateType() throws SQLException;
|
|
3174 |
|
|
3175 |
/**
|
|
3176 |
* Indicates whether updates made to a LOB are made on a copy or directly
|
|
3177 |
* to the LOB.
|
|
3178 |
* @return <code>true</code> if updates are made to a copy of the LOB;
|
|
3179 |
* <code>false</code> if updates are made directly to the LOB
|
|
3180 |
* @throws SQLException if a database access error occurs
|
|
3181 |
* @since 1.4
|
|
3182 |
*/
|
|
3183 |
boolean locatorsUpdateCopy() throws SQLException;
|
|
3184 |
|
|
3185 |
/**
|
|
3186 |
* Retrieves whether this database supports statement pooling.
|
|
3187 |
*
|
|
3188 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
3189 |
* @throws SQLExcpetion if a database access error occurs
|
|
3190 |
* @since 1.4
|
|
3191 |
*/
|
|
3192 |
boolean supportsStatementPooling() throws SQLException;
|
|
3193 |
|
|
3194 |
//------------------------- JDBC 4.0 -----------------------------------
|
|
3195 |
|
|
3196 |
/**
|
|
3197 |
* Indicates whether or not this data source supports the SQL <code>ROWID</code> type,
|
|
3198 |
* and if so the lifetime for which a <code>RowId</code> object remains valid.
|
|
3199 |
* <p>
|
|
3200 |
* The returned int values have the following relationship:
|
|
3201 |
* <pre>
|
|
3202 |
* ROWID_UNSUPPORTED < ROWID_VALID_OTHER < ROWID_VALID_TRANSACTION
|
|
3203 |
* < ROWID_VALID_SESSION < ROWID_VALID_FOREVER
|
|
3204 |
* </pre>
|
|
3205 |
* so conditional logic such as
|
|
3206 |
* <pre>
|
|
3207 |
* if (metadata.getRowIdLifetime() > DatabaseMetaData.ROWID_VALID_TRANSACTION)
|
|
3208 |
* </pre>
|
|
3209 |
* can be used. Valid Forever means valid across all Sessions, and valid for
|
|
3210 |
* a Session means valid across all its contained Transactions.
|
|
3211 |
*
|
|
3212 |
* @return the status indicating the lifetime of a <code>RowId</code>
|
|
3213 |
* @throws SQLException if a database access error occurs
|
|
3214 |
* @since 1.6
|
|
3215 |
*/
|
|
3216 |
RowIdLifetime getRowIdLifetime() throws SQLException;
|
|
3217 |
|
|
3218 |
/**
|
|
3219 |
* Retrieves the schema names available in this database. The results
|
|
3220 |
* are ordered by <code>TABLE_CATALOG</code> and
|
|
3221 |
* <code>TABLE_SCHEM</code>.
|
|
3222 |
*
|
|
3223 |
* <P>The schema columns are:
|
|
3224 |
* <OL>
|
|
3225 |
* <LI><B>TABLE_SCHEM</B> String => schema name
|
|
3226 |
* <LI><B>TABLE_CATALOG</B> String => catalog name (may be <code>null</code>)
|
|
3227 |
* </OL>
|
|
3228 |
*
|
|
3229 |
*
|
|
3230 |
* @param catalog a catalog name; must match the catalog name as it is stored
|
|
3231 |
* in the database;"" retrieves those without a catalog; null means catalog
|
|
3232 |
* name should not be used to narrow down the search.
|
|
3233 |
* @param schemaPattern a schema name; must match the schema name as it is
|
|
3234 |
* stored in the database; null means
|
|
3235 |
* schema name should not be used to narrow down the search.
|
|
3236 |
* @return a <code>ResultSet</code> object in which each row is a
|
|
3237 |
* schema description
|
|
3238 |
* @exception SQLException if a database access error occurs
|
|
3239 |
* @see #getSearchStringEscape
|
|
3240 |
* @since 1.6
|
|
3241 |
*/
|
|
3242 |
ResultSet getSchemas(String catalog, String schemaPattern) throws SQLException;
|
|
3243 |
|
|
3244 |
/**
|
|
3245 |
* Retrieves whether this database supports invoking user-defined or vendor functions
|
|
3246 |
* using the stored procedure escape syntax.
|
|
3247 |
*
|
|
3248 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
3249 |
* @exception SQLException if a database access error occurs
|
|
3250 |
* @since 1.6
|
|
3251 |
*/
|
|
3252 |
boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException;
|
|
3253 |
|
|
3254 |
/**
|
|
3255 |
* Retrieves whether a <code>SQLException</code> while autoCommit is <code>true</code> inidcates
|
|
3256 |
* that all open ResultSets are closed, even ones that are holdable. When a <code>SQLException</code> occurs while
|
|
3257 |
* autocommit is <code>true</code>, it is vendor specific whether the JDBC driver responds with a commit operation, a
|
|
3258 |
* rollback operation, or by doing neither a commit nor a rollback. A potential result of this difference
|
|
3259 |
* is in whether or not holdable ResultSets are closed.
|
|
3260 |
*
|
|
3261 |
* @return <code>true</code> if so; <code>false</code> otherwise
|
|
3262 |
* @exception SQLException if a database access error occurs
|
|
3263 |
* @since 1.6
|
|
3264 |
*/
|
|
3265 |
boolean autoCommitFailureClosesAllResultSets() throws SQLException;
|
|
3266 |
/**
|
|
3267 |
* Retrieves a list of the client info properties
|
|
3268 |
* that the driver supports. The result set contains the following columns
|
|
3269 |
* <p>
|
|
3270 |
* <ol>
|
|
3271 |
* <li><b>NAME</b> String=> The name of the client info property<br>
|
|
3272 |
* <li><b>MAX_LEN</b> int=> The maximum length of the value for the property<br>
|
|
3273 |
* <li><b>DEFAULT_VALUE</b> String=> The default value of the property<br>
|
|
3274 |
* <li><b>DESCRIPTION</b> String=> A description of the property. This will typically
|
|
3275 |
* contain information as to where this property is
|
|
3276 |
* stored in the database.
|
|
3277 |
* </ol>
|
|
3278 |
* <p>
|
|
3279 |
* The <code>ResultSet</code> is sorted by the NAME column
|
|
3280 |
* <p>
|
|
3281 |
* @return A <code>ResultSet</code> object; each row is a supported client info
|
|
3282 |
* property
|
|
3283 |
* <p>
|
|
3284 |
* @exception SQLException if a database access error occurs
|
|
3285 |
* <p>
|
|
3286 |
* @since 1.6
|
|
3287 |
*/
|
|
3288 |
ResultSet getClientInfoProperties()
|
|
3289 |
throws SQLException;
|
|
3290 |
|
|
3291 |
/**
|
|
3292 |
* Retrieves a description of the system and user functions available
|
|
3293 |
* in the given catalog.
|
|
3294 |
* <P>
|
|
3295 |
* Only system and user function descriptions matching the schema and
|
|
3296 |
* function name criteria are returned. They are ordered by
|
|
3297 |
* <code>FUNCTION_CAT</code>, <code>FUNCTION_SCHEM</code>,
|
|
3298 |
* <code>FUNCTION_NAME</code> and
|
|
3299 |
* <code>SPECIFIC_ NAME</code>.
|
|
3300 |
*
|
|
3301 |
* <P>Each function description has the the following columns:
|
|
3302 |
* <OL>
|
|
3303 |
* <LI><B>FUNCTION_CAT</B> String => function catalog (may be <code>null</code>)
|
|
3304 |
* <LI><B>FUNCTION_SCHEM</B> String => function schema (may be <code>null</code>)
|
|
3305 |
* <LI><B>FUNCTION_NAME</B> String => function name. This is the name
|
|
3306 |
* used to invoke the function
|
|
3307 |
* <LI><B>REMARKS</B> String => explanatory comment on the function
|
|
3308 |
* <LI><B>FUNCTION_TYPE</B> short => kind of function:
|
|
3309 |
* <UL>
|
|
3310 |
* <LI>functionResultUnknown - Cannot determine if a return value
|
|
3311 |
* or table will be returned
|
|
3312 |
* <LI> functionNoTable- Does not return a table
|
|
3313 |
* <LI> functionReturnsTable - Returns a table
|
|
3314 |
* </UL>
|
|
3315 |
* <LI><B>SPECIFIC_NAME</B> String => the name which uniquely identifies
|
|
3316 |
* this function within its schema. This is a user specified, or DBMS
|
|
3317 |
* generated, name that may be different then the <code>FUNCTION_NAME</code>
|
|
3318 |
* for example with overload functions
|
|
3319 |
* </OL>
|
|
3320 |
* <p>
|
|
3321 |
* A user may not have permission to execute any of the functions that are
|
|
3322 |
* returned by <code>getFunctions</code>
|
|
3323 |
*
|
|
3324 |
* @param catalog a catalog name; must match the catalog name as it
|
|
3325 |
* is stored in the database; "" retrieves those without a catalog;
|
|
3326 |
* <code>null</code> means that the catalog name should not be used to narrow
|
|
3327 |
* the search
|
|
3328 |
* @param schemaPattern a schema name pattern; must match the schema name
|
|
3329 |
* as it is stored in the database; "" retrieves those without a schema;
|
|
3330 |
* <code>null</code> means that the schema name should not be used to narrow
|
|
3331 |
* the search
|
|
3332 |
* @param functionNamePattern a function name pattern; must match the
|
|
3333 |
* function name as it is stored in the database
|
|
3334 |
* @return <code>ResultSet</code> - each row is a function description
|
|
3335 |
* @exception SQLException if a database access error occurs
|
|
3336 |
* @see #getSearchStringEscape
|
|
3337 |
* @since 1.6
|
|
3338 |
*/
|
|
3339 |
ResultSet getFunctions(String catalog, String schemaPattern,
|
|
3340 |
String functionNamePattern) throws SQLException;
|
|
3341 |
/**
|
|
3342 |
* Retrieves a description of the given catalog's system or user
|
|
3343 |
* function parameters and return type.
|
|
3344 |
*
|
|
3345 |
* <P>Only descriptions matching the schema, function and
|
|
3346 |
* parameter name criteria are returned. They are ordered by
|
|
3347 |
* <code>FUNCTION_CAT</code>, <code>FUNCTION_SCHEM</code>,
|
|
3348 |
* <code>FUNCTION_NAME</code> and
|
|
3349 |
* <code>SPECIFIC_ NAME</code>. Within this, the return value,
|
|
3350 |
* if any, is first. Next are the parameter descriptions in call
|
|
3351 |
* order. The column descriptions follow in column number order.
|
|
3352 |
*
|
|
3353 |
* <P>Each row in the <code>ResultSet</code>
|
|
3354 |
* is a parameter description, column description or
|
|
3355 |
* return type description with the following fields:
|
|
3356 |
* <OL>
|
|
3357 |
* <LI><B>FUNCTION_CAT</B> String => function catalog (may be <code>null</code>)
|
|
3358 |
* <LI><B>FUNCTION_SCHEM</B> String => function schema (may be <code>null</code>)
|
|
3359 |
* <LI><B>FUNCTION_NAME</B> String => function name. This is the name
|
|
3360 |
* used to invoke the function
|
|
3361 |
* <LI><B>COLUMN_NAME</B> String => column/parameter name
|
|
3362 |
* <LI><B>COLUMN_TYPE</B> Short => kind of column/parameter:
|
|
3363 |
* <UL>
|
|
3364 |
* <LI> functionColumnUnknown - nobody knows
|
|
3365 |
* <LI> functionColumnIn - IN parameter
|
|
3366 |
* <LI> functionColumnInOut - INOUT parameter
|
|
3367 |
* <LI> functionColumnOut - OUT parameter
|
|
3368 |
* <LI> functionColumnReturn - function return value
|
|
3369 |
* <LI> functionColumnResult - Indicates that the parameter or column
|
|
3370 |
* is a column in the <code>ResultSet</code>
|
|
3371 |
* </UL>
|
|
3372 |
* <LI><B>DATA_TYPE</B> int => SQL type from java.sql.Types
|
|
3373 |
* <LI><B>TYPE_NAME</B> String => SQL type name, for a UDT type the
|
|
3374 |
* type name is fully qualified
|
|
3375 |
* <LI><B>PRECISION</B> int => precision
|
|
3376 |
* <LI><B>LENGTH</B> int => length in bytes of data
|
|
3377 |
* <LI><B>SCALE</B> short => scale - null is returned for data types where
|
|
3378 |
* SCALE is not applicable.
|
|
3379 |
* <LI><B>RADIX</B> short => radix
|
|
3380 |
* <LI><B>NULLABLE</B> short => can it contain NULL.
|
|
3381 |
* <UL>
|
|
3382 |
* <LI> functionNoNulls - does not allow NULL values
|
|
3383 |
* <LI> functionNullable - allows NULL values
|
|
3384 |
* <LI> functionNullableUnknown - nullability unknown
|
|
3385 |
* </UL>
|
|
3386 |
* <LI><B>REMARKS</B> String => comment describing column/parameter
|
|
3387 |
* <LI><B>CHAR_OCTET_LENGTH</B> int => the maximum length of binary
|
|
3388 |
* and character based parameters or columns. For any other datatype the returned value
|
|
3389 |
* is a NULL
|
|
3390 |
* <LI><B>ORDINAL_POSITION</B> int => the ordinal position, starting
|
|
3391 |
* from 1, for the input and output parameters. A value of 0
|
|
3392 |
* is returned if this row describes the function's return value.
|
|
3393 |
* For result set columns, it is the
|
|
3394 |
* ordinal position of the column in the result set starting from 1.
|
|
3395 |
* <LI><B>IS_NULLABLE</B> String => ISO rules are used to determine
|
|
3396 |
* the nullability for a parameter or column.
|
|
3397 |
* <UL>
|
|
3398 |
* <LI> YES --- if the parameter or column can include NULLs
|
|
3399 |
* <LI> NO --- if the parameter or column cannot include NULLs
|
|
3400 |
* <LI> empty string --- if the nullability for the
|
|
3401 |
* parameter or column is unknown
|
|
3402 |
* </UL>
|
|
3403 |
* <LI><B>SPECIFIC_NAME</B> String => the name which uniquely identifies
|
|
3404 |
* this function within its schema. This is a user specified, or DBMS
|
|
3405 |
* generated, name that may be different then the <code>FUNCTION_NAME</code>
|
|
3406 |
* for example with overload functions
|
|
3407 |
* </OL>
|
|
3408 |
*
|
|
3409 |
* <p>The PRECISION column represents the specified column size for the given
|
|
3410 |
* parameter or column.
|
|
3411 |
* For numeric data, this is the maximum precision. For character data, this is the length in characters.
|
|
3412 |
* For datetime datatypes, this is the length in characters of the String representation (assuming the
|
|
3413 |
* maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype,
|
|
3414 |
* this is the length in bytes. Null is returned for data types where the
|
|
3415 |
* column size is not applicable.
|
|
3416 |
* @param catalog a catalog name; must match the catalog name as it
|
|
3417 |
* is stored in the database; "" retrieves those without a catalog;
|
|
3418 |
* <code>null</code> means that the catalog name should not be used to narrow
|
|
3419 |
* the search
|
|
3420 |
* @param schemaPattern a schema name pattern; must match the schema name
|
|
3421 |
* as it is stored in the database; "" retrieves those without a schema;
|
|
3422 |
* <code>null</code> means that the schema name should not be used to narrow
|
|
3423 |
* the search
|
|
3424 |
* @param functionNamePattern a procedure name pattern; must match the
|
|
3425 |
* function name as it is stored in the database
|
|
3426 |
* @param columnNamePattern a parameter name pattern; must match the
|
|
3427 |
* parameter or column name as it is stored in the database
|
|
3428 |
* @return <code>ResultSet</code> - each row describes a
|
|
3429 |
* user function parameter, column or return type
|
|
3430 |
*
|
|
3431 |
* @exception SQLException if a database access error occurs
|
|
3432 |
* @see #getSearchStringEscape
|
|
3433 |
* @since 1.6
|
|
3434 |
*/
|
|
3435 |
ResultSet getFunctionColumns(String catalog,
|
|
3436 |
String schemaPattern,
|
|
3437 |
String functionNamePattern,
|
|
3438 |
String columnNamePattern) throws SQLException;
|
|
3439 |
|
|
3440 |
|
|
3441 |
/**
|
|
3442 |
* Indicates that type of the parameter or column is unknown.
|
|
3443 |
* <P>
|
|
3444 |
* A possible value for the column
|
|
3445 |
* <code>COLUMN_TYPE</code>
|
|
3446 |
* in the <code>ResultSet</code>
|
|
3447 |
* returned by the method <code>getFunctionColumns</code>.
|
|
3448 |
*/
|
|
3449 |
int functionColumnUnknown = 0;
|
|
3450 |
|
|
3451 |
/**
|
|
3452 |
* Indicates that the parameter or column is an IN parameter.
|
|
3453 |
* <P>
|
|
3454 |
* A possible value for the column
|
|
3455 |
* <code>COLUMN_TYPE</code>
|
|
3456 |
* in the <code>ResultSet</code>
|
|
3457 |
* returned by the method <code>getFunctionColumns</code>.
|
|
3458 |
* @since 1.6
|
|
3459 |
*/
|
|
3460 |
int functionColumnIn = 1;
|
|
3461 |
|
|
3462 |
/**
|
|
3463 |
* Indicates that the parameter or column is an INOUT parameter.
|
|
3464 |
* <P>
|
|
3465 |
* A possible value for the column
|
|
3466 |
* <code>COLUMN_TYPE</code>
|
|
3467 |
* in the <code>ResultSet</code>
|
|
3468 |
* returned by the method <code>getFunctionColumns</code>.
|
|
3469 |
* @since 1.6
|
|
3470 |
*/
|
|
3471 |
int functionColumnInOut = 2;
|
|
3472 |
|
|
3473 |
/**
|
|
3474 |
* Indicates that the parameter or column is an OUT parameter.
|
|
3475 |
* <P>
|
|
3476 |
* A possible value for the column
|
|
3477 |
* <code>COLUMN_TYPE</code>
|
|
3478 |
* in the <code>ResultSet</code>
|
|
3479 |
* returned by the method <code>getFunctionColumns</code>.
|
|
3480 |
* @since 1.6
|
|
3481 |
*/
|
|
3482 |
int functionColumnOut = 3;
|
|
3483 |
/**
|
|
3484 |
* Indicates that the parameter or column is a return value.
|
|
3485 |
* <P>
|
|
3486 |
* A possible value for the column
|
|
3487 |
* <code>COLUMN_TYPE</code>
|
|
3488 |
* in the <code>ResultSet</code>
|
|
3489 |
* returned by the method <code>getFunctionColumns</code>.
|
|
3490 |
* @since 1.6
|
|
3491 |
*/
|
|
3492 |
int functionReturn = 4;
|
|
3493 |
|
|
3494 |
/**
|
|
3495 |
* Indicates that the parameter or column is a column in a result set.
|
|
3496 |
* <P>
|
|
3497 |
* A possible value for the column
|
|
3498 |
* <code>COLUMN_TYPE</code>
|
|
3499 |
* in the <code>ResultSet</code>
|
|
3500 |
* returned by the method <code>getFunctionColumns</code>.
|
|
3501 |
* @since 1.6
|
|
3502 |
*/
|
|
3503 |
int functionColumnResult = 5;
|
|
3504 |
|
|
3505 |
|
|
3506 |
/**
|
|
3507 |
* Indicates that <code>NULL</code> values are not allowed.
|
|
3508 |
* <P>
|
|
3509 |
* A possible value for the column
|
|
3510 |
* <code>NULLABLE</code>
|
|
3511 |
* in the <code>ResultSet</code> object
|
|
3512 |
* returned by the method <code>getFunctionColumns</code>.
|
|
3513 |
* @since 1.6
|
|
3514 |
*/
|
|
3515 |
int functionNoNulls = 0;
|
|
3516 |
|
|
3517 |
/**
|
|
3518 |
* Indicates that <code>NULL</code> values are allowed.
|
|
3519 |
* <P>
|
|
3520 |
* A possible value for the column
|
|
3521 |
* <code>NULLABLE</code>
|
|
3522 |
* in the <code>ResultSet</code> object
|
|
3523 |
* returned by the method <code>getFunctionColumns</code>.
|
|
3524 |
* @since 1.6
|
|
3525 |
*/
|
|
3526 |
int functionNullable = 1;
|
|
3527 |
|
|
3528 |
/**
|
|
3529 |
* Indicates that whether <code>NULL</code> values are allowed
|
|
3530 |
* is unknown.
|
|
3531 |
* <P>
|
|
3532 |
* A possible value for the column
|
|
3533 |
* <code>NULLABLE</code>
|
|
3534 |
* in the <code>ResultSet</code> object
|
|
3535 |
* returned by the method <code>getFunctionColumns</code>.
|
|
3536 |
* @since 1.6
|
|
3537 |
*/
|
|
3538 |
int functionNullableUnknown = 2;
|
|
3539 |
|
|
3540 |
/**
|
|
3541 |
* Indicates that it is not known whether the function returns
|
|
3542 |
* a result or a table.
|
|
3543 |
* <P>
|
|
3544 |
* A possible value for column <code>FUNCTION_TYPE</code> in the
|
|
3545 |
* <code>ResultSet</code> object returned by the method
|
|
3546 |
* <code>getFunctions</code>.
|
|
3547 |
* @since 1.6
|
|
3548 |
*/
|
|
3549 |
int functionResultUnknown = 0;
|
|
3550 |
|
|
3551 |
/**
|
|
3552 |
* Indicates that the function does not return a table.
|
|
3553 |
* <P>
|
|
3554 |
* A possible value for column <code>FUNCTION_TYPE</code> in the
|
|
3555 |
* <code>ResultSet</code> object returned by the method
|
|
3556 |
* <code>getFunctions</code>.
|
|
3557 |
* @since 1.6
|
|
3558 |
*/
|
|
3559 |
int functionNoTable = 1;
|
|
3560 |
|
|
3561 |
/**
|
|
3562 |
* Indicates that the function returns a table.
|
|
3563 |
* <P>
|
|
3564 |
* A possible value for column <code>FUNCTION_TYPE</code> in the
|
|
3565 |
* <code>ResultSet</code> object returned by the method
|
|
3566 |
* <code>getFunctions</code>.
|
|
3567 |
* @since 1.6
|
|
3568 |
*/
|
|
3569 |
int functionReturnsTable = 2;
|
|
3570 |
|
|
3571 |
}
|