DatabaseClient class
A client for interacting with the 'database' extension on the room server.
Constructors
- DatabaseClient.new({required RoomClient room})
- @param room The RoomClient used to send requests.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- room → RoomClient
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addColumns(
{required String table, required Map< String, String> newColumns}) → Future<void> - Add new columns to an existing table.
-
createFullTextSearchIndex(
{required String table, required String column}) → Future< void> - Create a full-text search index on a given text column.
-
createScalarIndex(
{required String table, required String column}) → Future< void> - Create a scalar index on a given column.
-
createTableFromData(
{required String name, List< Map< ? data, CreateMode mode = CreateMode.create}) → Future<String, dynamic> >void> - Create a table from initial data, optionally specifying a mode.
-
createTableWithSchema(
{required String name, Map< String, DataType> ? schema, List<Map< ? data, CreateMode mode = CreateMode.create}) → Future<String, dynamic> >void> - Create a new table with a specific schema.
-
createVectorIndex(
{required String table, required String column}) → Future< void> - Create a vector index on a given column.
-
delete(
{required String table, required String where}) → Future< void> - Delete records from a table.
-
dropColumns(
{required String table, required List< String> columns}) → Future<void> - Drop columns from an existing table.
-
dropTable(
{required String name, bool ignoreMissing = false}) → Future< void> - Drop (delete) a table by name.
-
insert(
{required String table, required List< Map< records}) → Future<String, dynamic> >void> - Insert new records into a table.
-
listIndexes(
{required String table}) → Future< Map< String, dynamic> > - List all indexes on a table.
-
listTables(
) → Future< List< String> > - List all tables in the database. @returns A future resolving to an array of table names.
-
merge(
{required String table, required String on, required List< Map< records}) → Future<String, dynamic> >void> - Merge (upsert) records into a table.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
optimize(
String table) → Future< void> - Optimize (compact/prune) a table.
-
search(
{required String table, String? text, List< double> ? vector, dynamic where, int? limit, List<String> ? select}) → Future<List< Map< >String, dynamic> > - Search for records in a table.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
{required String table, required String where, Map< String, dynamic> ? values, Map<String, String> ? valuesSql}) → Future<void> - Update existing records in a table.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited