java.lang.Object
java.lang.Record
org.tentackle.sql.ScriptRunnerResult
- Record Components:
sql- the SQL code executedoffset- the offset within the SQL scriptwarnings- optional warnings, empty string if none, never nullcolumnCount- the number of columns, if result sets were returned, 0 if count onlyresults- the results returned from the statement, empty if none, never null
public record ScriptRunnerResult(String sql, int offset, String warnings, int columnCount, Object[] results)
extends Record
The result of a statement executed by a
ScriptRunner.-
Constructor Summary
ConstructorsConstructorDescriptionScriptRunnerResult(String sql, int offset, String warnings, int columnCount, Object... results) Creates an instance of aScriptRunnerResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecolumnCountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intoffset()Returns the value of theoffsetrecord component.Object[]results()Returns the value of theresultsrecord component.sql()Returns the value of thesqlrecord component.toString()Returns a string representation of this record class.warnings()Returns the value of thewarningsrecord component.
-
Constructor Details
-
ScriptRunnerResult
public ScriptRunnerResult(String sql, int offset, String warnings, int columnCount, Object... results) Creates an instance of aScriptRunnerResultrecord class.- Parameters:
sql- the value for thesqlrecord componentoffset- the value for theoffsetrecord componentwarnings- the value for thewarningsrecord componentcolumnCount- the value for thecolumnCountrecord componentresults- the value for theresultsrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
sql
Returns the value of thesqlrecord component.- Returns:
- the value of the
sqlrecord component
-
offset
public int offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
warnings
Returns the value of thewarningsrecord component.- Returns:
- the value of the
warningsrecord component
-
columnCount
public int columnCount()Returns the value of thecolumnCountrecord component.- Returns:
- the value of the
columnCountrecord component
-
results
Returns the value of theresultsrecord component.- Returns:
- the value of the
resultsrecord component
-