private String getJdbcSchemaName(Schema schema) { if (_usesCatalogsAsSchemas) { return null; } else { return schema.getName(); } }
private String getJdbcSchemaName(Schema schema) { if (_usesCatalogsAsSchemas) { return null; } else { return schema.getName(); } }
@Override public SchemaMetadata getSchemaMetadata(Schema schema) { if (schema == null) { return null; } final String schemaName = schema.getName(); return getSchemaMetadataByName(schemaName); }
private String getCatalogName(Schema schema) { if (_usesCatalogsAsSchemas) { return schema.getName(); } else { return _dataContext.getCatalogName(); } }
@Override public SchemaMetadata getSchemaMetadata(final Schema schema) { if (schema == null) { return null; } final String schemaName = schema.getName(); return getSchemaMetadataByName(schemaName); }
/** * Determines if a schema is an information schema * * @param schema * @return */ public static boolean isInformationSchema(Schema schema) { String name = schema.getName(); return isInformationSchema(name); }
protected boolean isMainSchemaTable(Table table) { Schema schema = table.getSchema(); if (INFORMATION_SCHEMA_NAME.equals(schema.getName())) { return false; } else { return true; } }
private Map<String, Object> createSchemaMap(Schema schema) { final Map<String, Object> map = new HashMap<>(); map.put("name", schema.getName()); map.put("tables", createTableList(schema)); return map; }
@Override public String getValue() { final Schema schema = getSchema(); if (schema == null) { return null; } return schema.getName(); }
@Override public String getDefaultSchemaName() throws MetaModelException { for (DataContext dc : _delegates) { Schema schema = dc.getDefaultSchema(); if (schema != null) { return schema.getName(); } } return null; }
protected boolean isMainSchemaTable(Table table) { Schema schema = table.getSchema(); if (INFORMATION_SCHEMA_NAME.equals(schema.getName())) { return false; } else { return true; } }
@Override public String getDefaultSchemaName() throws MetaModelException { for (DataContext dc : _delegates) { Schema schema = dc.getDefaultSchema(); if (schema != null) { return schema.getName(); } } return null; }
private String getCatalogName(Schema schema) { if (_usesCatalogsAsSchemas) { return schema.getName(); } else { return _dataContext.getCatalogName(); } }
/** * Determines if a schema is an information schema * * @param schema * @return */ public static boolean isInformationSchema(Schema schema) { String name = schema.getName(); return isInformationSchema(name); }
@Override public final String getQualifiedLabel() { StringBuilder sb = new StringBuilder(); Schema schema = getSchema(); if (schema != null && schema.getName() != null) { sb.append(schema.getQualifiedLabel()); sb.append('.'); } sb.append(getName()); return sb.toString(); }
@Override public final String getQualifiedLabel() { StringBuilder sb = new StringBuilder(); Schema schema = getSchema(); if (schema != null && schema.getName() != null) { sb.append(schema.getQualifiedLabel()); sb.append('.'); } sb.append(getName()); return sb.toString(); }
@Override public List<String> getSchemaNames() throws MetaModelException { if (_schemaInterceptors.isEmpty()) { return _delegate.getSchemaNames(); } return getSchemas().stream() .map(schema -> schema.getName()) .collect(Collectors.toList()); }
private static String getTablePostFix(final Table table) { final String postFix; final Schema schema = table.getSchema(); if (schema == null) { postFix = "." + table.getName(); } else { postFix = "." + schema.getName() + "." + table.getName(); } return postFix; }
public ImmutableSchema(Schema schema) { this(schema.getName(), schema.getQuote()); List<Table> origTables = schema.getTables(); for (Table table : origTables) { tables.add(new ImmutableTable(table, this)); } Collection<Relationship> origRelationships = schema.getRelationships(); for (Relationship relationship : origRelationships) { ImmutableRelationship.create(relationship, this); } }
@Override public void run(UpdateCallback callback) { callback.createTable(_table.getSchema().getName(), _table.getName()).like(_table).execute(); } }