in kyuubi-hive-beeline/src/main/java/org/apache/hive/beeline/Commands.java [492:638]
public boolean dbinfo(String line) {
if (!(beeLine.assertConnection())) {
return false;
}
beeLine.showWarnings();
int padlen = 50;
String[] m =
new String[] {
"allProceduresAreCallable",
"allTablesAreSelectable",
"dataDefinitionCausesTransactionCommit",
"dataDefinitionIgnoredInTransactions",
"doesMaxRowSizeIncludeBlobs",
"getCatalogSeparator",
"getCatalogTerm",
"getDatabaseProductName",
"getDatabaseProductVersion",
"getDefaultTransactionIsolation",
"getDriverMajorVersion",
"getDriverMinorVersion",
"getDriverName",
"getDriverVersion",
"getExtraNameCharacters",
"getIdentifierQuoteString",
"getMaxBinaryLiteralLength",
"getMaxCatalogNameLength",
"getMaxCharLiteralLength",
"getMaxColumnNameLength",
"getMaxColumnsInGroupBy",
"getMaxColumnsInIndex",
"getMaxColumnsInOrderBy",
"getMaxColumnsInSelect",
"getMaxColumnsInTable",
"getMaxConnections",
"getMaxCursorNameLength",
"getMaxIndexLength",
"getMaxProcedureNameLength",
"getMaxRowSize",
"getMaxSchemaNameLength",
"getMaxStatementLength",
"getMaxStatements",
"getMaxTableNameLength",
"getMaxTablesInSelect",
"getMaxUserNameLength",
"getNumericFunctions",
"getProcedureTerm",
"getSchemaTerm",
"getSearchStringEscape",
"getSQLKeywords",
"getStringFunctions",
"getSystemFunctions",
"getTimeDateFunctions",
"getURL",
"getUserName",
"isCatalogAtStart",
"isReadOnly",
"nullPlusNonNullIsNull",
"nullsAreSortedAtEnd",
"nullsAreSortedAtStart",
"nullsAreSortedHigh",
"nullsAreSortedLow",
"storesLowerCaseIdentifiers",
"storesLowerCaseQuotedIdentifiers",
"storesMixedCaseIdentifiers",
"storesMixedCaseQuotedIdentifiers",
"storesUpperCaseIdentifiers",
"storesUpperCaseQuotedIdentifiers",
"supportsAlterTableWithAddColumn",
"supportsAlterTableWithDropColumn",
"supportsANSI92EntryLevelSQL",
"supportsANSI92FullSQL",
"supportsANSI92IntermediateSQL",
"supportsBatchUpdates",
"supportsCatalogsInDataManipulation",
"supportsCatalogsInIndexDefinitions",
"supportsCatalogsInPrivilegeDefinitions",
"supportsCatalogsInProcedureCalls",
"supportsCatalogsInTableDefinitions",
"supportsColumnAliasing",
"supportsConvert",
"supportsCoreSQLGrammar",
"supportsCorrelatedSubqueries",
"supportsDataDefinitionAndDataManipulationTransactions",
"supportsDataManipulationTransactionsOnly",
"supportsDifferentTableCorrelationNames",
"supportsExpressionsInOrderBy",
"supportsExtendedSQLGrammar",
"supportsFullOuterJoins",
"supportsGroupBy",
"supportsGroupByBeyondSelect",
"supportsGroupByUnrelated",
"supportsIntegrityEnhancementFacility",
"supportsLikeEscapeClause",
"supportsLimitedOuterJoins",
"supportsMinimumSQLGrammar",
"supportsMixedCaseIdentifiers",
"supportsMixedCaseQuotedIdentifiers",
"supportsMultipleResultSets",
"supportsMultipleTransactions",
"supportsNonNullableColumns",
"supportsOpenCursorsAcrossCommit",
"supportsOpenCursorsAcrossRollback",
"supportsOpenStatementsAcrossCommit",
"supportsOpenStatementsAcrossRollback",
"supportsOrderByUnrelated",
"supportsOuterJoins",
"supportsPositionedDelete",
"supportsPositionedUpdate",
"supportsSchemasInDataManipulation",
"supportsSchemasInIndexDefinitions",
"supportsSchemasInPrivilegeDefinitions",
"supportsSchemasInProcedureCalls",
"supportsSchemasInTableDefinitions",
"supportsSelectForUpdate",
"supportsStoredProcedures",
"supportsSubqueriesInComparisons",
"supportsSubqueriesInExists",
"supportsSubqueriesInIns",
"supportsSubqueriesInQuantifieds",
"supportsTableCorrelationNames",
"supportsTransactions",
"supportsUnion",
"supportsUnionAll",
"usesLocalFilePerTable",
"usesLocalFiles",
};
for (int i = 0; i < m.length; i++) {
try {
beeLine.output(
beeLine
.getColorBuffer()
.pad(m[i], padlen)
.append(
""
+ beeLine
.getReflector()
.invoke(beeLine.getDatabaseMetaData(), m[i], new Object[0])));
} catch (Exception e) {
beeLine.output(beeLine.getColorBuffer().pad(m[i], padlen), false);
beeLine.handleException(e);
}
}
return true;
}