You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Vincent Bossuet <bo...@free.fr> on 2020/11/10 11:12:49 UTC
get 'columns' name via JDBC ?
Hi all,
I'm trying to use DatabaseMetaData java object, to get "column" names
dynamically.
I can get some informations with this object, but not so much. Is there
some documentation to see what is possible via JDBC Driver (metadata,
sql...) ?
Thanks !
Vincent
-----------------------
For example, I get :
databaseMetaData.getSchemas() :
=> TABLE_SCHEM : localhost:9983, TABLE_CATALOG : null
=> TABLE_SCHEM : metadata, TABLE_CATALOG : null
databaseMetaData.getCatalogs() :
=> TABLE_CAT : null
databaseMetaData.getTables(null, null, null, null) :
=> TABLE_CAT : null, TABLE_SCHEM : localhost:9983, TABLE_NAME : test,
TABLE_TYPE : TABLE, REMARKS : null
=> TABLE_CAT : null, TABLE_SCHEM : metadata, TABLE_NAME : COLUMNS,
TABLE_TYPE : SYSTEM_TABLE, REMARKS : null
=> TABLE_CAT : null, TABLE_SCHEM : metadata, TABLE_NAME : TABLES,
TABLE_TYPE : SYSTEM_TABLE, REMARKS : null
(columns with index >6 not available)
databaseMetaData.getColumns(null, null, null, null) :
=> null
databaseMetaData.getColumns(null, "metadata", "COLUMNS", null) :
=> null