Module litebridge.db.spi.impl
Package org.litebridgedb.db.spi.impl
Record Class AbstractDatabaseProvider.PreparedSql
java.lang.Object
java.lang.Record
org.litebridgedb.db.spi.impl.AbstractDatabaseProvider.PreparedSql
- Record Components:
sql- The SQL query string that may contain placeholders for parameterized values.bindValues- The list of bind values corresponding to the placeholders in the SQL query. Each value can be nullable, represented by theAbstractDatabaseProvider.BindValuetype.
- Enclosing class:
AbstractDatabaseProvider
public static record AbstractDatabaseProvider.PreparedSql(String sql, List<@Nullable AbstractDatabaseProvider.BindValue> bindValues)
extends Record
A prepared SQL statement along with its associated bind values.
This record encapsulates the SQL query string and the list of values to be bound to the query parameters.
Instances of this record are immutable and can be used to safely pass SQL queries and their bindings within the application.
-
Constructor Summary
ConstructorsConstructorDescriptionPreparedSql(String sql, List<@Nullable AbstractDatabaseProvider.BindValue> bindValues) Creates an instance of aPreparedSqlrecord class. -
Method Summary
Modifier and TypeMethodDescriptionList<@Nullable AbstractDatabaseProvider.BindValue> Returns the value of thebindValuesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.sql()Returns the value of thesqlrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PreparedSql
Creates an instance of aPreparedSqlrecord class.- Parameters:
sql- the value for thesqlrecord componentbindValues- the value for thebindValuesrecord component
-
-
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). -
sql
Returns the value of thesqlrecord component.- Returns:
- the value of the
sqlrecord component
-
bindValues
Returns the value of thebindValuesrecord component.- Returns:
- the value of the
bindValuesrecord component
-