Record Class DatabaseConnectionConfig
java.lang.Object
java.lang.Record
com.darkcollective.relix.lang.ast.source.DatabaseConnectionConfig
- Record Components:
url- the JDBC connection URL; must not be blankuser- the connection user, if anypassword- the connection password, if anydialect- the SQL dialect hint (e.g."postgres"), if given
public record DatabaseConnectionConfig(String url, Optional<String> user, Optional<String> password, Optional<String> dialect)
extends Record
Configuration for a named database connection — the JDBC coordinates
shared by every table referenced through it.
Introduced by a connection NAME from database { … } declaration.
Unlike a DatabaseSourceConfig (which names a single table inline), a
connection is referenced by many tables, either as conn.table or via a
source T from conn { … } binding.
url, user, and password may contain ${VAR}
placeholders, resolved when a query runs. user and
password are optional (some drivers, e.g. embedded H2, need neither);
dialect is an optional hint that later drives SQL generation for
pushdown.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondialect()Returns the value of thedialectrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.password()Returns the value of thepasswordrecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.user()Returns the value of theuserrecord component.
-
Constructor Details
-
Method Details
-
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). -
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
password
Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-
dialect
Returns the value of thedialectrecord component.- Returns:
- the value of the
dialectrecord component
-