RelProtoDataType getRelDataType(String catalogName, String schemaName, String tableName) throws SQLException { Connection connection = null; try { connection = dataSource.getConnection(); DatabaseMetaData metaData = connection.getMetaData(); return getRelDataType(metaData, catalogName, schemaName, tableName); } finally { close(connection, null, null); } }
RelProtoDataType getRelDataType(String catalogName, String schemaName, String tableName) throws SQLException { Connection connection = null; try { connection = dataSource.getConnection(); DatabaseMetaData metaData = connection.getMetaData(); return getRelDataType(metaData, catalogName, schemaName, tableName); } finally { close(connection, null, null); } }
public RelDataType getRowType(RelDataTypeFactory typeFactory) { if (protoRowType == null) { try { protoRowType = jdbcSchema.getRelDataType( jdbcCatalogName, jdbcSchemaName, jdbcTableName); } catch (SQLException e) { throw new RuntimeException( "Exception while reading definition of table '" + jdbcTableName + "'", e); } } return protoRowType.apply(typeFactory); }
public RelDataType getRowType(RelDataTypeFactory typeFactory) { if (protoRowType == null) { try { protoRowType = jdbcSchema.getRelDataType( jdbcCatalogName, jdbcSchemaName, jdbcTableName); } catch (SQLException e) { throw new RuntimeException( "Exception while reading definition of table '" + jdbcTableName + "'", e); } } return protoRowType.apply(typeFactory); }
.getRelDataType(metaData, catalogName, schemaName, journalNameFor(tableName)) .apply(new SqlTypeFactoryImpl(RelDataTypeSystem.DEFAULT) { @Override return super.getRelDataType(metaData, catalogName, schemaName, tableName);