DatabaseService class

A service class to interact with the database.

This class is responsible for opening the database, executing SQL commands, and closing the database.

Constructors

DatabaseService()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete(String command) Future<int>
Deletes data from the database based on the given command.
execute(String command) Future<void>
Executes the given SQL command on the database.
insert(String command) Future<int>
Inserts a new record into the database using the provided SQL command.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(String command) Future<List<Map<String, Object?>>>
Executes the given SQL command and returns a list of maps representing the result set.
toString() String
A string representation of this object.
inherited
update(String command) Future<int>
Updates the database with the given command. Returns the number of rows affected by the update operation.

Operators

operator ==(Object other) bool
The equality operator.
inherited