QueryResult class
Represents the result of a SQL query execution.
Contains the column names, row data, and row count. Each row is a list of dynamic values corresponding to the columns in the same order.
Example:
final result = QueryResult(
columns: ['id', 'name', 'age'],
rows: [
[1, 'Alice', 30],
[2, 'Bob', 25],
],
rowCount: 2,
);
Constructors
-
QueryResult({required List<
String> columns, required List<List> rows, required int rowCount, List outputParamValues = const <dynamic>[], List<QueryResult> refCursorResults = const <QueryResult>[], List<DirectedMultiItem> additionalResults = const <DirectedMultiItem>[]}) -
Creates a new QueryResult instance.
const
Properties
-
additionalResults
→ List<
DirectedMultiItem> -
Additional result sets and row-counts returned by a directed OUT call
when the stored procedure / batch produced more than one ODBC result after
SQLMoreResults(theMULTenvelope path).final -
columns
→ List<
String> -
Column names in the order they appear in the query result.
final
- hasAdditionalResults → bool
-
True when additionalResults is non-empty.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasOutputParamValues → bool
-
True when outputParamValues is non-empty.
no setter
- hasRefCursorResults → bool
-
True when refCursorResults is non-empty.
no setter
- isEmpty → bool
-
Returns true if the result set contains no rows.
no setter
- isNotEmpty → bool
-
Returns true if the result set contains at least one row.
no setter
- outputParamValues → List
-
Values for
OUT/INOUTparameters, when a directed (DRT1) execute is used and the engine appends theOUT1footer. Empty when the query used onlyINPUTparameters or a legacy v0 parameter buffer. Entries are typically the sealedParamValuetypes from the package'sparam_valueprotocol — scalarOUT/INOUTonly (noParamValueRefCursorOut); seedoc/notes/TYPE_MAPPING.md§3.1.1.final -
refCursorResults
→ List<
QueryResult> -
When the native
RC1\0trailer is present, each entry is a full result set materialized from aSYS_REFCURSOR(or similar)OUTparameter.final - rowCount → int
-
Total number of rows in the result set.
final
-
rows
→ List<
List> -
Row data as a list of lists, where each inner list represents one row.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited