java.lang.Object
java.lang.Record
org.litebridge.orm.nativesql.ParsedSql
- Record Components:
sql- the SQL statement with named parameters replaced by positional placeholdersbindParameterNames- a list of the original names of the bind parameters in the order they appear in the statement
Represents a parsed SQL statement with positional parameters and their corresponding names.
This class encapsulates a SQL statement where named parameters are replaced with positional placeholders (e.g., "?") and provides a list of the original parameter names. It is used for transforming SQL statements with named parameters into a format that can be executed using standard JDBC APIs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebindParameterNamesrecord 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
-
ParsedSql
Creates an instance of aParsedSqlrecord class.- Parameters:
sql- the value for thesqlrecord componentbindParameterNames- the value for thebindParameterNamesrecord 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
-
bindParameterNames
Returns the value of thebindParameterNamesrecord component.- Returns:
- the value of the
bindParameterNamesrecord component
-