Class SpannerTableName
java.lang.Object
io.github.flink.gcp.connector.spanner.SpannerTableName
- All Implemented Interfaces:
Serializable
A table name as rendered for Spanner APIs and compared with
INFORMATION_SCHEMA.
It is built from one configured table's named-schema and table options. A name
the spanner catalog lists or parses from a Flink object name is a SpannerObjectName instead; "catalog" in this class's methods, such as catalogKey(String, String, Dialect), means an INFORMATION_SCHEMA row, not the Flink catalog.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe name of one table-local access path, such as an index. -
Method Summary
Modifier and TypeMethodDescriptionaccessPath(String value, String option) Resolves an unqualified access-path option in this table's schema.apiName()Returns the name passed to Spanner data APIs.static StringcatalogIdentifierKey(String value, com.google.cloud.spanner.Dialect dialect) Returns a dialect-aware key for one identifier from a catalog row.static StringcatalogKey(String schema, String table, com.google.cloud.spanner.Dialect dialect) Returns a dialect-aware key for a catalog row.booleaninthashCode()Returns the schema segment for lineage.booleanmatchesNativeApiName(String nativeApiName) Returns whether a native API table name identifies this table.static StringnativeApiKey(String apiName, com.google.cloud.spanner.Dialect dialect) Returns a dialect-aware key for a table name carried by a mutation.static SpannerTableNameCreates a name from the Table API options.static SpannerTableNameCreates a name from the Table API options, naming the schema by the key that supplied it.schema()Returns the schema spelling exposed byINFORMATION_SCHEMA.table()Returns the table spelling exposed byINFORMATION_SCHEMA.
-
Method Details
-
of
public static SpannerTableName of(@Nullable String schema, String table, com.google.cloud.spanner.Dialect dialect) Creates a name from the Table API options. -
of
public static SpannerTableName of(@Nullable String schema, String schemaKey, String table, com.google.cloud.spanner.Dialect dialect) Creates a name from the Table API options, naming the schema by the key that supplied it.- Parameters:
schema- the named schema, ornullfor the dialect's default schemaschemaKey- the option key the schema was written under, which a rejection namestable- the tabledialect- the database dialect- Returns:
- the name
-
apiName
Returns the name passed to Spanner data APIs. -
schema
Returns the schema spelling exposed byINFORMATION_SCHEMA. -
table
Returns the table spelling exposed byINFORMATION_SCHEMA. -
lineageSchema
Returns the schema segment for lineage. Legacy native API names may already include their schema; keep that complete name in the table segment instead of prepending a default schema. -
matchesNativeApiName
Returns whether a native API table name identifies this table. -
accessPath
Resolves an unqualified access-path option in this table's schema. -
catalogKey
public static String catalogKey(String schema, String table, com.google.cloud.spanner.Dialect dialect) Returns a dialect-aware key for a catalog row. -
nativeApiKey
Returns a dialect-aware key for a table name carried by a mutation. -
catalogIdentifierKey
Returns a dialect-aware key for one identifier from a catalog row. -
equals
-
hashCode
public int hashCode()
-