SqliteResult class

Implemented types

Constructors

SqliteResult(Database database, ResultSet resultSet, {String errorMsg = ''})
Creates a new SqliteResult instance. Parameters:

Properties

affectedRows int
Returns the number of rows affected by the last INSERT, UPDATE, or DELETE. This is useful for determining how many records were modified by data manipulation operations.
no setteroverride
assoc List<Map<String, String?>>
Returns all rows as a list of associative arrays. This is the most common way to access query results, providing column names as map keys for easy data access. Example:
no setteroverride
assocFirst Map<String, String?>?
Returns the first row as an associative array, or null if no rows exist. This is convenient for queries that are expected to return a single row, such as SELECT queries with LIMIT 1 or aggregate functions. Example:
no setteroverride
countRecords int
Returns the count of records from results with the field count_records. This method is specifically designed to work with COUNT queries where the result includes a field named 'count_records'. It extracts and converts this value to an integer. Returns 0 if the field doesn't exist, can't be parsed, or if there are no results. Example:
no setteroverride
database Database
Field name used for record count queries.
getter/setter pairoverride
error bool
Returns true if the query failed (has an error message).
no setteroverride
errorMsg String
Error message if the query failed, empty string if successful.
getter/setter pairoverride
hashCode int
The hash code for this object.
no setterinherited
insertId int
Returns the auto-generated ID from the last INSERT operation. This is particularly useful when inserting records into tables with auto-increment primary keys.
no setteroverride
numFields int
Returns the number of columns in the result set.
no setteroverride
numRows int
Returns the number of rows in the result set.
no setteroverride
resultSet ResultSet
The underlying SQLite result set from the database driver.
final
rows List<List<Object?>>
Returns an iterable of result set rows. Use this for direct access to the SQLite client's row objects.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
success bool
Returns true if the query executed successfully (no error message).
no setteroverride

Methods

assocBy(DataAssoc dataAssoc) Future<List<Map<String, Object?>>>
override
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