Package me.ahoo.cosid.store.jdbc
Record Class JdbcTables
java.lang.Object
java.lang.Record
me.ahoo.cosid.store.jdbc.JdbcTables
- Record Components:
range- the table of ranges,cosid_rangeby defaultslot- the table of slots,cosid_slotby defaultnamespace- the table of namespace metadata,cosid_namespaceby default
The table names of a JDBC store (06-stores.md ยง2.1):
options.rangeTable, slotTable and
namespaceTable. Each is an identifier, optionally schema-qualified (cosid.cosid_range); the store
writes them into its SQL as they are, so anything else is rejected.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JdbcTablesThe default names:cosid_range,cosid_slot,cosid_namespace. -
Constructor Summary
ConstructorsConstructorDescriptionJdbcTables(String range, String slot, String namespace) Creates an instance of aJdbcTablesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.The name of the slot table's index on(namespace, last_owner_key): the unqualified slot table name with_last_owner_key, so that two stores with their own slot tables in one schema have their own indexes.Returns the value of thenamespacerecord component.static JdbcTablesThe table names given by store options, the defaults for those not given.range()Returns the value of therangerecord component.Rewrites SQL written for the default names (such as aschema-*.sqlresource) to these names.slot()Returns the value of theslotrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
The default names:cosid_range,cosid_slot,cosid_namespace.
-
-
Constructor Details
-
Method Details
-
of
The table names given by store options, the defaults for those not given.- Parameters:
options- the store options:rangeTable,slotTable,namespaceTable- Returns:
- the table names
-
lastOwnerIndex
The name of the slot table's index on(namespace, last_owner_key): the unqualified slot table name with_last_owner_key, so that two stores with their own slot tables in one schema have their own indexes.- Returns:
- the index name,
cosid_slot_last_owner_keyby default
-
rename
Rewrites SQL written for the default names (such as aschema-*.sqlresource) to these names.- Parameters:
sql- the SQL namingcosid_range,cosid_slotandcosid_namespace- Returns:
- the SQL naming these tables
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
range
Returns the value of therangerecord component.- Returns:
- the value of the
rangerecord component
-
slot
Returns the value of theslotrecord component.- Returns:
- the value of the
slotrecord component
-
namespace
Returns the value of thenamespacerecord component.- Returns:
- the value of the
namespacerecord component
-