makotan _at_ gmail dot com

JDBCのメタデータ

なんかJDBCドライバのインタフェース見たら見つけたので取ってみた
とりあえずはRDBそのものの情報部分に限定して取得
結構面倒だったけど、postgresqlのカラムの文字長制限が63文字とか判ってよかった。もっと長いと思ってたのにw


あと、個人的にちょっと前に仕事で話題になったパラメータが普通に存在してるし、DBアクセスライブラリとかコード生成ツールで案外役に立つんじゃ無いかと思った
他の情報も収集しようと現在進行形で頑張ってる

allProceduresAreCallable=true, allTablesAreSelectable=true, isReadOnly=true, nullsAreSortedHigh=true, nullsAreSortedLow=false, nullsAreSortedAtStart=false, nullsAreSortedAtEnd=false, databaseProductName='PostgreSQL', databaseProductVersion='9.3.2', driverName='PostgreSQL Native Driver', driverVersion='PostgreSQL 9.3 JDBC4.1 (build 1101)', driverMajorVersion=9, driverMinorVersion=3, usesLocalFiles=false, usesLocalFilePerTable=false, supportsMixedCaseIdentifiers=false, storesUpperCaseIdentifiers=false, storesLowerCaseIdentifiers=true, storesMixedCaseIdentifiers=false, supportsMixedCaseQuotedIdentifiers=true, storesUpperCaseQuotedIdentifiers=false, storesLowerCaseQuotedIdentifiers=false, storesMixedCaseQuotedIdentifiers=false, identifierQuoteString='"', SQLKeywords='abort,acl,add,aggregate,append,archive,arch_store,backward,binary,boolean,change,cluster,copy,database,delimiter,delimiters,do,extend,explain,forward,heavy,index,inherits,isnull,light,listen,load,merge,nothing,notify,notnull,oids,purge,rename,replace,retrieve,returns,rule,recipe,setof,stdin,stdout,store,vacuum,verbose,version', numericFunctions='abs,acos,asin,atan,atan2,ceiling,cos,cot,degrees,exp,floor,log,log10,mod,pi,power,radians,round,sign,sin,sqrt,tan,truncate', stringFunctions='ascii,char,concat,lcase,left,length,ltrim,repeat,rtrim,space,substring,ucase,replace', systemFunctions='database,ifnull,user', timeDateFunctions='curdate,curtime,dayname,dayofmonth,dayofweek,dayofyear,hour,minute,month,monthname,now,quarter,second,week,year,timestampadd', searchStringEscape='\', extraNameCharacters='', supportsAlterTableWithAddColumn=true, supportsAlterTableWithDropColumn=true, supportsColumnAliasing=true, nullPlusNonNullIsNull=true, supportsConvert=false, supportsConvertMap=null, supportsTableCorrelationNames=true, supportsDifferentTableCorrelationNames=false, supportsExpressionsInOrderBy=true, supportsOrderByUnrelated=true, supportsGroupBy=true, supportsGroupByUnrelated=true, supportsGroupByBeyondSelect=true, supportsLikeEscapeClause=true, supportsMultipleResultSets=true, supportsMultipleTransactions=true, supportsNonNullableColumns=true, supportsMinimumSQLGrammar=true, supportsCoreSQLGrammar=false, supportsExtendedSQLGrammar=false, supportsANSI92EntryLevelSQL=true, supportsANSI92IntermediateSQL=false, supportsANSI92FullSQL=false, supportsIntegrityEnhancementFacility=true, supportsOuterJoins=true, supportsFullOuterJoins=true, supportsLimitedOuterJoins=true, schemaTerm='schema', procedureTerm='function', catalogTerm='database', isCatalogAtStart=true, catalogSeparator='.', supportsSchemasInDataManipulation=true, supportsSchemasInProcedureCalls=true, supportsSchemasInTableDefinitions=true, supportsSchemasInIndexDefinitions=true, supportsSchemasInPrivilegeDefinitions=true, supportsCatalogsInDataManipulation=false, supportsCatalogsInProcedureCalls=false, supportsCatalogsInTableDefinitions=false, supportsCatalogsInIndexDefinitions=false, supportsCatalogsInPrivilegeDefinitions=false, supportsPositionedDelete=false, supportsPositionedUpdate=false, supportsSelectForUpdate=true, supportsStoredProcedures=true, supportsSubqueriesInComparisons=true, supportsSubqueriesInExists=true, supportsSubqueriesInIns=true, supportsSubqueriesInQuantifieds=true, supportsCorrelatedSubqueries=true, supportsUnion=true, supportsUnionAll=true, supportsOpenCursorsAcrossCommit=false, supportsOpenCursorsAcrossRollback=false, supportsOpenStatementsAcrossCommit=true, supportsOpenStatementsAcrossRollback=true, maxBinaryLiteralLength=0, maxCharLiteralLength=0, maxColumnNameLength=63, maxColumnsInGroupBy=0, mxColumnsInIndex=32, maxColumnsInOrderBy=0, maxColumnsInSelect=0, maxColumnsInTable=1600, maxConnections=8192, maxCursorNameLength=63, maxIndexLength=0, maxSchemaNameLength=63, maxProcedureNameLength=63, maxCatalogNameLength=63, maxRowSize=1073741824, doesMaxRowSizeIncludeBlobs=false, maxStatementLength=0, maxStatements=0, maxTableNameLength=63, maxTablesInSelect=0, maxUserNameLength=63, defaultTransactionIsolation=2, supportsTransactions=true, supportsDataDefinitionAndDataManipulationTransactions=true, supportsDataManipulationTransactionsOnly=false, dataDefinitionCausesTransactionCommit=false, dataDefinitionIgnoredInTransactions=false, supportsBatchUpdates=true, supportsSavepoints=true, supportsNamedParameters=false, supportsMultipleOpenResults=false, supportsGetGeneratedKeys=true, databaseMajorVersion=9, databaseMinorVersion=3, JDBCMajorVersion=4, JDBCMinorVersion=0, SQLStateType=2, locatorsUpdateCopy=true, supportsStatementPooling=false, rowIdLifetime=null, supportsStoredFunctionsUsingCallSyntax=true, autoCommitFailureClosesAllResultSets=false, generatedKeyAlwaysReturned=true, maxLogicalLobSize=0, supportsRefCursors=false