View Javadoc

1   /*
2    * Copyright (c) 2010.  The Apache Software Foundation
3    *
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *     http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing, software
15   * distributed under the License is distributed on an "AS IS" BASIS,
16   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17   * See the License for the specific language governing permissions and
18   * limitations under the License.
19   */
20  
21  package org.apache.hadoop.hbase.jdbc.impl;
22  
23  import java.sql.Connection;
24  import java.sql.DatabaseMetaData;
25  import java.sql.ResultSet;
26  import java.sql.RowIdLifetime;
27  import java.sql.SQLException;
28  
29  public class DatabaseMetaDataImpl implements DatabaseMetaData {
30  
31      public boolean allProceduresAreCallable() throws SQLException {
32          return false;
33      }
34  
35      public boolean allTablesAreSelectable() throws SQLException {
36          return true;
37      }
38  
39      public String getURL() throws SQLException {
40          return null;
41      }
42  
43      public String getUserName() throws SQLException {
44          return null;
45      }
46  
47      public boolean isReadOnly() throws SQLException {
48          return false;
49      }
50  
51      public boolean nullsAreSortedHigh() throws SQLException {
52          return false;
53      }
54  
55      public boolean nullsAreSortedLow() throws SQLException {
56          return false;
57      }
58  
59      public boolean nullsAreSortedAtStart() throws SQLException {
60          return false;
61      }
62  
63      public boolean nullsAreSortedAtEnd() throws SQLException {
64          return false;
65      }
66  
67      public String getDatabaseProductName() throws SQLException {
68          return "HBase";
69      }
70  
71      public String getDatabaseProductVersion() throws SQLException {
72          return "0.20.4";
73      }
74  
75      public String getDriverName() throws SQLException {
76          return "jdbc:hbql";
77      }
78  
79      public String getDriverVersion() throws SQLException {
80          return "0.9.27-alpha";
81      }
82  
83      public int getDriverMajorVersion() {
84          return 0;
85      }
86  
87      public int getDriverMinorVersion() {
88          return 9;
89      }
90  
91      public boolean usesLocalFiles() throws SQLException {
92          return false;
93      }
94  
95      public boolean usesLocalFilePerTable() throws SQLException {
96          return false;
97      }
98  
99      public boolean supportsMixedCaseIdentifiers() throws SQLException {
100         return false;
101     }
102 
103     public boolean storesUpperCaseIdentifiers() throws SQLException {
104         return false;
105     }
106 
107     public boolean storesLowerCaseIdentifiers() throws SQLException {
108         return false;
109     }
110 
111     public boolean storesMixedCaseIdentifiers() throws SQLException {
112         return false;
113     }
114 
115     public boolean supportsMixedCaseQuotedIdentifiers() throws SQLException {
116         return false;
117     }
118 
119     public boolean storesUpperCaseQuotedIdentifiers() throws SQLException {
120         return false;
121     }
122 
123     public boolean storesLowerCaseQuotedIdentifiers() throws SQLException {
124         return false;
125     }
126 
127     public boolean storesMixedCaseQuotedIdentifiers() throws SQLException {
128         return false;
129     }
130 
131     public String getIdentifierQuoteString() throws SQLException {
132         return null;
133     }
134 
135     public String getSQLKeywords() throws SQLException {
136         return null;
137     }
138 
139     public String getNumericFunctions() throws SQLException {
140         return null;
141     }
142 
143     public String getStringFunctions() throws SQLException {
144         return null;
145     }
146 
147     public String getSystemFunctions() throws SQLException {
148         return null;
149     }
150 
151     public String getTimeDateFunctions() throws SQLException {
152         return null;
153     }
154 
155     public String getSearchStringEscape() throws SQLException {
156         return null;
157     }
158 
159     public String getExtraNameCharacters() throws SQLException {
160         return null;
161     }
162 
163     public boolean supportsAlterTableWithAddColumn() throws SQLException {
164         return false;
165     }
166 
167     public boolean supportsAlterTableWithDropColumn() throws SQLException {
168         return false;
169     }
170 
171     public boolean supportsColumnAliasing() throws SQLException {
172         return true;
173     }
174 
175     public boolean nullPlusNonNullIsNull() throws SQLException {
176         return false;
177     }
178 
179     public boolean supportsConvert() throws SQLException {
180         return false;
181     }
182 
183     public boolean supportsConvert(final int i, final int i1) throws SQLException {
184         return false;
185     }
186 
187     public boolean supportsTableCorrelationNames() throws SQLException {
188         return false;
189     }
190 
191     public boolean supportsDifferentTableCorrelationNames() throws SQLException {
192         return false;
193     }
194 
195     public boolean supportsExpressionsInOrderBy() throws SQLException {
196         return false;
197     }
198 
199     public boolean supportsOrderByUnrelated() throws SQLException {
200         return false;
201     }
202 
203     public boolean supportsGroupBy() throws SQLException {
204         return false;
205     }
206 
207     public boolean supportsGroupByUnrelated() throws SQLException {
208         return false;
209     }
210 
211     public boolean supportsGroupByBeyondSelect() throws SQLException {
212         return false;
213     }
214 
215     public boolean supportsLikeEscapeClause() throws SQLException {
216         return false;
217     }
218 
219     public boolean supportsMultipleResultSets() throws SQLException {
220         return false;
221     }
222 
223     public boolean supportsMultipleTransactions() throws SQLException {
224         return false;
225     }
226 
227     public boolean supportsNonNullableColumns() throws SQLException {
228         return false;
229     }
230 
231     public boolean supportsMinimumSQLGrammar() throws SQLException {
232         return false;
233     }
234 
235     public boolean supportsCoreSQLGrammar() throws SQLException {
236         return false;
237     }
238 
239     public boolean supportsExtendedSQLGrammar() throws SQLException {
240         return false;
241     }
242 
243     public boolean supportsANSI92EntryLevelSQL() throws SQLException {
244         return false;
245     }
246 
247     public boolean supportsANSI92IntermediateSQL() throws SQLException {
248         return false;
249     }
250 
251     public boolean supportsANSI92FullSQL() throws SQLException {
252         return false;
253     }
254 
255     public boolean supportsIntegrityEnhancementFacility() throws SQLException {
256         return false;
257     }
258 
259     public boolean supportsOuterJoins() throws SQLException {
260         return false;
261     }
262 
263     public boolean supportsFullOuterJoins() throws SQLException {
264         return false;
265     }
266 
267     public boolean supportsLimitedOuterJoins() throws SQLException {
268         return false;
269     }
270 
271     public String getSchemaTerm() throws SQLException {
272         return null;
273     }
274 
275     public String getProcedureTerm() throws SQLException {
276         return null;
277     }
278 
279     public String getCatalogTerm() throws SQLException {
280         return null;
281     }
282 
283     public boolean isCatalogAtStart() throws SQLException {
284         return false;
285     }
286 
287     public String getCatalogSeparator() throws SQLException {
288         return null;
289     }
290 
291     public boolean supportsSchemasInDataManipulation() throws SQLException {
292         return false;
293     }
294 
295     public boolean supportsSchemasInProcedureCalls() throws SQLException {
296         return false;
297     }
298 
299     public boolean supportsSchemasInTableDefinitions() throws SQLException {
300         return false;
301     }
302 
303     public boolean supportsSchemasInIndexDefinitions() throws SQLException {
304         return false;
305     }
306 
307     public boolean supportsSchemasInPrivilegeDefinitions() throws SQLException {
308         return false;
309     }
310 
311     public boolean supportsCatalogsInDataManipulation() throws SQLException {
312         return false;
313     }
314 
315     public boolean supportsCatalogsInProcedureCalls() throws SQLException {
316         return false;
317     }
318 
319     public boolean supportsCatalogsInTableDefinitions() throws SQLException {
320         return false;
321     }
322 
323     public boolean supportsCatalogsInIndexDefinitions() throws SQLException {
324         return false;
325     }
326 
327     public boolean supportsCatalogsInPrivilegeDefinitions() throws SQLException {
328         return false;
329     }
330 
331     public boolean supportsPositionedDelete() throws SQLException {
332         return false;
333     }
334 
335     public boolean supportsPositionedUpdate() throws SQLException {
336         return false;
337     }
338 
339     public boolean supportsSelectForUpdate() throws SQLException {
340         return false;
341     }
342 
343     public boolean supportsStoredProcedures() throws SQLException {
344         return false;
345     }
346 
347     public boolean supportsSubqueriesInComparisons() throws SQLException {
348         return false;
349     }
350 
351     public boolean supportsSubqueriesInExists() throws SQLException {
352         return false;
353     }
354 
355     public boolean supportsSubqueriesInIns() throws SQLException {
356         return false;
357     }
358 
359     public boolean supportsSubqueriesInQuantifieds() throws SQLException {
360         return false;
361     }
362 
363     public boolean supportsCorrelatedSubqueries() throws SQLException {
364         return false;
365     }
366 
367     public boolean supportsUnion() throws SQLException {
368         return false;
369     }
370 
371     public boolean supportsUnionAll() throws SQLException {
372         return false;
373     }
374 
375     public boolean supportsOpenCursorsAcrossCommit() throws SQLException {
376         return false;
377     }
378 
379     public boolean supportsOpenCursorsAcrossRollback() throws SQLException {
380         return false;
381     }
382 
383     public boolean supportsOpenStatementsAcrossCommit() throws SQLException {
384         return false;
385     }
386 
387     public boolean supportsOpenStatementsAcrossRollback() throws SQLException {
388         return false;
389     }
390 
391     public int getMaxBinaryLiteralLength() throws SQLException {
392         return 0;
393     }
394 
395     public int getMaxCharLiteralLength() throws SQLException {
396         return 0;
397     }
398 
399     public int getMaxColumnNameLength() throws SQLException {
400         return 0;
401     }
402 
403     public int getMaxColumnsInGroupBy() throws SQLException {
404         return 0;
405     }
406 
407     public int getMaxColumnsInIndex() throws SQLException {
408         return 0;
409     }
410 
411     public int getMaxColumnsInOrderBy() throws SQLException {
412         return 0;
413     }
414 
415     public int getMaxColumnsInSelect() throws SQLException {
416         return 0;
417     }
418 
419     public int getMaxColumnsInTable() throws SQLException {
420         return 0;
421     }
422 
423     public int getMaxConnections() throws SQLException {
424         return 0;
425     }
426 
427     public int getMaxCursorNameLength() throws SQLException {
428         return 0;
429     }
430 
431     public int getMaxIndexLength() throws SQLException {
432         return 0;
433     }
434 
435     public int getMaxSchemaNameLength() throws SQLException {
436         return 0;
437     }
438 
439     public int getMaxProcedureNameLength() throws SQLException {
440         return 0;
441     }
442 
443     public int getMaxCatalogNameLength() throws SQLException {
444         return 0;
445     }
446 
447     public int getMaxRowSize() throws SQLException {
448         return 0;
449     }
450 
451     public boolean doesMaxRowSizeIncludeBlobs() throws SQLException {
452         return false;
453     }
454 
455     public int getMaxStatementLength() throws SQLException {
456         return 0;
457     }
458 
459     public int getMaxStatements() throws SQLException {
460         return 0;
461     }
462 
463     public int getMaxTableNameLength() throws SQLException {
464         return 0;
465     }
466 
467     public int getMaxTablesInSelect() throws SQLException {
468         return 0;
469     }
470 
471     public int getMaxUserNameLength() throws SQLException {
472         return 0;
473     }
474 
475     public int getDefaultTransactionIsolation() throws SQLException {
476         return 0;
477     }
478 
479     public boolean supportsTransactions() throws SQLException {
480         return false;
481     }
482 
483     public boolean supportsTransactionIsolationLevel(final int i) throws SQLException {
484         return false;
485     }
486 
487     public boolean supportsDataDefinitionAndDataManipulationTransactions() throws SQLException {
488         return false;
489     }
490 
491     public boolean supportsDataManipulationTransactionsOnly() throws SQLException {
492         return false;
493     }
494 
495     public boolean dataDefinitionCausesTransactionCommit() throws SQLException {
496         return false;
497     }
498 
499     public boolean dataDefinitionIgnoredInTransactions() throws SQLException {
500         return false;
501     }
502 
503     public ResultSet getProcedures(final String s, final String s1, final String s2) throws SQLException {
504         return null;
505     }
506 
507     public ResultSet getProcedureColumns(final String s, final String s1, final String s2, final String s3) throws SQLException {
508         return null;
509     }
510 
511     public ResultSet getTables(final String s, final String s1, final String s2, final String[] strings) throws SQLException {
512         return null;
513     }
514 
515     public ResultSet getSchemas() throws SQLException {
516         return null;
517     }
518 
519     public ResultSet getCatalogs() throws SQLException {
520         return null;
521     }
522 
523     public ResultSet getTableTypes() throws SQLException {
524         return null;
525     }
526 
527     public ResultSet getColumns(final String s, final String s1, final String s2, final String s3) throws SQLException {
528         return null;
529     }
530 
531     public ResultSet getColumnPrivileges(final String s, final String s1, final String s2, final String s3) throws SQLException {
532         return null;
533     }
534 
535     public ResultSet getTablePrivileges(final String s, final String s1, final String s2) throws SQLException {
536         return null;
537     }
538 
539     public ResultSet getBestRowIdentifier(final String s, final String s1, final String s2, final int i, final boolean b) throws SQLException {
540         return null;
541     }
542 
543     public ResultSet getVersionColumns(final String s, final String s1, final String s2) throws SQLException {
544         return null;
545     }
546 
547     public ResultSet getPrimaryKeys(final String s, final String s1, final String s2) throws SQLException {
548         return null;
549     }
550 
551     public ResultSet getImportedKeys(final String s, final String s1, final String s2) throws SQLException {
552         return null;
553     }
554 
555     public ResultSet getExportedKeys(final String s, final String s1, final String s2) throws SQLException {
556         return null;
557     }
558 
559     public ResultSet getCrossReference(final String s, final String s1, final String s2, final String s3, final String s4, final String s5) throws SQLException {
560         return null;
561     }
562 
563     public ResultSet getTypeInfo() throws SQLException {
564         return null;
565     }
566 
567     public ResultSet getIndexInfo(final String s, final String s1, final String s2, final boolean b, final boolean b1) throws SQLException {
568         return null;
569     }
570 
571     public boolean supportsResultSetType(final int i) throws SQLException {
572         return false;
573     }
574 
575     public boolean supportsResultSetConcurrency(final int i, final int i1) throws SQLException {
576         return false;
577     }
578 
579     public boolean ownUpdatesAreVisible(final int i) throws SQLException {
580         return false;
581     }
582 
583     public boolean ownDeletesAreVisible(final int i) throws SQLException {
584         return false;
585     }
586 
587     public boolean ownInsertsAreVisible(final int i) throws SQLException {
588         return false;
589     }
590 
591     public boolean othersUpdatesAreVisible(final int i) throws SQLException {
592         return false;
593     }
594 
595     public boolean othersDeletesAreVisible(final int i) throws SQLException {
596         return false;
597     }
598 
599     public boolean othersInsertsAreVisible(final int i) throws SQLException {
600         return false;
601     }
602 
603     public boolean updatesAreDetected(final int i) throws SQLException {
604         return false;
605     }
606 
607     public boolean deletesAreDetected(final int i) throws SQLException {
608         return false;
609     }
610 
611     public boolean insertsAreDetected(final int i) throws SQLException {
612         return false;
613     }
614 
615     public boolean supportsBatchUpdates() throws SQLException {
616         return false;
617     }
618 
619     public ResultSet getUDTs(final String s, final String s1, final String s2, final int[] ints) throws SQLException {
620         return null;
621     }
622 
623     public Connection getConnection() throws SQLException {
624         return null;
625     }
626 
627     public boolean supportsSavepoints() throws SQLException {
628         return false;
629     }
630 
631     public boolean supportsNamedParameters() throws SQLException {
632         return false;
633     }
634 
635     public boolean supportsMultipleOpenResults() throws SQLException {
636         return false;
637     }
638 
639     public boolean supportsGetGeneratedKeys() throws SQLException {
640         return false;
641     }
642 
643     public ResultSet getSuperTypes(final String s, final String s1, final String s2) throws SQLException {
644         return null;
645     }
646 
647     public ResultSet getSuperTables(final String s, final String s1, final String s2) throws SQLException {
648         return null;
649     }
650 
651     public ResultSet getAttributes(final String s, final String s1, final String s2, final String s3) throws SQLException {
652         return null;
653     }
654 
655     public boolean supportsResultSetHoldability(final int i) throws SQLException {
656         return false;
657     }
658 
659     public int getResultSetHoldability() throws SQLException {
660         return 0;
661     }
662 
663     public int getDatabaseMajorVersion() throws SQLException {
664         return 0;
665     }
666 
667     public int getDatabaseMinorVersion() throws SQLException {
668         return 0;
669     }
670 
671     public int getJDBCMajorVersion() throws SQLException {
672         return 0;
673     }
674 
675     public int getJDBCMinorVersion() throws SQLException {
676         return 0;
677     }
678 
679     public int getSQLStateType() throws SQLException {
680         return 0;
681     }
682 
683     public boolean locatorsUpdateCopy() throws SQLException {
684         return false;
685     }
686 
687     public boolean supportsStatementPooling() throws SQLException {
688         return false;
689     }
690 
691     public RowIdLifetime getRowIdLifetime() throws SQLException {
692         return null;
693     }
694 
695     public ResultSet getSchemas(final String s, final String s1) throws SQLException {
696         return null;
697     }
698 
699     public boolean supportsStoredFunctionsUsingCallSyntax() throws SQLException {
700         return false;
701     }
702 
703     public boolean autoCommitFailureClosesAllResultSets() throws SQLException {
704         return false;
705     }
706 
707     public ResultSet getClientInfoProperties() throws SQLException {
708         return null;
709     }
710 
711     public ResultSet getFunctions(final String s, final String s1, final String s2) throws SQLException {
712         return null;
713     }
714 
715     public ResultSet getFunctionColumns(final String s, final String s1, final String s2, final String s3) throws SQLException {
716         return null;
717     }
718 
719     public <T> T unwrap(final Class<T> tClass) throws SQLException {
720         return null;
721     }
722 
723     public boolean isWrapperFor(final Class<?> aClass) throws SQLException {
724         return false;
725     }
726 }