sysibm.Metadata 函数是一个 SPL 例程,它可由 GBase Data Server 驱动程序调用,以便 JDBC 和 SQL 应用程序动态检索数据库元数据。Metadata 例程在配置为 DRDA 应用程序服务器的 GBase 8s 实例的每个数据库中自动创建,客户端应用程序必须指定 'sysibm' 为所有者名称以从符合 ANSI 的数据库调用此函数。
它具有以下常规定义:
create procedure sysibm.METADATA() returning integer as allProceduresAreCallable, integer as allTablesAreSelectable, integer as nullsAreSortedHigh, integer as nullsAreSortedLow, integer as nullsAreSortedAtStart, integer as nullsAreSortedAtEnd, integer as usesLocalFiles, integer as usesLocalFilePerTable, integer as storesUpperCaseIdentifiers, integer as storesLowerCaseIdentifiers, integer as storesMixedCaseIdentifiers, integer as storesLowerCaseQuotedIdentifiers, integer as storesMixedCaseQuotedIdentifiers, lvarchar(4096) as getSQLKeywords, varchar(100) as getNumericFunctions, varchar(100) as getStringFunctions, varchar(100) as getSystemFunctions, varchar(100) as getTimeDateFunctions, varchar(25) as getSearchStringEscape, varchar(25) as getExtraNameCharacters, integer as supportsAlterTableWithAddColumn, integer as supportsAlterTableWithDropColumn, integer as supportsConvert, varchar(255) as supportsConvertType, integer as supportsDifferentTableCorrelationNames, integer as supportsExpressionsInOrderBy, integer as supportsOrderByUnrelated, integer as supportsGroupBy, integer as supportsGroupByUnrelated, integer as supportsGroupByBeyondSelect, integer as supportsMultipleResultSets, integer as supportsMultipleTransactions, integer as supportsCoreSQLGrammar, integer as supportsExtendedSQLGrammar, integer as supportsANSI92IntermediateSQL, integer as supportsANSI92FullSQL, integer as supportsIntegrityEnhancementFacility, integer as supportsOuterJoins, integer as supportsFullOuterJoins, integer as supportsLimitedOuterJoins, varchar(50) as getSchemaTerm, varchar(50) as getProcedureTerm, varchar(50) as getCatalogTerm, integer as isCatalogAtStart, varchar(50) as getCatalogSeparator, integer as supportsSchemasInDataManipulation, integer as supportsSchemasInProcedureCalls, integer as supportsSchemasInTableDefinitions, integer as supportsSchemasInIndexDefinitions, integer as supportsSchemasInPrivilegeDefinitions, integer as supportsCatalogsInDataManipulation, integer as supportsCatalogsInProcedureCalls, integer as supportsCatalogsInTableDefinitions, integer as supportsCatalogsInIndexDefinitions, integer as supportsCatalogsInPrivilegeDefinitions, integer as supportsPositionedDelete, integer as supportsPositionedUpdate, integer as supportsSelectForUpdate, integer as supportsStoredProcedures, integer as supportsSubqueriesInComparisons, integer as supportsUnion, integer as supportsUnionAll, integer as supportsOpenCursorsAcrossCommit, integer as supportsOpenCursorsAcrossRollback, integer as supportsOpenStatementsAcrossCommit, integer as supportsOpenStatementsAcrossRollback, integer as getMaxBinaryLiteralLength, integer as getMaxCharLiteralLength, integer as getMaxColumnNameLength, integer as getMaxColumnsInGroupBy, integer as getMaxColumnsInIndex, integer as getMaxColumnsInOrderBy, integer as getMaxColumnsInSelect, integer as getMaxColumnsInTable, integer as getMaxConnections, integer as getMaxCursorNameLength, integer as getMaxIndexLength, integer as getMaxSchemaNameLength, integer as getMaxProcedureNameLength, integer as getMaxCatalogNameLength, integer as getMaxRowSize, integer as doesMaxRowSizeIncludeBlobs, integer as getMaxStatementLength, integer as getMaxStatements, integer as getMaxTableNameLength, integer as getMaxTablesInSelect, integer as getMaxUserNameLength, integer as getDefaultTransactionIsolation, integer as supportsTransactions, varchar(50) as supportsTransactionIsolationLevel, integer as supportsDataDefinitionAndDataManipulationTransactions, integer as supportsDataManipulationTransactionsOnly, integer as dataDefinitionCausesTransactionCommit, integer as dataDefinitionIgnoredInTransactions, varchar(100) as supportsResultSetType, varchar(100) as supportsResultSetConcurrency, varchar(100) as ownUpdatesAreVisible, varchar(100) as ownDeletesAreVisible, varchar(100) as ownInsertsAreVisible, varchar(100) as othersUpdatesAreVisible, varchar(100) as othersDeletesAreVisible, varchar(100) as othersInsertsAreVisible, varchar(100) as updatesAreDetected, varchar(100) as deletesAreDetected, varchar(100) as insertsAreDetected, integer as supportsBatchUpdates, integer as supportsSavepoints, integer as supportsGetGeneratedKeys