📄 databasemetadata.java
字号:
}
/**
* Can a schema name be used in an index definition statement?
*
* @return true if so
*/
public boolean supportsSchemasInIndexDefinitions() throws java.sql.SQLException
{
return false;
}
/**
* Can a schema name be used in a privilege definition statement?
*
* @return true if so
*/
public boolean supportsSchemasInPrivilegeDefinitions()
throws java.sql.SQLException
{
return false;
}
/**
* Can a catalog name be used in a data manipulation statement?
*
* @return true if so
*/
public boolean supportsCatalogsInDataManipulation()
throws java.sql.SQLException
{
// Servers before 3.22 could not do this
if (_conn.getServerMajorVersion() >= 3)
{ // newer than version 3?
if (_conn.getServerMajorVersion() == 3)
{
if (_conn.getServerMinorVersion() >= 22)
{ // minor 22?
return true;
}
else
{
return false; // Old version 3
}
}
else
{
return true; // newer than version 3.22
}
}
else
{
return false; // older than version 3
}
}
/**
* Can a catalog name be used in a procedure call statement?
*
* @return true if so
*/
public boolean supportsCatalogsInProcedureCalls() throws java.sql.SQLException
{
return false;
}
/**
* Can a catalog name be used in a table definition statement?
*
* @return true if so
*/
public boolean supportsCatalogsInTableDefinitions()
throws java.sql.SQLException
{
return false;
}
/**
* Can a catalog name be used in a index definition statement?
*
* @return true if so
*/
public boolean supportsCatalogsInIndexDefinitions()
throws java.sql.SQLException
{
return false;
}
/**
* Can a catalog name be used in a privilege definition statement?
*
* @return true if so
*/
public boolean supportsCatalogsInPrivilegeDefinitions()
throws java.sql.SQLException
{
return false;
}
/**
* Is positioned DELETE supported?
*
* @return true if so
*/
public boolean supportsPositionedDelete() throws java.sql.SQLException
{
return false;
}
/**
* Is positioned UPDATE supported?
*
* @return true if so
*/
public boolean supportsPositionedUpdate() throws java.sql.SQLException
{
return false;
}
/**
* Is SELECT for UPDATE supported?
*
* @return true if so
*/
public boolean supportsSelectForUpdate() throws java.sql.SQLException
{
return false;
}
/**
* Are stored procedure calls using the stored procedure escape
* syntax supported?
*
* @return true if so
*/
public boolean supportsStoredProcedures() throws java.sql.SQLException
{
return false;
}
/**
* Are subqueries in comparison expressions supported?
*
* A JDBC compliant driver always returns true.
*
* @return true if so
*/
public boolean supportsSubqueriesInComparisons() throws java.sql.SQLException
{
return true; // not sure
}
/**
* Are subqueries in exists expressions supported?
*
* A JDBC compliant driver always returns true.
*
* @return true if so
*/
public boolean supportsSubqueriesInExists() throws java.sql.SQLException
{
return false; // no sub-queries yet
}
/**
* Are subqueries in "in" statements supported?
*
* A JDBC compliant driver always returns true.
*
* @return true if so
*/
public boolean supportsSubqueriesInIns() throws java.sql.SQLException
{
return false; // no sub-queries yet
}
/**
* Are subqueries in quantified expressions supported?
*
* A JDBC compliant driver always returns true.
*
* @return true if so
*/
public boolean supportsSubqueriesInQuantifieds() throws java.sql.SQLException
{
return false; // no sub-queries yet
}
/**
* Are correlated subqueries supported?
*
* A JDBC compliant driver always returns true.
*
* @return true if so
*/
public boolean supportsCorrelatedSubqueries() throws java.sql.SQLException
{
return false; // no sub-queries yet
}
/**
* Is SQL UNION supported?
*
* A JDBC compliant driver always returns true.
*
* @return true if so
*/
public boolean supportsUnion() throws java.sql.SQLException
{
return _conn._io.versionMeetsMinimum(4, 0, 0);
}
/**
* Is SQL UNION ALL supported?
*
* A JDBC compliant driver always returns true.
*
* @return true if so
*/
public boolean supportsUnionAll() throws java.sql.SQLException
{
return _conn._io.versionMeetsMinimum(4, 0, 0);
}
/**
* Can cursors remain open across commits?
*
* @return true if so
* @see Connection#disableAutoClose
*/
public boolean supportsOpenCursorsAcrossCommit() throws java.sql.SQLException
{
return false;
}
/**
* Can cursors remain open across rollbacks?
*
* @return true if so
* @see Connection#disableAutoClose
*/
public boolean supportsOpenCursorsAcrossRollback() throws java.sql.SQLException
{
return false;
}
/**
* Can statements remain open across commits?
*
* @return true if so
* @see Connection#disableAutoClose
*/
public boolean supportsOpenStatementsAcrossCommit()
throws java.sql.SQLException
{
return false;
}
/**
* Can statements remain open across rollbacks?
*
* @return true if so
* @see Connection#disableAutoClose
*/
public boolean supportsOpenStatementsAcrossRollback()
throws java.sql.SQLException
{
return false;
}
//----------------------------------------------------------------------
// The following group of methods exposes various limitations
// based on the target database with the current driver.
// Unless otherwise specified, a result of zero means there is no
// limit, or the limit is not known.
/**
* How many hex characters can you have in an inline binary literal?
*
* @return max literal length
*/
public int getMaxBinaryLiteralLength() throws java.sql.SQLException
{
return 16777208;
}
/**
* What's the max length for a character literal?
*
* @return max literal length
*/
public int getMaxCharLiteralLength() throws java.sql.SQLException
{
return 16777208;
}
/**
* What's the limit on column name length?
*
* @return max literal length
*/
public int getMaxColumnNameLength() throws java.sql.SQLException
{
return 64;
}
/**
* What's the maximum number of columns in a "GROUP BY" clause?
*
* @return max number of columns
*/
public int getMaxColumnsInGroupBy() throws java.sql.SQLException
{
return 16;
}
/**
* What's the maximum number of columns allowed in an index?
*
* @return max columns
*/
public int getMaxColumnsInIndex() throws java.sql.SQLException
{
return 16;
}
/**
* What's the maximum number of columns in an "ORDER BY" clause?
*
* @return max columns
*/
public int getMaxColumnsInOrderBy() throws java.sql.SQLException
{
return 16;
}
/**
* What's the maximum number of columns in a "SELECT" list?
*
* @return max columns
*/
public int getMaxColumnsInSelect() throws java.sql.SQLException
{
return 256;
}
/**
* What's maximum number of columns in a table?
*
* @return max columns
*/
public int getMaxColumnsInTable() throws java.sql.SQLException
{
return 512;
}
/**
* How many active connections can we have at a time to this database?
*
* @return max connections
*/
public int getMaxConnections() throws java.sql.SQLException
{
return 0;
}
/**
* What's the maximum cursor name length?
*
* @return max cursor name length in bytes
*/
public int getMaxCursorNameLength() throws java.sql.SQLException
{
return 64;
}
/**
* What's the maximum length of an index (in bytes)?
*
* @return max index length in bytes
*/
public int getMaxIndexLength() throws java.sql.SQLException
{
return 128;
}
/**
* What's the maximum length allowed for a schema name?
*
* @return max name length in bytes
*/
public int getMaxSchemaNameLength() throws java.sql.SQLException
{
return 0;
}
/**
* What's the maximum length of a procedure name?
*
* @return max name length in bytes
*/
public int getMaxProcedureNameLength() throws java.sql.SQLException
{
return 0;
}
/**
* What's the maximum length of a catalog name?
*
* @return max name length in bytes
*/
public int getMaxCatalogNameLength() throws java.sql.SQLException
{
return 32;
}
/**
* What's the maximum length of a single row?
*
* @return max row size in bytes
*/
public int getMaxRowSize() throws java.sql.SQLException
{
return Integer.MAX_VALUE - 8; // Max buffer size - HEADER
}
/**
* Did getMaxRowSize() include LONGVARCHAR and LONGVARBINARY
* blobs?
*
* @return true if so
*/
public boolean doesMaxRowSizeIncludeBlobs() throws java.sql.SQLException
{
return true;
}
/**
* What's the maximum length of a SQL statement?
*
* @return max length in bytes
*/
public int getMaxStatementLength() throws java.sql.SQLException
{
return MysqlIO.MAXBUF - 4; // Max buffer - header
}
/**
* How many active statements can we have open at one time to this
* database?
*
* @return the maximum
*/
public int getMaxStatements() throws java.sql.SQLException
{
return 0;
}
/**
* What's the maximum length of a table name?
*
* @return max name length in bytes
*/
public int getMaxTableNameLength() throws java.sql.SQLException
{
return 64;
}
/**
* What's the maximum number of tables in a SELECT?
*
* @return the maximum
*/
public int getMaxTablesInSelect() throws java.sql.SQLException
{
return 256;
}
/**
* What's the maximum length of a user name?
*
* @return max name length in bytes
*/
public int getMaxUserNameLength() throws java.sql.SQLException
{
return 16;
}
//----------------------------------------------------------------------
/**
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -