mirror of https://github.com/AMT-Cheif/drift.git
Merge pull request #2970 from simolus3/modular-manager
Generate modular manager code
This commit is contained in:
commit
9c28a06020
|
@ -2,6 +2,7 @@
|
|||
import 'package:drift/drift.dart' as i0;
|
||||
import 'package:drift_docs/snippets/_shared/todo_tables.drift.dart' as i1;
|
||||
import 'package:drift_docs/snippets/_shared/todo_tables.dart' as i2;
|
||||
import 'package:drift/internal/modular.dart' as i3;
|
||||
|
||||
class $TodoItemsTable extends i2.TodoItems
|
||||
with i0.TableInfo<$TodoItemsTable, i1.TodoItem> {
|
||||
|
@ -300,6 +301,133 @@ class TodoItemsCompanion extends i0.UpdateCompanion<i1.TodoItem> {
|
|||
}
|
||||
}
|
||||
|
||||
class $$TodoItemsTableFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.$TodoItemsTable> {
|
||||
$$TodoItemsTableFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ColumnFilters<String> get title => i0.ColumnFilters($table.title);
|
||||
i0.ColumnFilters<String> get content => i0.ColumnFilters($table.content);
|
||||
i0.ColumnFilters<int> get categoryId => i0.ColumnFilters($table.category);
|
||||
i0.ComposableFilter category(
|
||||
i0.ComposableFilter Function(i1.$$CategoriesTableFilterComposer f) f) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable: i3.ReadDatabaseContainer($db)
|
||||
.resultSet<i1.$CategoriesTable>('categories'),
|
||||
getCurrentColumn: (f) => f.category,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i1.$$CategoriesTableFilterComposer(db, table),
|
||||
builder: f);
|
||||
}
|
||||
|
||||
i0.ColumnFilters<DateTime> get dueDate => i0.ColumnFilters($table.dueDate);
|
||||
}
|
||||
|
||||
class $$TodoItemsTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.$TodoItemsTable> {
|
||||
$$TodoItemsTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<String> get title => i0.ColumnOrderings($table.title);
|
||||
i0.ColumnOrderings<String> get content => i0.ColumnOrderings($table.content);
|
||||
i0.ColumnOrderings<int> get categoryId => i0.ColumnOrderings($table.category);
|
||||
i0.ComposableOrdering category(
|
||||
i0.ComposableOrdering Function(i1.$$CategoriesTableOrderingComposer o)
|
||||
o) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable: i3.ReadDatabaseContainer($db)
|
||||
.resultSet<i1.$CategoriesTable>('categories'),
|
||||
getCurrentColumn: (f) => f.category,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i1.$$CategoriesTableOrderingComposer(db, table),
|
||||
builder: o);
|
||||
}
|
||||
|
||||
i0.ColumnOrderings<DateTime> get dueDate =>
|
||||
i0.ColumnOrderings($table.dueDate);
|
||||
}
|
||||
|
||||
class $$TodoItemsTableProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$TodoItemsTable,
|
||||
i1.TodoItem,
|
||||
$$TodoItemsTableFilterComposer,
|
||||
$$TodoItemsTableOrderingComposer,
|
||||
$$TodoItemsTableProcessedTableManager,
|
||||
$$TodoItemsTableInsertCompanionBuilder,
|
||||
$$TodoItemsTableUpdateCompanionBuilder> {
|
||||
const $$TodoItemsTableProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $$TodoItemsTableInsertCompanionBuilder = i1.TodoItemsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
required String title,
|
||||
required String content,
|
||||
i0.Value<int?> category,
|
||||
i0.Value<DateTime?> dueDate,
|
||||
});
|
||||
typedef $$TodoItemsTableUpdateCompanionBuilder = i1.TodoItemsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<String> title,
|
||||
i0.Value<String> content,
|
||||
i0.Value<int?> category,
|
||||
i0.Value<DateTime?> dueDate,
|
||||
});
|
||||
|
||||
class $$TodoItemsTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$TodoItemsTable,
|
||||
i1.TodoItem,
|
||||
$$TodoItemsTableFilterComposer,
|
||||
$$TodoItemsTableOrderingComposer,
|
||||
$$TodoItemsTableProcessedTableManager,
|
||||
$$TodoItemsTableInsertCompanionBuilder,
|
||||
$$TodoItemsTableUpdateCompanionBuilder> {
|
||||
$$TodoItemsTableTableManager(
|
||||
i0.GeneratedDatabase db, i1.$TodoItemsTable table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $$TodoItemsTableFilterComposer(db, table),
|
||||
orderingComposer: $$TodoItemsTableOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$$TodoItemsTableProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<String> title = const i0.Value.absent(),
|
||||
i0.Value<String> content = const i0.Value.absent(),
|
||||
i0.Value<int?> category = const i0.Value.absent(),
|
||||
i0.Value<DateTime?> dueDate = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.TodoItemsCompanion(
|
||||
id: id,
|
||||
title: title,
|
||||
content: content,
|
||||
category: category,
|
||||
dueDate: dueDate,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
required String title,
|
||||
required String content,
|
||||
i0.Value<int?> category = const i0.Value.absent(),
|
||||
i0.Value<DateTime?> dueDate = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.TodoItemsCompanion.insert(
|
||||
id: id,
|
||||
title: title,
|
||||
content: content,
|
||||
category: category,
|
||||
dueDate: dueDate,
|
||||
)));
|
||||
}
|
||||
|
||||
class $CategoriesTable extends i2.Categories
|
||||
with i0.TableInfo<$CategoriesTable, i1.Category> {
|
||||
@override
|
||||
|
@ -471,6 +599,79 @@ class CategoriesCompanion extends i0.UpdateCompanion<i1.Category> {
|
|||
}
|
||||
}
|
||||
|
||||
class $$CategoriesTableFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.$CategoriesTable> {
|
||||
$$CategoriesTableFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ColumnFilters<String> get name => i0.ColumnFilters($table.name);
|
||||
}
|
||||
|
||||
class $$CategoriesTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.$CategoriesTable> {
|
||||
$$CategoriesTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<String> get name => i0.ColumnOrderings($table.name);
|
||||
}
|
||||
|
||||
class $$CategoriesTableProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$CategoriesTable,
|
||||
i1.Category,
|
||||
$$CategoriesTableFilterComposer,
|
||||
$$CategoriesTableOrderingComposer,
|
||||
$$CategoriesTableProcessedTableManager,
|
||||
$$CategoriesTableInsertCompanionBuilder,
|
||||
$$CategoriesTableUpdateCompanionBuilder> {
|
||||
const $$CategoriesTableProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $$CategoriesTableInsertCompanionBuilder = i1.CategoriesCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
required String name,
|
||||
});
|
||||
typedef $$CategoriesTableUpdateCompanionBuilder = i1.CategoriesCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<String> name,
|
||||
});
|
||||
|
||||
class $$CategoriesTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$CategoriesTable,
|
||||
i1.Category,
|
||||
$$CategoriesTableFilterComposer,
|
||||
$$CategoriesTableOrderingComposer,
|
||||
$$CategoriesTableProcessedTableManager,
|
||||
$$CategoriesTableInsertCompanionBuilder,
|
||||
$$CategoriesTableUpdateCompanionBuilder> {
|
||||
$$CategoriesTableTableManager(
|
||||
i0.GeneratedDatabase db, i1.$CategoriesTable table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $$CategoriesTableFilterComposer(db, table),
|
||||
orderingComposer: $$CategoriesTableOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$$CategoriesTableProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<String> name = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.CategoriesCompanion(
|
||||
id: id,
|
||||
name: name,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
required String name,
|
||||
}) =>
|
||||
i1.CategoriesCompanion.insert(
|
||||
id: id,
|
||||
name: name,
|
||||
)));
|
||||
}
|
||||
|
||||
class $UsersTable extends i2.Users with i0.TableInfo<$UsersTable, i1.User> {
|
||||
@override
|
||||
final i0.GeneratedDatabase attachedDatabase;
|
||||
|
@ -643,3 +844,75 @@ class UsersCompanion extends i0.UpdateCompanion<i1.User> {
|
|||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
class $$UsersTableFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.$UsersTable> {
|
||||
$$UsersTableFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ColumnFilters<DateTime> get birthDate =>
|
||||
i0.ColumnFilters($table.birthDate);
|
||||
}
|
||||
|
||||
class $$UsersTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.$UsersTable> {
|
||||
$$UsersTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<DateTime> get birthDate =>
|
||||
i0.ColumnOrderings($table.birthDate);
|
||||
}
|
||||
|
||||
class $$UsersTableProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$UsersTable,
|
||||
i1.User,
|
||||
$$UsersTableFilterComposer,
|
||||
$$UsersTableOrderingComposer,
|
||||
$$UsersTableProcessedTableManager,
|
||||
$$UsersTableInsertCompanionBuilder,
|
||||
$$UsersTableUpdateCompanionBuilder> {
|
||||
const $$UsersTableProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $$UsersTableInsertCompanionBuilder = i1.UsersCompanion Function({
|
||||
i0.Value<int> id,
|
||||
required DateTime birthDate,
|
||||
});
|
||||
typedef $$UsersTableUpdateCompanionBuilder = i1.UsersCompanion Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<DateTime> birthDate,
|
||||
});
|
||||
|
||||
class $$UsersTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$UsersTable,
|
||||
i1.User,
|
||||
$$UsersTableFilterComposer,
|
||||
$$UsersTableOrderingComposer,
|
||||
$$UsersTableProcessedTableManager,
|
||||
$$UsersTableInsertCompanionBuilder,
|
||||
$$UsersTableUpdateCompanionBuilder> {
|
||||
$$UsersTableTableManager(i0.GeneratedDatabase db, i1.$UsersTable table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $$UsersTableFilterComposer(db, table),
|
||||
orderingComposer: $$UsersTableOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$$UsersTableProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<DateTime> birthDate = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.UsersCompanion(
|
||||
id: id,
|
||||
birthDate: birthDate,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
required DateTime birthDate,
|
||||
}) =>
|
||||
i1.UsersCompanion.insert(
|
||||
id: id,
|
||||
birthDate: birthDate,
|
||||
)));
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// ignore_for_file: type=lint
|
||||
import 'package:drift/drift.dart' as i0;
|
||||
import 'package:drift_docs/snippets/_shared/todo_tables.drift.dart' as i1;
|
||||
import 'package:drift/internal/modular.dart' as i2;
|
||||
|
||||
abstract class $MyDatabase extends i0.GeneratedDatabase {
|
||||
$MyDatabase(i0.QueryExecutor e) : super(e);
|
||||
|
@ -30,225 +29,13 @@ abstract class $MyDatabase extends i0.GeneratedDatabase {
|
|||
[categories, todoItems];
|
||||
}
|
||||
|
||||
class $$CategoriesTableFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.$CategoriesTable> {
|
||||
$$CategoriesTableFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ColumnFilters<String> get name => i0.ColumnFilters($table.name);
|
||||
i0.ComposableFilter todoItemsRefs(
|
||||
i0.ComposableFilter Function($$TodoItemsTableFilterComposer f) f) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable: i2.ReadDatabaseContainer($db)
|
||||
.resultSet<i1.$TodoItemsTable>('todo_items'),
|
||||
getCurrentColumn: (f) => f.id,
|
||||
getReferencedColumn: (f) => f.category,
|
||||
getReferencedComposer: (db, table) =>
|
||||
$$TodoItemsTableFilterComposer(db, table),
|
||||
builder: f);
|
||||
}
|
||||
}
|
||||
|
||||
class $$CategoriesTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.$CategoriesTable> {
|
||||
$$CategoriesTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<String> get name => i0.ColumnOrderings($table.name);
|
||||
}
|
||||
|
||||
class $$CategoriesTableProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$CategoriesTable,
|
||||
i1.Category,
|
||||
$$CategoriesTableFilterComposer,
|
||||
$$CategoriesTableOrderingComposer,
|
||||
$$CategoriesTableProcessedTableManager,
|
||||
$$CategoriesTableInsertCompanionBuilder,
|
||||
$$CategoriesTableUpdateCompanionBuilder> {
|
||||
const $$CategoriesTableProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $$CategoriesTableInsertCompanionBuilder = i1.CategoriesCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
required String name,
|
||||
});
|
||||
typedef $$CategoriesTableUpdateCompanionBuilder = i1.CategoriesCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<String> name,
|
||||
});
|
||||
|
||||
class $$CategoriesTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$CategoriesTable,
|
||||
i1.Category,
|
||||
$$CategoriesTableFilterComposer,
|
||||
$$CategoriesTableOrderingComposer,
|
||||
$$CategoriesTableProcessedTableManager,
|
||||
$$CategoriesTableInsertCompanionBuilder,
|
||||
$$CategoriesTableUpdateCompanionBuilder> {
|
||||
$$CategoriesTableTableManager(
|
||||
i0.GeneratedDatabase db, i1.$CategoriesTable table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $$CategoriesTableFilterComposer(db, table),
|
||||
orderingComposer: $$CategoriesTableOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$$CategoriesTableProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<String> name = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.CategoriesCompanion(
|
||||
id: id,
|
||||
name: name,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
required String name,
|
||||
}) =>
|
||||
i1.CategoriesCompanion.insert(
|
||||
id: id,
|
||||
name: name,
|
||||
)));
|
||||
}
|
||||
|
||||
class $$TodoItemsTableFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.$TodoItemsTable> {
|
||||
$$TodoItemsTableFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ColumnFilters<String> get title => i0.ColumnFilters($table.title);
|
||||
i0.ColumnFilters<String> get content => i0.ColumnFilters($table.content);
|
||||
i0.ColumnFilters<int> get categoryId => i0.ColumnFilters($table.category);
|
||||
i0.ComposableFilter category(
|
||||
i0.ComposableFilter Function($$CategoriesTableFilterComposer f) f) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable: i2.ReadDatabaseContainer($db)
|
||||
.resultSet<i1.$CategoriesTable>('categories'),
|
||||
getCurrentColumn: (f) => f.category,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
$$CategoriesTableFilterComposer(db, table),
|
||||
builder: f);
|
||||
}
|
||||
|
||||
i0.ColumnFilters<DateTime> get dueDate => i0.ColumnFilters($table.dueDate);
|
||||
}
|
||||
|
||||
class $$TodoItemsTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.$TodoItemsTable> {
|
||||
$$TodoItemsTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<String> get title => i0.ColumnOrderings($table.title);
|
||||
i0.ColumnOrderings<String> get content => i0.ColumnOrderings($table.content);
|
||||
i0.ColumnOrderings<int> get categoryId => i0.ColumnOrderings($table.category);
|
||||
i0.ComposableOrdering category(
|
||||
i0.ComposableOrdering Function($$CategoriesTableOrderingComposer o) o) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable: i2.ReadDatabaseContainer($db)
|
||||
.resultSet<i1.$CategoriesTable>('categories'),
|
||||
getCurrentColumn: (f) => f.category,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
$$CategoriesTableOrderingComposer(db, table),
|
||||
builder: o);
|
||||
}
|
||||
|
||||
i0.ColumnOrderings<DateTime> get dueDate =>
|
||||
i0.ColumnOrderings($table.dueDate);
|
||||
}
|
||||
|
||||
class $$TodoItemsTableProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$TodoItemsTable,
|
||||
i1.TodoItem,
|
||||
$$TodoItemsTableFilterComposer,
|
||||
$$TodoItemsTableOrderingComposer,
|
||||
$$TodoItemsTableProcessedTableManager,
|
||||
$$TodoItemsTableInsertCompanionBuilder,
|
||||
$$TodoItemsTableUpdateCompanionBuilder> {
|
||||
const $$TodoItemsTableProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $$TodoItemsTableInsertCompanionBuilder = i1.TodoItemsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
required String title,
|
||||
required String content,
|
||||
i0.Value<int?> category,
|
||||
i0.Value<DateTime?> dueDate,
|
||||
});
|
||||
typedef $$TodoItemsTableUpdateCompanionBuilder = i1.TodoItemsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<String> title,
|
||||
i0.Value<String> content,
|
||||
i0.Value<int?> category,
|
||||
i0.Value<DateTime?> dueDate,
|
||||
});
|
||||
|
||||
class $$TodoItemsTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$TodoItemsTable,
|
||||
i1.TodoItem,
|
||||
$$TodoItemsTableFilterComposer,
|
||||
$$TodoItemsTableOrderingComposer,
|
||||
$$TodoItemsTableProcessedTableManager,
|
||||
$$TodoItemsTableInsertCompanionBuilder,
|
||||
$$TodoItemsTableUpdateCompanionBuilder> {
|
||||
$$TodoItemsTableTableManager(
|
||||
i0.GeneratedDatabase db, i1.$TodoItemsTable table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $$TodoItemsTableFilterComposer(db, table),
|
||||
orderingComposer: $$TodoItemsTableOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$$TodoItemsTableProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<String> title = const i0.Value.absent(),
|
||||
i0.Value<String> content = const i0.Value.absent(),
|
||||
i0.Value<int?> category = const i0.Value.absent(),
|
||||
i0.Value<DateTime?> dueDate = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.TodoItemsCompanion(
|
||||
id: id,
|
||||
title: title,
|
||||
content: content,
|
||||
category: category,
|
||||
dueDate: dueDate,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
required String title,
|
||||
required String content,
|
||||
i0.Value<int?> category = const i0.Value.absent(),
|
||||
i0.Value<DateTime?> dueDate = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.TodoItemsCompanion.insert(
|
||||
id: id,
|
||||
title: title,
|
||||
content: content,
|
||||
category: category,
|
||||
dueDate: dueDate,
|
||||
)));
|
||||
}
|
||||
|
||||
class $MyDatabaseManager {
|
||||
final $MyDatabase _db;
|
||||
$MyDatabaseManager(this._db);
|
||||
$$CategoriesTableTableManager get categories =>
|
||||
$$CategoriesTableTableManager(_db, _db.categories);
|
||||
$$TodoItemsTableTableManager get todoItems =>
|
||||
$$TodoItemsTableTableManager(_db, _db.todoItems);
|
||||
i1.$$CategoriesTableTableManager get categories =>
|
||||
i1.$$CategoriesTableTableManager(_db, _db.categories);
|
||||
i1.$$TodoItemsTableTableManager get todoItems =>
|
||||
i1.$$TodoItemsTableTableManager(_db, _db.todoItems);
|
||||
}
|
||||
|
||||
class CategoriesWithCountResult {
|
||||
|
|
|
@ -222,3 +222,87 @@ class PeriodicRemindersCompanion
|
|||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
class $PeriodicRemindersFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.PeriodicReminders> {
|
||||
$PeriodicRemindersFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ColumnFilters<Duration> get frequency =>
|
||||
i0.ColumnFilters($table.frequency);
|
||||
i0.ColumnFilters<String> get reminder => i0.ColumnFilters($table.reminder);
|
||||
}
|
||||
|
||||
class $PeriodicRemindersOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.PeriodicReminders> {
|
||||
$PeriodicRemindersOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<Duration> get frequency =>
|
||||
i0.ColumnOrderings($table.frequency);
|
||||
i0.ColumnOrderings<String> get reminder =>
|
||||
i0.ColumnOrderings($table.reminder);
|
||||
}
|
||||
|
||||
class $PeriodicRemindersProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.PeriodicReminders,
|
||||
i1.PeriodicReminder,
|
||||
$PeriodicRemindersFilterComposer,
|
||||
$PeriodicRemindersOrderingComposer,
|
||||
$PeriodicRemindersProcessedTableManager,
|
||||
$PeriodicRemindersInsertCompanionBuilder,
|
||||
$PeriodicRemindersUpdateCompanionBuilder> {
|
||||
const $PeriodicRemindersProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $PeriodicRemindersInsertCompanionBuilder = i1.PeriodicRemindersCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
required Duration frequency,
|
||||
required String reminder,
|
||||
});
|
||||
typedef $PeriodicRemindersUpdateCompanionBuilder = i1.PeriodicRemindersCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<Duration> frequency,
|
||||
i0.Value<String> reminder,
|
||||
});
|
||||
|
||||
class $PeriodicRemindersTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.PeriodicReminders,
|
||||
i1.PeriodicReminder,
|
||||
$PeriodicRemindersFilterComposer,
|
||||
$PeriodicRemindersOrderingComposer,
|
||||
$PeriodicRemindersProcessedTableManager,
|
||||
$PeriodicRemindersInsertCompanionBuilder,
|
||||
$PeriodicRemindersUpdateCompanionBuilder> {
|
||||
$PeriodicRemindersTableManager(
|
||||
i0.GeneratedDatabase db, i1.PeriodicReminders table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $PeriodicRemindersFilterComposer(db, table),
|
||||
orderingComposer: $PeriodicRemindersOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$PeriodicRemindersProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<Duration> frequency = const i0.Value.absent(),
|
||||
i0.Value<String> reminder = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.PeriodicRemindersCompanion(
|
||||
id: id,
|
||||
frequency: frequency,
|
||||
reminder: reminder,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
required Duration frequency,
|
||||
required String reminder,
|
||||
}) =>
|
||||
i1.PeriodicRemindersCompanion.insert(
|
||||
id: id,
|
||||
frequency: frequency,
|
||||
reminder: reminder,
|
||||
)));
|
||||
}
|
||||
|
|
|
@ -220,3 +220,90 @@ class PeriodicRemindersCompanion
|
|||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
class $$PeriodicRemindersTableFilterComposer extends i0
|
||||
.FilterComposer<i0.GeneratedDatabase, i1.$PeriodicRemindersTable> {
|
||||
$$PeriodicRemindersTableFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ColumnFilters<Duration> get frequency =>
|
||||
i0.ColumnFilters($table.frequency);
|
||||
i0.ColumnFilters<String> get reminder => i0.ColumnFilters($table.reminder);
|
||||
}
|
||||
|
||||
class $$PeriodicRemindersTableOrderingComposer extends i0
|
||||
.OrderingComposer<i0.GeneratedDatabase, i1.$PeriodicRemindersTable> {
|
||||
$$PeriodicRemindersTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<Duration> get frequency =>
|
||||
i0.ColumnOrderings($table.frequency);
|
||||
i0.ColumnOrderings<String> get reminder =>
|
||||
i0.ColumnOrderings($table.reminder);
|
||||
}
|
||||
|
||||
class $$PeriodicRemindersTableProcessedTableManager
|
||||
extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$PeriodicRemindersTable,
|
||||
i1.PeriodicReminder,
|
||||
$$PeriodicRemindersTableFilterComposer,
|
||||
$$PeriodicRemindersTableOrderingComposer,
|
||||
$$PeriodicRemindersTableProcessedTableManager,
|
||||
$$PeriodicRemindersTableInsertCompanionBuilder,
|
||||
$$PeriodicRemindersTableUpdateCompanionBuilder> {
|
||||
const $$PeriodicRemindersTableProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $$PeriodicRemindersTableInsertCompanionBuilder
|
||||
= i1.PeriodicRemindersCompanion Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<Duration> frequency,
|
||||
required String reminder,
|
||||
});
|
||||
typedef $$PeriodicRemindersTableUpdateCompanionBuilder
|
||||
= i1.PeriodicRemindersCompanion Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<Duration> frequency,
|
||||
i0.Value<String> reminder,
|
||||
});
|
||||
|
||||
class $$PeriodicRemindersTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$PeriodicRemindersTable,
|
||||
i1.PeriodicReminder,
|
||||
$$PeriodicRemindersTableFilterComposer,
|
||||
$$PeriodicRemindersTableOrderingComposer,
|
||||
$$PeriodicRemindersTableProcessedTableManager,
|
||||
$$PeriodicRemindersTableInsertCompanionBuilder,
|
||||
$$PeriodicRemindersTableUpdateCompanionBuilder> {
|
||||
$$PeriodicRemindersTableTableManager(
|
||||
i0.GeneratedDatabase db, i1.$PeriodicRemindersTable table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer:
|
||||
$$PeriodicRemindersTableFilterComposer(db, table),
|
||||
orderingComposer:
|
||||
$$PeriodicRemindersTableOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$$PeriodicRemindersTableProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<Duration> frequency = const i0.Value.absent(),
|
||||
i0.Value<String> reminder = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.PeriodicRemindersCompanion(
|
||||
id: id,
|
||||
frequency: frequency,
|
||||
reminder: reminder,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<Duration> frequency = const i0.Value.absent(),
|
||||
required String reminder,
|
||||
}) =>
|
||||
i1.PeriodicRemindersCompanion.insert(
|
||||
id: id,
|
||||
frequency: frequency,
|
||||
reminder: reminder,
|
||||
)));
|
||||
}
|
||||
|
|
|
@ -259,6 +259,117 @@ class TodosCompanion extends i0.UpdateCompanion<i1.Todo> {
|
|||
}
|
||||
}
|
||||
|
||||
class $TodosFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.Todos> {
|
||||
$TodosFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ColumnFilters<String> get title => i0.ColumnFilters($table.title);
|
||||
i0.ColumnFilters<String> get content => i0.ColumnFilters($table.content);
|
||||
i0.ColumnFilters<int> get categoryId => i0.ColumnFilters($table.category);
|
||||
i0.ComposableFilter category(
|
||||
i0.ComposableFilter Function(i1.$CategoriesFilterComposer f) f) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable: i2.ReadDatabaseContainer($db)
|
||||
.resultSet<i1.Categories>('categories'),
|
||||
getCurrentColumn: (f) => f.category,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i1.$CategoriesFilterComposer(db, table),
|
||||
builder: f);
|
||||
}
|
||||
}
|
||||
|
||||
class $TodosOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.Todos> {
|
||||
$TodosOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<String> get title => i0.ColumnOrderings($table.title);
|
||||
i0.ColumnOrderings<String> get content => i0.ColumnOrderings($table.content);
|
||||
i0.ColumnOrderings<int> get categoryId => i0.ColumnOrderings($table.category);
|
||||
i0.ComposableOrdering category(
|
||||
i0.ComposableOrdering Function(i1.$CategoriesOrderingComposer o) o) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable: i2.ReadDatabaseContainer($db)
|
||||
.resultSet<i1.Categories>('categories'),
|
||||
getCurrentColumn: (f) => f.category,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i1.$CategoriesOrderingComposer(db, table),
|
||||
builder: o);
|
||||
}
|
||||
}
|
||||
|
||||
class $TodosProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.Todos,
|
||||
i1.Todo,
|
||||
$TodosFilterComposer,
|
||||
$TodosOrderingComposer,
|
||||
$TodosProcessedTableManager,
|
||||
$TodosInsertCompanionBuilder,
|
||||
$TodosUpdateCompanionBuilder> {
|
||||
const $TodosProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $TodosInsertCompanionBuilder = i1.TodosCompanion Function({
|
||||
i0.Value<int> id,
|
||||
required String title,
|
||||
required String content,
|
||||
i0.Value<int?> category,
|
||||
});
|
||||
typedef $TodosUpdateCompanionBuilder = i1.TodosCompanion Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<String> title,
|
||||
i0.Value<String> content,
|
||||
i0.Value<int?> category,
|
||||
});
|
||||
|
||||
class $TodosTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.Todos,
|
||||
i1.Todo,
|
||||
$TodosFilterComposer,
|
||||
$TodosOrderingComposer,
|
||||
$TodosProcessedTableManager,
|
||||
$TodosInsertCompanionBuilder,
|
||||
$TodosUpdateCompanionBuilder> {
|
||||
$TodosTableManager(i0.GeneratedDatabase db, i1.Todos table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $TodosFilterComposer(db, table),
|
||||
orderingComposer: $TodosOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) => $TodosProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<String> title = const i0.Value.absent(),
|
||||
i0.Value<String> content = const i0.Value.absent(),
|
||||
i0.Value<int?> category = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.TodosCompanion(
|
||||
id: id,
|
||||
title: title,
|
||||
content: content,
|
||||
category: category,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
required String title,
|
||||
required String content,
|
||||
i0.Value<int?> category = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.TodosCompanion.insert(
|
||||
id: id,
|
||||
title: title,
|
||||
content: content,
|
||||
category: category,
|
||||
)));
|
||||
}
|
||||
|
||||
class Categories extends i0.Table with i0.TableInfo<Categories, i1.Category> {
|
||||
@override
|
||||
final i0.GeneratedDatabase attachedDatabase;
|
||||
|
@ -436,6 +547,78 @@ class CategoriesCompanion extends i0.UpdateCompanion<i1.Category> {
|
|||
}
|
||||
}
|
||||
|
||||
class $CategoriesFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.Categories> {
|
||||
$CategoriesFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ColumnFilters<String> get description =>
|
||||
i0.ColumnFilters($table.description);
|
||||
}
|
||||
|
||||
class $CategoriesOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.Categories> {
|
||||
$CategoriesOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<String> get description =>
|
||||
i0.ColumnOrderings($table.description);
|
||||
}
|
||||
|
||||
class $CategoriesProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.Categories,
|
||||
i1.Category,
|
||||
$CategoriesFilterComposer,
|
||||
$CategoriesOrderingComposer,
|
||||
$CategoriesProcessedTableManager,
|
||||
$CategoriesInsertCompanionBuilder,
|
||||
$CategoriesUpdateCompanionBuilder> {
|
||||
const $CategoriesProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $CategoriesInsertCompanionBuilder = i1.CategoriesCompanion Function({
|
||||
i0.Value<int> id,
|
||||
required String description,
|
||||
});
|
||||
typedef $CategoriesUpdateCompanionBuilder = i1.CategoriesCompanion Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<String> description,
|
||||
});
|
||||
|
||||
class $CategoriesTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.Categories,
|
||||
i1.Category,
|
||||
$CategoriesFilterComposer,
|
||||
$CategoriesOrderingComposer,
|
||||
$CategoriesProcessedTableManager,
|
||||
$CategoriesInsertCompanionBuilder,
|
||||
$CategoriesUpdateCompanionBuilder> {
|
||||
$CategoriesTableManager(i0.GeneratedDatabase db, i1.Categories table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $CategoriesFilterComposer(db, table),
|
||||
orderingComposer: $CategoriesOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$CategoriesProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<String> description = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.CategoriesCompanion(
|
||||
id: id,
|
||||
description: description,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
required String description,
|
||||
}) =>
|
||||
i1.CategoriesCompanion.insert(
|
||||
id: id,
|
||||
description: description,
|
||||
)));
|
||||
}
|
||||
|
||||
class ExampleDrift extends i2.ModularAccessor {
|
||||
ExampleDrift(i0.GeneratedDatabase db) : super(db);
|
||||
i0.Selectable<i1.Todo> filterTodos(FilterTodos$predicate predicate) {
|
||||
|
|
|
@ -310,6 +310,81 @@ class FriendsCompanion extends i0.UpdateCompanion<i2.Friend> {
|
|||
}
|
||||
}
|
||||
|
||||
class $FriendsFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i2.Friends> {
|
||||
$FriendsFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get userAId => i0.ColumnFilters($table.userA);
|
||||
i0.ColumnFilters<int> get userBId => i0.ColumnFilters($table.userB);
|
||||
}
|
||||
|
||||
class $FriendsOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i2.Friends> {
|
||||
$FriendsOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get userAId => i0.ColumnOrderings($table.userA);
|
||||
i0.ColumnOrderings<int> get userBId => i0.ColumnOrderings($table.userB);
|
||||
}
|
||||
|
||||
class $FriendsProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i2.Friends,
|
||||
i2.Friend,
|
||||
$FriendsFilterComposer,
|
||||
$FriendsOrderingComposer,
|
||||
$FriendsProcessedTableManager,
|
||||
$FriendsInsertCompanionBuilder,
|
||||
$FriendsUpdateCompanionBuilder> {
|
||||
const $FriendsProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $FriendsInsertCompanionBuilder = i2.FriendsCompanion Function({
|
||||
required int userA,
|
||||
required int userB,
|
||||
i0.Value<int> rowid,
|
||||
});
|
||||
typedef $FriendsUpdateCompanionBuilder = i2.FriendsCompanion Function({
|
||||
i0.Value<int> userA,
|
||||
i0.Value<int> userB,
|
||||
i0.Value<int> rowid,
|
||||
});
|
||||
|
||||
class $FriendsTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i2.Friends,
|
||||
i2.Friend,
|
||||
$FriendsFilterComposer,
|
||||
$FriendsOrderingComposer,
|
||||
$FriendsProcessedTableManager,
|
||||
$FriendsInsertCompanionBuilder,
|
||||
$FriendsUpdateCompanionBuilder> {
|
||||
$FriendsTableManager(i0.GeneratedDatabase db, i2.Friends table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $FriendsFilterComposer(db, table),
|
||||
orderingComposer: $FriendsOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) => $FriendsProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> userA = const i0.Value.absent(),
|
||||
i0.Value<int> userB = const i0.Value.absent(),
|
||||
i0.Value<int> rowid = const i0.Value.absent(),
|
||||
}) =>
|
||||
i2.FriendsCompanion(
|
||||
userA: userA,
|
||||
userB: userB,
|
||||
rowid: rowid,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
required int userA,
|
||||
required int userB,
|
||||
i0.Value<int> rowid = const i0.Value.absent(),
|
||||
}) =>
|
||||
i2.FriendsCompanion.insert(
|
||||
userA: userA,
|
||||
userB: userB,
|
||||
rowid: rowid,
|
||||
)));
|
||||
}
|
||||
|
||||
class WithExistingDrift extends i3.ModularAccessor {
|
||||
WithExistingDrift(i0.GeneratedDatabase db) : super(db);
|
||||
i0.Selectable<i1.UserWithFriends> allFriendsOf(int id) {
|
||||
|
|
|
@ -19,175 +19,13 @@ abstract class $JsonBasedDatabase extends i0.GeneratedDatabase {
|
|||
[buyableItems, shoppingCarts];
|
||||
}
|
||||
|
||||
class $$BuyableItemsTableFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.$BuyableItemsTable> {
|
||||
$$BuyableItemsTableFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ColumnFilters<String> get description =>
|
||||
i0.ColumnFilters($table.description);
|
||||
i0.ColumnFilters<int> get price => i0.ColumnFilters($table.price);
|
||||
}
|
||||
|
||||
class $$BuyableItemsTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.$BuyableItemsTable> {
|
||||
$$BuyableItemsTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<String> get description =>
|
||||
i0.ColumnOrderings($table.description);
|
||||
i0.ColumnOrderings<int> get price => i0.ColumnOrderings($table.price);
|
||||
}
|
||||
|
||||
class $$BuyableItemsTableProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$BuyableItemsTable,
|
||||
i1.BuyableItem,
|
||||
$$BuyableItemsTableFilterComposer,
|
||||
$$BuyableItemsTableOrderingComposer,
|
||||
$$BuyableItemsTableProcessedTableManager,
|
||||
$$BuyableItemsTableInsertCompanionBuilder,
|
||||
$$BuyableItemsTableUpdateCompanionBuilder> {
|
||||
const $$BuyableItemsTableProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $$BuyableItemsTableInsertCompanionBuilder = i1.BuyableItemsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
required String description,
|
||||
required int price,
|
||||
});
|
||||
typedef $$BuyableItemsTableUpdateCompanionBuilder = i1.BuyableItemsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<String> description,
|
||||
i0.Value<int> price,
|
||||
});
|
||||
|
||||
class $$BuyableItemsTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$BuyableItemsTable,
|
||||
i1.BuyableItem,
|
||||
$$BuyableItemsTableFilterComposer,
|
||||
$$BuyableItemsTableOrderingComposer,
|
||||
$$BuyableItemsTableProcessedTableManager,
|
||||
$$BuyableItemsTableInsertCompanionBuilder,
|
||||
$$BuyableItemsTableUpdateCompanionBuilder> {
|
||||
$$BuyableItemsTableTableManager(
|
||||
i0.GeneratedDatabase db, i1.$BuyableItemsTable table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $$BuyableItemsTableFilterComposer(db, table),
|
||||
orderingComposer: $$BuyableItemsTableOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$$BuyableItemsTableProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<String> description = const i0.Value.absent(),
|
||||
i0.Value<int> price = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.BuyableItemsCompanion(
|
||||
id: id,
|
||||
description: description,
|
||||
price: price,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
required String description,
|
||||
required int price,
|
||||
}) =>
|
||||
i1.BuyableItemsCompanion.insert(
|
||||
id: id,
|
||||
description: description,
|
||||
price: price,
|
||||
)));
|
||||
}
|
||||
|
||||
class $$ShoppingCartsTableFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i2.$ShoppingCartsTable> {
|
||||
$$ShoppingCartsTableFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ColumnFilters<String> get entriesValue => i0.ColumnFilters($table.entries);
|
||||
i0.ColumnWithTypeConverterFilters<
|
||||
i3.ShoppingCartEntries,
|
||||
i3.ShoppingCartEntries,
|
||||
String> get entries => i0.ColumnWithTypeConverterFilters($table.entries);
|
||||
}
|
||||
|
||||
class $$ShoppingCartsTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i2.$ShoppingCartsTable> {
|
||||
$$ShoppingCartsTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<String> get entries => i0.ColumnOrderings($table.entries);
|
||||
}
|
||||
|
||||
class $$ShoppingCartsTableProcessedTableManager
|
||||
extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i2.$ShoppingCartsTable,
|
||||
i2.ShoppingCart,
|
||||
$$ShoppingCartsTableFilterComposer,
|
||||
$$ShoppingCartsTableOrderingComposer,
|
||||
$$ShoppingCartsTableProcessedTableManager,
|
||||
$$ShoppingCartsTableInsertCompanionBuilder,
|
||||
$$ShoppingCartsTableUpdateCompanionBuilder> {
|
||||
const $$ShoppingCartsTableProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $$ShoppingCartsTableInsertCompanionBuilder = i2.ShoppingCartsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
required i3.ShoppingCartEntries entries,
|
||||
});
|
||||
typedef $$ShoppingCartsTableUpdateCompanionBuilder = i2.ShoppingCartsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<i3.ShoppingCartEntries> entries,
|
||||
});
|
||||
|
||||
class $$ShoppingCartsTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i2.$ShoppingCartsTable,
|
||||
i2.ShoppingCart,
|
||||
$$ShoppingCartsTableFilterComposer,
|
||||
$$ShoppingCartsTableOrderingComposer,
|
||||
$$ShoppingCartsTableProcessedTableManager,
|
||||
$$ShoppingCartsTableInsertCompanionBuilder,
|
||||
$$ShoppingCartsTableUpdateCompanionBuilder> {
|
||||
$$ShoppingCartsTableTableManager(
|
||||
i0.GeneratedDatabase db, i2.$ShoppingCartsTable table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $$ShoppingCartsTableFilterComposer(db, table),
|
||||
orderingComposer: $$ShoppingCartsTableOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$$ShoppingCartsTableProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<i3.ShoppingCartEntries> entries =
|
||||
const i0.Value.absent(),
|
||||
}) =>
|
||||
i2.ShoppingCartsCompanion(
|
||||
id: id,
|
||||
entries: entries,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
required i3.ShoppingCartEntries entries,
|
||||
}) =>
|
||||
i2.ShoppingCartsCompanion.insert(
|
||||
id: id,
|
||||
entries: entries,
|
||||
)));
|
||||
}
|
||||
|
||||
class $JsonBasedDatabaseManager {
|
||||
final $JsonBasedDatabase _db;
|
||||
$JsonBasedDatabaseManager(this._db);
|
||||
$$BuyableItemsTableTableManager get buyableItems =>
|
||||
$$BuyableItemsTableTableManager(_db, _db.buyableItems);
|
||||
$$ShoppingCartsTableTableManager get shoppingCarts =>
|
||||
$$ShoppingCartsTableTableManager(_db, _db.shoppingCarts);
|
||||
i1.$$BuyableItemsTableTableManager get buyableItems =>
|
||||
i1.$$BuyableItemsTableTableManager(_db, _db.buyableItems);
|
||||
i2.$$ShoppingCartsTableTableManager get shoppingCarts =>
|
||||
i2.$$ShoppingCartsTableTableManager(_db, _db.shoppingCarts);
|
||||
}
|
||||
|
||||
class $ShoppingCartsTable extends i3.ShoppingCarts
|
||||
|
@ -373,3 +211,82 @@ class ShoppingCartsCompanion extends i0.UpdateCompanion<i2.ShoppingCart> {
|
|||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
class $$ShoppingCartsTableFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i2.$ShoppingCartsTable> {
|
||||
$$ShoppingCartsTableFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ColumnFilters<String> get entriesValue => i0.ColumnFilters($table.entries);
|
||||
i0.ColumnWithTypeConverterFilters<
|
||||
i3.ShoppingCartEntries,
|
||||
i3.ShoppingCartEntries,
|
||||
String> get entries => i0.ColumnWithTypeConverterFilters($table.entries);
|
||||
}
|
||||
|
||||
class $$ShoppingCartsTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i2.$ShoppingCartsTable> {
|
||||
$$ShoppingCartsTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<String> get entries => i0.ColumnOrderings($table.entries);
|
||||
}
|
||||
|
||||
class $$ShoppingCartsTableProcessedTableManager
|
||||
extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i2.$ShoppingCartsTable,
|
||||
i2.ShoppingCart,
|
||||
$$ShoppingCartsTableFilterComposer,
|
||||
$$ShoppingCartsTableOrderingComposer,
|
||||
$$ShoppingCartsTableProcessedTableManager,
|
||||
$$ShoppingCartsTableInsertCompanionBuilder,
|
||||
$$ShoppingCartsTableUpdateCompanionBuilder> {
|
||||
const $$ShoppingCartsTableProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $$ShoppingCartsTableInsertCompanionBuilder = i2.ShoppingCartsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
required i3.ShoppingCartEntries entries,
|
||||
});
|
||||
typedef $$ShoppingCartsTableUpdateCompanionBuilder = i2.ShoppingCartsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<i3.ShoppingCartEntries> entries,
|
||||
});
|
||||
|
||||
class $$ShoppingCartsTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i2.$ShoppingCartsTable,
|
||||
i2.ShoppingCart,
|
||||
$$ShoppingCartsTableFilterComposer,
|
||||
$$ShoppingCartsTableOrderingComposer,
|
||||
$$ShoppingCartsTableProcessedTableManager,
|
||||
$$ShoppingCartsTableInsertCompanionBuilder,
|
||||
$$ShoppingCartsTableUpdateCompanionBuilder> {
|
||||
$$ShoppingCartsTableTableManager(
|
||||
i0.GeneratedDatabase db, i2.$ShoppingCartsTable table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $$ShoppingCartsTableFilterComposer(db, table),
|
||||
orderingComposer: $$ShoppingCartsTableOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$$ShoppingCartsTableProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<i3.ShoppingCartEntries> entries =
|
||||
const i0.Value.absent(),
|
||||
}) =>
|
||||
i2.ShoppingCartsCompanion(
|
||||
id: id,
|
||||
entries: entries,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
required i3.ShoppingCartEntries entries,
|
||||
}) =>
|
||||
i2.ShoppingCartsCompanion.insert(
|
||||
id: id,
|
||||
entries: entries,
|
||||
)));
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@ import 'package:drift_docs/snippets/modular/many_to_many/shared.drift.dart'
|
|||
as i1;
|
||||
import 'package:drift_docs/snippets/modular/many_to_many/relational.drift.dart'
|
||||
as i2;
|
||||
import 'package:drift/internal/modular.dart' as i3;
|
||||
import 'package:drift_docs/snippets/modular/many_to_many/relational.dart' as i4;
|
||||
import 'package:drift_docs/snippets/modular/many_to_many/relational.dart' as i3;
|
||||
import 'package:drift/internal/modular.dart' as i4;
|
||||
|
||||
abstract class $RelationalDatabase extends i0.GeneratedDatabase {
|
||||
$RelationalDatabase(i0.QueryExecutor e) : super(e);
|
||||
|
@ -23,334 +23,18 @@ abstract class $RelationalDatabase extends i0.GeneratedDatabase {
|
|||
[buyableItems, shoppingCarts, shoppingCartEntries];
|
||||
}
|
||||
|
||||
class $$BuyableItemsTableFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.$BuyableItemsTable> {
|
||||
$$BuyableItemsTableFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ColumnFilters<String> get description =>
|
||||
i0.ColumnFilters($table.description);
|
||||
i0.ColumnFilters<int> get price => i0.ColumnFilters($table.price);
|
||||
i0.ComposableFilter shoppingCartEntriesRefs(
|
||||
i0.ComposableFilter Function($$ShoppingCartEntriesTableFilterComposer f)
|
||||
f) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable: i3.ReadDatabaseContainer($db)
|
||||
.resultSet<i2.$ShoppingCartEntriesTable>('shopping_cart_entries'),
|
||||
getCurrentColumn: (f) => f.id,
|
||||
getReferencedColumn: (f) => f.item,
|
||||
getReferencedComposer: (db, table) =>
|
||||
$$ShoppingCartEntriesTableFilterComposer(db, table),
|
||||
builder: f);
|
||||
}
|
||||
}
|
||||
|
||||
class $$BuyableItemsTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.$BuyableItemsTable> {
|
||||
$$BuyableItemsTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<String> get description =>
|
||||
i0.ColumnOrderings($table.description);
|
||||
i0.ColumnOrderings<int> get price => i0.ColumnOrderings($table.price);
|
||||
}
|
||||
|
||||
class $$BuyableItemsTableProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$BuyableItemsTable,
|
||||
i1.BuyableItem,
|
||||
$$BuyableItemsTableFilterComposer,
|
||||
$$BuyableItemsTableOrderingComposer,
|
||||
$$BuyableItemsTableProcessedTableManager,
|
||||
$$BuyableItemsTableInsertCompanionBuilder,
|
||||
$$BuyableItemsTableUpdateCompanionBuilder> {
|
||||
const $$BuyableItemsTableProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $$BuyableItemsTableInsertCompanionBuilder = i1.BuyableItemsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
required String description,
|
||||
required int price,
|
||||
});
|
||||
typedef $$BuyableItemsTableUpdateCompanionBuilder = i1.BuyableItemsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<String> description,
|
||||
i0.Value<int> price,
|
||||
});
|
||||
|
||||
class $$BuyableItemsTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$BuyableItemsTable,
|
||||
i1.BuyableItem,
|
||||
$$BuyableItemsTableFilterComposer,
|
||||
$$BuyableItemsTableOrderingComposer,
|
||||
$$BuyableItemsTableProcessedTableManager,
|
||||
$$BuyableItemsTableInsertCompanionBuilder,
|
||||
$$BuyableItemsTableUpdateCompanionBuilder> {
|
||||
$$BuyableItemsTableTableManager(
|
||||
i0.GeneratedDatabase db, i1.$BuyableItemsTable table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $$BuyableItemsTableFilterComposer(db, table),
|
||||
orderingComposer: $$BuyableItemsTableOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$$BuyableItemsTableProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<String> description = const i0.Value.absent(),
|
||||
i0.Value<int> price = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.BuyableItemsCompanion(
|
||||
id: id,
|
||||
description: description,
|
||||
price: price,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
required String description,
|
||||
required int price,
|
||||
}) =>
|
||||
i1.BuyableItemsCompanion.insert(
|
||||
id: id,
|
||||
description: description,
|
||||
price: price,
|
||||
)));
|
||||
}
|
||||
|
||||
class $$ShoppingCartsTableFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i2.$ShoppingCartsTable> {
|
||||
$$ShoppingCartsTableFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ComposableFilter shoppingCartEntriesRefs(
|
||||
i0.ComposableFilter Function($$ShoppingCartEntriesTableFilterComposer f)
|
||||
f) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable: i3.ReadDatabaseContainer($db)
|
||||
.resultSet<i2.$ShoppingCartEntriesTable>('shopping_cart_entries'),
|
||||
getCurrentColumn: (f) => f.id,
|
||||
getReferencedColumn: (f) => f.shoppingCart,
|
||||
getReferencedComposer: (db, table) =>
|
||||
$$ShoppingCartEntriesTableFilterComposer(db, table),
|
||||
builder: f);
|
||||
}
|
||||
}
|
||||
|
||||
class $$ShoppingCartsTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i2.$ShoppingCartsTable> {
|
||||
$$ShoppingCartsTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
}
|
||||
|
||||
class $$ShoppingCartsTableProcessedTableManager
|
||||
extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i2.$ShoppingCartsTable,
|
||||
i2.ShoppingCart,
|
||||
$$ShoppingCartsTableFilterComposer,
|
||||
$$ShoppingCartsTableOrderingComposer,
|
||||
$$ShoppingCartsTableProcessedTableManager,
|
||||
$$ShoppingCartsTableInsertCompanionBuilder,
|
||||
$$ShoppingCartsTableUpdateCompanionBuilder> {
|
||||
const $$ShoppingCartsTableProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $$ShoppingCartsTableInsertCompanionBuilder = i2.ShoppingCartsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
});
|
||||
typedef $$ShoppingCartsTableUpdateCompanionBuilder = i2.ShoppingCartsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
});
|
||||
|
||||
class $$ShoppingCartsTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i2.$ShoppingCartsTable,
|
||||
i2.ShoppingCart,
|
||||
$$ShoppingCartsTableFilterComposer,
|
||||
$$ShoppingCartsTableOrderingComposer,
|
||||
$$ShoppingCartsTableProcessedTableManager,
|
||||
$$ShoppingCartsTableInsertCompanionBuilder,
|
||||
$$ShoppingCartsTableUpdateCompanionBuilder> {
|
||||
$$ShoppingCartsTableTableManager(
|
||||
i0.GeneratedDatabase db, i2.$ShoppingCartsTable table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $$ShoppingCartsTableFilterComposer(db, table),
|
||||
orderingComposer: $$ShoppingCartsTableOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$$ShoppingCartsTableProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
}) =>
|
||||
i2.ShoppingCartsCompanion(
|
||||
id: id,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
}) =>
|
||||
i2.ShoppingCartsCompanion.insert(
|
||||
id: id,
|
||||
)));
|
||||
}
|
||||
|
||||
class $$ShoppingCartEntriesTableFilterComposer extends i0
|
||||
.FilterComposer<i0.GeneratedDatabase, i2.$ShoppingCartEntriesTable> {
|
||||
$$ShoppingCartEntriesTableFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get shoppingCartId =>
|
||||
i0.ColumnFilters($table.shoppingCart);
|
||||
i0.ComposableFilter shoppingCart(
|
||||
i0.ComposableFilter Function($$ShoppingCartsTableFilterComposer f) f) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable: i3.ReadDatabaseContainer($db)
|
||||
.resultSet<i2.$ShoppingCartsTable>('shopping_carts'),
|
||||
getCurrentColumn: (f) => f.shoppingCart,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
$$ShoppingCartsTableFilterComposer(db, table),
|
||||
builder: f);
|
||||
}
|
||||
|
||||
i0.ColumnFilters<int> get itemId => i0.ColumnFilters($table.item);
|
||||
i0.ComposableFilter item(
|
||||
i0.ComposableFilter Function($$BuyableItemsTableFilterComposer f) f) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable: i3.ReadDatabaseContainer($db)
|
||||
.resultSet<i1.$BuyableItemsTable>('buyable_items'),
|
||||
getCurrentColumn: (f) => f.item,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
$$BuyableItemsTableFilterComposer(db, table),
|
||||
builder: f);
|
||||
}
|
||||
}
|
||||
|
||||
class $$ShoppingCartEntriesTableOrderingComposer extends i0
|
||||
.OrderingComposer<i0.GeneratedDatabase, i2.$ShoppingCartEntriesTable> {
|
||||
$$ShoppingCartEntriesTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get shoppingCartId =>
|
||||
i0.ColumnOrderings($table.shoppingCart);
|
||||
i0.ComposableOrdering shoppingCart(
|
||||
i0.ComposableOrdering Function($$ShoppingCartsTableOrderingComposer o)
|
||||
o) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable: i3.ReadDatabaseContainer($db)
|
||||
.resultSet<i2.$ShoppingCartsTable>('shopping_carts'),
|
||||
getCurrentColumn: (f) => f.shoppingCart,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
$$ShoppingCartsTableOrderingComposer(db, table),
|
||||
builder: o);
|
||||
}
|
||||
|
||||
i0.ColumnOrderings<int> get itemId => i0.ColumnOrderings($table.item);
|
||||
i0.ComposableOrdering item(
|
||||
i0.ComposableOrdering Function($$BuyableItemsTableOrderingComposer o) o) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable: i3.ReadDatabaseContainer($db)
|
||||
.resultSet<i1.$BuyableItemsTable>('buyable_items'),
|
||||
getCurrentColumn: (f) => f.item,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
$$BuyableItemsTableOrderingComposer(db, table),
|
||||
builder: o);
|
||||
}
|
||||
}
|
||||
|
||||
class $$ShoppingCartEntriesTableProcessedTableManager
|
||||
extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i2.$ShoppingCartEntriesTable,
|
||||
i2.ShoppingCartEntry,
|
||||
$$ShoppingCartEntriesTableFilterComposer,
|
||||
$$ShoppingCartEntriesTableOrderingComposer,
|
||||
$$ShoppingCartEntriesTableProcessedTableManager,
|
||||
$$ShoppingCartEntriesTableInsertCompanionBuilder,
|
||||
$$ShoppingCartEntriesTableUpdateCompanionBuilder> {
|
||||
const $$ShoppingCartEntriesTableProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $$ShoppingCartEntriesTableInsertCompanionBuilder
|
||||
= i2.ShoppingCartEntriesCompanion Function({
|
||||
required int shoppingCart,
|
||||
required int item,
|
||||
i0.Value<int> rowid,
|
||||
});
|
||||
typedef $$ShoppingCartEntriesTableUpdateCompanionBuilder
|
||||
= i2.ShoppingCartEntriesCompanion Function({
|
||||
i0.Value<int> shoppingCart,
|
||||
i0.Value<int> item,
|
||||
i0.Value<int> rowid,
|
||||
});
|
||||
|
||||
class $$ShoppingCartEntriesTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i2.$ShoppingCartEntriesTable,
|
||||
i2.ShoppingCartEntry,
|
||||
$$ShoppingCartEntriesTableFilterComposer,
|
||||
$$ShoppingCartEntriesTableOrderingComposer,
|
||||
$$ShoppingCartEntriesTableProcessedTableManager,
|
||||
$$ShoppingCartEntriesTableInsertCompanionBuilder,
|
||||
$$ShoppingCartEntriesTableUpdateCompanionBuilder> {
|
||||
$$ShoppingCartEntriesTableTableManager(
|
||||
i0.GeneratedDatabase db, i2.$ShoppingCartEntriesTable table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer:
|
||||
$$ShoppingCartEntriesTableFilterComposer(db, table),
|
||||
orderingComposer:
|
||||
$$ShoppingCartEntriesTableOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$$ShoppingCartEntriesTableProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> shoppingCart = const i0.Value.absent(),
|
||||
i0.Value<int> item = const i0.Value.absent(),
|
||||
i0.Value<int> rowid = const i0.Value.absent(),
|
||||
}) =>
|
||||
i2.ShoppingCartEntriesCompanion(
|
||||
shoppingCart: shoppingCart,
|
||||
item: item,
|
||||
rowid: rowid,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
required int shoppingCart,
|
||||
required int item,
|
||||
i0.Value<int> rowid = const i0.Value.absent(),
|
||||
}) =>
|
||||
i2.ShoppingCartEntriesCompanion.insert(
|
||||
shoppingCart: shoppingCart,
|
||||
item: item,
|
||||
rowid: rowid,
|
||||
)));
|
||||
}
|
||||
|
||||
class $RelationalDatabaseManager {
|
||||
final $RelationalDatabase _db;
|
||||
$RelationalDatabaseManager(this._db);
|
||||
$$BuyableItemsTableTableManager get buyableItems =>
|
||||
$$BuyableItemsTableTableManager(_db, _db.buyableItems);
|
||||
$$ShoppingCartsTableTableManager get shoppingCarts =>
|
||||
$$ShoppingCartsTableTableManager(_db, _db.shoppingCarts);
|
||||
$$ShoppingCartEntriesTableTableManager get shoppingCartEntries =>
|
||||
$$ShoppingCartEntriesTableTableManager(_db, _db.shoppingCartEntries);
|
||||
i1.$$BuyableItemsTableTableManager get buyableItems =>
|
||||
i1.$$BuyableItemsTableTableManager(_db, _db.buyableItems);
|
||||
i2.$$ShoppingCartsTableTableManager get shoppingCarts =>
|
||||
i2.$$ShoppingCartsTableTableManager(_db, _db.shoppingCarts);
|
||||
i2.$$ShoppingCartEntriesTableTableManager get shoppingCartEntries =>
|
||||
i2.$$ShoppingCartEntriesTableTableManager(_db, _db.shoppingCartEntries);
|
||||
}
|
||||
|
||||
class $ShoppingCartsTable extends i4.ShoppingCarts
|
||||
class $ShoppingCartsTable extends i3.ShoppingCarts
|
||||
with i0.TableInfo<$ShoppingCartsTable, i2.ShoppingCart> {
|
||||
@override
|
||||
final i0.GeneratedDatabase attachedDatabase;
|
||||
|
@ -492,7 +176,73 @@ class ShoppingCartsCompanion extends i0.UpdateCompanion<i2.ShoppingCart> {
|
|||
}
|
||||
}
|
||||
|
||||
class $ShoppingCartEntriesTable extends i4.ShoppingCartEntries
|
||||
class $$ShoppingCartsTableFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i2.$ShoppingCartsTable> {
|
||||
$$ShoppingCartsTableFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
}
|
||||
|
||||
class $$ShoppingCartsTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i2.$ShoppingCartsTable> {
|
||||
$$ShoppingCartsTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
}
|
||||
|
||||
class $$ShoppingCartsTableProcessedTableManager
|
||||
extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i2.$ShoppingCartsTable,
|
||||
i2.ShoppingCart,
|
||||
$$ShoppingCartsTableFilterComposer,
|
||||
$$ShoppingCartsTableOrderingComposer,
|
||||
$$ShoppingCartsTableProcessedTableManager,
|
||||
$$ShoppingCartsTableInsertCompanionBuilder,
|
||||
$$ShoppingCartsTableUpdateCompanionBuilder> {
|
||||
const $$ShoppingCartsTableProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $$ShoppingCartsTableInsertCompanionBuilder = i2.ShoppingCartsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
});
|
||||
typedef $$ShoppingCartsTableUpdateCompanionBuilder = i2.ShoppingCartsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
});
|
||||
|
||||
class $$ShoppingCartsTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i2.$ShoppingCartsTable,
|
||||
i2.ShoppingCart,
|
||||
$$ShoppingCartsTableFilterComposer,
|
||||
$$ShoppingCartsTableOrderingComposer,
|
||||
$$ShoppingCartsTableProcessedTableManager,
|
||||
$$ShoppingCartsTableInsertCompanionBuilder,
|
||||
$$ShoppingCartsTableUpdateCompanionBuilder> {
|
||||
$$ShoppingCartsTableTableManager(
|
||||
i0.GeneratedDatabase db, i2.$ShoppingCartsTable table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $$ShoppingCartsTableFilterComposer(db, table),
|
||||
orderingComposer: $$ShoppingCartsTableOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$$ShoppingCartsTableProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
}) =>
|
||||
i2.ShoppingCartsCompanion(
|
||||
id: id,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
}) =>
|
||||
i2.ShoppingCartsCompanion.insert(
|
||||
id: id,
|
||||
)));
|
||||
}
|
||||
|
||||
class $ShoppingCartEntriesTable extends i3.ShoppingCartEntries
|
||||
with i0.TableInfo<$ShoppingCartEntriesTable, i2.ShoppingCartEntry> {
|
||||
@override
|
||||
final i0.GeneratedDatabase attachedDatabase;
|
||||
|
@ -690,3 +440,143 @@ class ShoppingCartEntriesCompanion
|
|||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
class $$ShoppingCartEntriesTableFilterComposer extends i0
|
||||
.FilterComposer<i0.GeneratedDatabase, i2.$ShoppingCartEntriesTable> {
|
||||
$$ShoppingCartEntriesTableFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get shoppingCartId =>
|
||||
i0.ColumnFilters($table.shoppingCart);
|
||||
i0.ComposableFilter shoppingCart(
|
||||
i0.ComposableFilter Function(i2.$$ShoppingCartsTableFilterComposer f) f) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable: i4.ReadDatabaseContainer($db)
|
||||
.resultSet<i2.$ShoppingCartsTable>('shopping_carts'),
|
||||
getCurrentColumn: (f) => f.shoppingCart,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i2.$$ShoppingCartsTableFilterComposer(db, table),
|
||||
builder: f);
|
||||
}
|
||||
|
||||
i0.ColumnFilters<int> get itemId => i0.ColumnFilters($table.item);
|
||||
i0.ComposableFilter item(
|
||||
i0.ComposableFilter Function(i1.$$BuyableItemsTableFilterComposer f) f) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable: i4.ReadDatabaseContainer($db)
|
||||
.resultSet<i1.$BuyableItemsTable>('buyable_items'),
|
||||
getCurrentColumn: (f) => f.item,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i1.$$BuyableItemsTableFilterComposer(db, table),
|
||||
builder: f);
|
||||
}
|
||||
}
|
||||
|
||||
class $$ShoppingCartEntriesTableOrderingComposer extends i0
|
||||
.OrderingComposer<i0.GeneratedDatabase, i2.$ShoppingCartEntriesTable> {
|
||||
$$ShoppingCartEntriesTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get shoppingCartId =>
|
||||
i0.ColumnOrderings($table.shoppingCart);
|
||||
i0.ComposableOrdering shoppingCart(
|
||||
i0.ComposableOrdering Function(i2.$$ShoppingCartsTableOrderingComposer o)
|
||||
o) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable: i4.ReadDatabaseContainer($db)
|
||||
.resultSet<i2.$ShoppingCartsTable>('shopping_carts'),
|
||||
getCurrentColumn: (f) => f.shoppingCart,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i2.$$ShoppingCartsTableOrderingComposer(db, table),
|
||||
builder: o);
|
||||
}
|
||||
|
||||
i0.ColumnOrderings<int> get itemId => i0.ColumnOrderings($table.item);
|
||||
i0.ComposableOrdering item(
|
||||
i0.ComposableOrdering Function(i1.$$BuyableItemsTableOrderingComposer o)
|
||||
o) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable: i4.ReadDatabaseContainer($db)
|
||||
.resultSet<i1.$BuyableItemsTable>('buyable_items'),
|
||||
getCurrentColumn: (f) => f.item,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i1.$$BuyableItemsTableOrderingComposer(db, table),
|
||||
builder: o);
|
||||
}
|
||||
}
|
||||
|
||||
class $$ShoppingCartEntriesTableProcessedTableManager
|
||||
extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i2.$ShoppingCartEntriesTable,
|
||||
i2.ShoppingCartEntry,
|
||||
$$ShoppingCartEntriesTableFilterComposer,
|
||||
$$ShoppingCartEntriesTableOrderingComposer,
|
||||
$$ShoppingCartEntriesTableProcessedTableManager,
|
||||
$$ShoppingCartEntriesTableInsertCompanionBuilder,
|
||||
$$ShoppingCartEntriesTableUpdateCompanionBuilder> {
|
||||
const $$ShoppingCartEntriesTableProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $$ShoppingCartEntriesTableInsertCompanionBuilder
|
||||
= i2.ShoppingCartEntriesCompanion Function({
|
||||
required int shoppingCart,
|
||||
required int item,
|
||||
i0.Value<int> rowid,
|
||||
});
|
||||
typedef $$ShoppingCartEntriesTableUpdateCompanionBuilder
|
||||
= i2.ShoppingCartEntriesCompanion Function({
|
||||
i0.Value<int> shoppingCart,
|
||||
i0.Value<int> item,
|
||||
i0.Value<int> rowid,
|
||||
});
|
||||
|
||||
class $$ShoppingCartEntriesTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i2.$ShoppingCartEntriesTable,
|
||||
i2.ShoppingCartEntry,
|
||||
$$ShoppingCartEntriesTableFilterComposer,
|
||||
$$ShoppingCartEntriesTableOrderingComposer,
|
||||
$$ShoppingCartEntriesTableProcessedTableManager,
|
||||
$$ShoppingCartEntriesTableInsertCompanionBuilder,
|
||||
$$ShoppingCartEntriesTableUpdateCompanionBuilder> {
|
||||
$$ShoppingCartEntriesTableTableManager(
|
||||
i0.GeneratedDatabase db, i2.$ShoppingCartEntriesTable table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer:
|
||||
$$ShoppingCartEntriesTableFilterComposer(db, table),
|
||||
orderingComposer:
|
||||
$$ShoppingCartEntriesTableOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$$ShoppingCartEntriesTableProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> shoppingCart = const i0.Value.absent(),
|
||||
i0.Value<int> item = const i0.Value.absent(),
|
||||
i0.Value<int> rowid = const i0.Value.absent(),
|
||||
}) =>
|
||||
i2.ShoppingCartEntriesCompanion(
|
||||
shoppingCart: shoppingCart,
|
||||
item: item,
|
||||
rowid: rowid,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
required int shoppingCart,
|
||||
required int item,
|
||||
i0.Value<int> rowid = const i0.Value.absent(),
|
||||
}) =>
|
||||
i2.ShoppingCartEntriesCompanion.insert(
|
||||
shoppingCart: shoppingCart,
|
||||
item: item,
|
||||
rowid: rowid,
|
||||
)));
|
||||
}
|
||||
|
|
|
@ -218,3 +218,86 @@ class BuyableItemsCompanion extends i0.UpdateCompanion<i1.BuyableItem> {
|
|||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
class $$BuyableItemsTableFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.$BuyableItemsTable> {
|
||||
$$BuyableItemsTableFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ColumnFilters<String> get description =>
|
||||
i0.ColumnFilters($table.description);
|
||||
i0.ColumnFilters<int> get price => i0.ColumnFilters($table.price);
|
||||
}
|
||||
|
||||
class $$BuyableItemsTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.$BuyableItemsTable> {
|
||||
$$BuyableItemsTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<String> get description =>
|
||||
i0.ColumnOrderings($table.description);
|
||||
i0.ColumnOrderings<int> get price => i0.ColumnOrderings($table.price);
|
||||
}
|
||||
|
||||
class $$BuyableItemsTableProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$BuyableItemsTable,
|
||||
i1.BuyableItem,
|
||||
$$BuyableItemsTableFilterComposer,
|
||||
$$BuyableItemsTableOrderingComposer,
|
||||
$$BuyableItemsTableProcessedTableManager,
|
||||
$$BuyableItemsTableInsertCompanionBuilder,
|
||||
$$BuyableItemsTableUpdateCompanionBuilder> {
|
||||
const $$BuyableItemsTableProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $$BuyableItemsTableInsertCompanionBuilder = i1.BuyableItemsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
required String description,
|
||||
required int price,
|
||||
});
|
||||
typedef $$BuyableItemsTableUpdateCompanionBuilder = i1.BuyableItemsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<String> description,
|
||||
i0.Value<int> price,
|
||||
});
|
||||
|
||||
class $$BuyableItemsTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$BuyableItemsTable,
|
||||
i1.BuyableItem,
|
||||
$$BuyableItemsTableFilterComposer,
|
||||
$$BuyableItemsTableOrderingComposer,
|
||||
$$BuyableItemsTableProcessedTableManager,
|
||||
$$BuyableItemsTableInsertCompanionBuilder,
|
||||
$$BuyableItemsTableUpdateCompanionBuilder> {
|
||||
$$BuyableItemsTableTableManager(
|
||||
i0.GeneratedDatabase db, i1.$BuyableItemsTable table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $$BuyableItemsTableFilterComposer(db, table),
|
||||
orderingComposer: $$BuyableItemsTableOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$$BuyableItemsTableProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<String> description = const i0.Value.absent(),
|
||||
i0.Value<int> price = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.BuyableItemsCompanion(
|
||||
id: id,
|
||||
description: description,
|
||||
price: price,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
required String description,
|
||||
required int price,
|
||||
}) =>
|
||||
i1.BuyableItemsCompanion.insert(
|
||||
id: id,
|
||||
description: description,
|
||||
price: price,
|
||||
)));
|
||||
}
|
||||
|
|
|
@ -187,6 +187,82 @@ class WordsCompanion extends i0.UpdateCompanion<i1.Word> {
|
|||
}
|
||||
}
|
||||
|
||||
class $$WordsTableFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.$WordsTable> {
|
||||
$$WordsTableFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<String> get word => i0.ColumnFilters($table.word);
|
||||
i0.ColumnFilters<int> get usages => i0.ColumnFilters($table.usages);
|
||||
}
|
||||
|
||||
class $$WordsTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.$WordsTable> {
|
||||
$$WordsTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<String> get word => i0.ColumnOrderings($table.word);
|
||||
i0.ColumnOrderings<int> get usages => i0.ColumnOrderings($table.usages);
|
||||
}
|
||||
|
||||
class $$WordsTableProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$WordsTable,
|
||||
i1.Word,
|
||||
$$WordsTableFilterComposer,
|
||||
$$WordsTableOrderingComposer,
|
||||
$$WordsTableProcessedTableManager,
|
||||
$$WordsTableInsertCompanionBuilder,
|
||||
$$WordsTableUpdateCompanionBuilder> {
|
||||
const $$WordsTableProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $$WordsTableInsertCompanionBuilder = i1.WordsCompanion Function({
|
||||
required String word,
|
||||
i0.Value<int> usages,
|
||||
i0.Value<int> rowid,
|
||||
});
|
||||
typedef $$WordsTableUpdateCompanionBuilder = i1.WordsCompanion Function({
|
||||
i0.Value<String> word,
|
||||
i0.Value<int> usages,
|
||||
i0.Value<int> rowid,
|
||||
});
|
||||
|
||||
class $$WordsTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$WordsTable,
|
||||
i1.Word,
|
||||
$$WordsTableFilterComposer,
|
||||
$$WordsTableOrderingComposer,
|
||||
$$WordsTableProcessedTableManager,
|
||||
$$WordsTableInsertCompanionBuilder,
|
||||
$$WordsTableUpdateCompanionBuilder> {
|
||||
$$WordsTableTableManager(i0.GeneratedDatabase db, i1.$WordsTable table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $$WordsTableFilterComposer(db, table),
|
||||
orderingComposer: $$WordsTableOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$$WordsTableProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<String> word = const i0.Value.absent(),
|
||||
i0.Value<int> usages = const i0.Value.absent(),
|
||||
i0.Value<int> rowid = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.WordsCompanion(
|
||||
word: word,
|
||||
usages: usages,
|
||||
rowid: rowid,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
required String word,
|
||||
i0.Value<int> usages = const i0.Value.absent(),
|
||||
i0.Value<int> rowid = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.WordsCompanion.insert(
|
||||
word: word,
|
||||
usages: usages,
|
||||
rowid: rowid,
|
||||
)));
|
||||
}
|
||||
|
||||
class $MatchResultsTable extends i2.MatchResults
|
||||
with i0.TableInfo<$MatchResultsTable, i1.MatchResult> {
|
||||
@override
|
||||
|
@ -444,3 +520,92 @@ class MatchResultsCompanion extends i0.UpdateCompanion<i1.MatchResult> {
|
|||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
class $$MatchResultsTableFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.$MatchResultsTable> {
|
||||
$$MatchResultsTableFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ColumnFilters<String> get teamA => i0.ColumnFilters($table.teamA);
|
||||
i0.ColumnFilters<String> get teamB => i0.ColumnFilters($table.teamB);
|
||||
i0.ColumnFilters<bool> get teamAWon => i0.ColumnFilters($table.teamAWon);
|
||||
}
|
||||
|
||||
class $$MatchResultsTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.$MatchResultsTable> {
|
||||
$$MatchResultsTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<String> get teamA => i0.ColumnOrderings($table.teamA);
|
||||
i0.ColumnOrderings<String> get teamB => i0.ColumnOrderings($table.teamB);
|
||||
i0.ColumnOrderings<bool> get teamAWon => i0.ColumnOrderings($table.teamAWon);
|
||||
}
|
||||
|
||||
class $$MatchResultsTableProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$MatchResultsTable,
|
||||
i1.MatchResult,
|
||||
$$MatchResultsTableFilterComposer,
|
||||
$$MatchResultsTableOrderingComposer,
|
||||
$$MatchResultsTableProcessedTableManager,
|
||||
$$MatchResultsTableInsertCompanionBuilder,
|
||||
$$MatchResultsTableUpdateCompanionBuilder> {
|
||||
const $$MatchResultsTableProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $$MatchResultsTableInsertCompanionBuilder = i1.MatchResultsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
required String teamA,
|
||||
required String teamB,
|
||||
required bool teamAWon,
|
||||
});
|
||||
typedef $$MatchResultsTableUpdateCompanionBuilder = i1.MatchResultsCompanion
|
||||
Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<String> teamA,
|
||||
i0.Value<String> teamB,
|
||||
i0.Value<bool> teamAWon,
|
||||
});
|
||||
|
||||
class $$MatchResultsTableTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.$MatchResultsTable,
|
||||
i1.MatchResult,
|
||||
$$MatchResultsTableFilterComposer,
|
||||
$$MatchResultsTableOrderingComposer,
|
||||
$$MatchResultsTableProcessedTableManager,
|
||||
$$MatchResultsTableInsertCompanionBuilder,
|
||||
$$MatchResultsTableUpdateCompanionBuilder> {
|
||||
$$MatchResultsTableTableManager(
|
||||
i0.GeneratedDatabase db, i1.$MatchResultsTable table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $$MatchResultsTableFilterComposer(db, table),
|
||||
orderingComposer: $$MatchResultsTableOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$$MatchResultsTableProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<String> teamA = const i0.Value.absent(),
|
||||
i0.Value<String> teamB = const i0.Value.absent(),
|
||||
i0.Value<bool> teamAWon = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.MatchResultsCompanion(
|
||||
id: id,
|
||||
teamA: teamA,
|
||||
teamB: teamB,
|
||||
teamAWon: teamAWon,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
required String teamA,
|
||||
required String teamB,
|
||||
required bool teamAWon,
|
||||
}) =>
|
||||
i1.MatchResultsCompanion.insert(
|
||||
id: id,
|
||||
teamA: teamA,
|
||||
teamB: teamB,
|
||||
teamAWon: teamAWon,
|
||||
)));
|
||||
}
|
||||
|
|
|
@ -206,6 +206,8 @@ class GeopolyTestCompanion extends UpdateCompanion<GeopolyTestData> {
|
|||
|
||||
abstract class _$_GeopolyTestDatabase extends GeneratedDatabase {
|
||||
_$_GeopolyTestDatabase(QueryExecutor e) : super(e);
|
||||
_$_GeopolyTestDatabaseManager get managers =>
|
||||
_$_GeopolyTestDatabaseManager(this);
|
||||
late final GeopolyTest geopolyTest = GeopolyTest(this);
|
||||
Selectable<double?> area(int var1) {
|
||||
return customSelect(
|
||||
|
@ -224,3 +226,86 @@ abstract class _$_GeopolyTestDatabase extends GeneratedDatabase {
|
|||
@override
|
||||
List<DatabaseSchemaEntity> get allSchemaEntities => [geopolyTest];
|
||||
}
|
||||
|
||||
class $GeopolyTestFilterComposer
|
||||
extends FilterComposer<_$_GeopolyTestDatabase, GeopolyTest> {
|
||||
$GeopolyTestFilterComposer(super.db, super.table);
|
||||
ColumnFilters<GeopolyPolygon> get shape => ColumnFilters($table.shape);
|
||||
ColumnFilters<DriftAny> get a => ColumnFilters($table.a);
|
||||
}
|
||||
|
||||
class $GeopolyTestOrderingComposer
|
||||
extends OrderingComposer<_$_GeopolyTestDatabase, GeopolyTest> {
|
||||
$GeopolyTestOrderingComposer(super.db, super.table);
|
||||
ColumnOrderings<GeopolyPolygon> get shape => ColumnOrderings($table.shape);
|
||||
ColumnOrderings<DriftAny> get a => ColumnOrderings($table.a);
|
||||
}
|
||||
|
||||
class $GeopolyTestProcessedTableManager extends ProcessedTableManager<
|
||||
_$_GeopolyTestDatabase,
|
||||
GeopolyTest,
|
||||
GeopolyTestData,
|
||||
$GeopolyTestFilterComposer,
|
||||
$GeopolyTestOrderingComposer,
|
||||
$GeopolyTestProcessedTableManager,
|
||||
$GeopolyTestInsertCompanionBuilder,
|
||||
$GeopolyTestUpdateCompanionBuilder> {
|
||||
const $GeopolyTestProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $GeopolyTestInsertCompanionBuilder = GeopolyTestCompanion Function({
|
||||
Value<GeopolyPolygon?> shape,
|
||||
Value<DriftAny?> a,
|
||||
Value<int> rowid,
|
||||
});
|
||||
typedef $GeopolyTestUpdateCompanionBuilder = GeopolyTestCompanion Function({
|
||||
Value<GeopolyPolygon?> shape,
|
||||
Value<DriftAny?> a,
|
||||
Value<int> rowid,
|
||||
});
|
||||
|
||||
class $GeopolyTestTableManager extends RootTableManager<
|
||||
_$_GeopolyTestDatabase,
|
||||
GeopolyTest,
|
||||
GeopolyTestData,
|
||||
$GeopolyTestFilterComposer,
|
||||
$GeopolyTestOrderingComposer,
|
||||
$GeopolyTestProcessedTableManager,
|
||||
$GeopolyTestInsertCompanionBuilder,
|
||||
$GeopolyTestUpdateCompanionBuilder> {
|
||||
$GeopolyTestTableManager(_$_GeopolyTestDatabase db, GeopolyTest table)
|
||||
: super(TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $GeopolyTestFilterComposer(db, table),
|
||||
orderingComposer: $GeopolyTestOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$GeopolyTestProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
Value<GeopolyPolygon?> shape = const Value.absent(),
|
||||
Value<DriftAny?> a = const Value.absent(),
|
||||
Value<int> rowid = const Value.absent(),
|
||||
}) =>
|
||||
GeopolyTestCompanion(
|
||||
shape: shape,
|
||||
a: a,
|
||||
rowid: rowid,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
Value<GeopolyPolygon?> shape = const Value.absent(),
|
||||
Value<DriftAny?> a = const Value.absent(),
|
||||
Value<int> rowid = const Value.absent(),
|
||||
}) =>
|
||||
GeopolyTestCompanion.insert(
|
||||
shape: shape,
|
||||
a: a,
|
||||
rowid: rowid,
|
||||
)));
|
||||
}
|
||||
|
||||
class _$_GeopolyTestDatabaseManager {
|
||||
final _$_GeopolyTestDatabase _db;
|
||||
_$_GeopolyTestDatabaseManager(this._db);
|
||||
$GeopolyTestTableManager get geopolyTest =>
|
||||
$GeopolyTestTableManager(_db, _db.geopolyTest);
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ import '../../writer/database_writer.dart';
|
|||
import '../../writer/drift_accessor_writer.dart';
|
||||
import '../../writer/function_stubs_writer.dart';
|
||||
import '../../writer/import_manager.dart';
|
||||
import '../../writer/manager_writer.dart';
|
||||
import '../../writer/modules.dart';
|
||||
import '../../writer/tables/table_writer.dart';
|
||||
import '../../writer/tables/view_writer.dart';
|
||||
|
@ -294,6 +295,10 @@ class _DriftBuildRun {
|
|||
|
||||
if (result is DriftTable) {
|
||||
TableWriter(result, writer.child()).writeInto();
|
||||
|
||||
final scope = writer.child();
|
||||
final manager = ManagerWriter(scope, scope, '')..addTable(result);
|
||||
manager.writeTableManagers();
|
||||
} else if (result is DriftView) {
|
||||
ViewWriter(result, writer.child(), null).write();
|
||||
} else if (result is DriftTrigger) {
|
||||
|
|
|
@ -148,14 +148,20 @@ class DatabaseWriter {
|
|||
}
|
||||
}
|
||||
|
||||
// Write the main database manager & all the managers for tables
|
||||
// Write the main database manager and, if we're doing a monolithic build,
|
||||
// the manager classes for involved tables.
|
||||
if (scope.options.generateManager) {
|
||||
final managerWriter = ManagerWriter(scope.child(), dbScope, dbClassName);
|
||||
for (var table in elements.whereType<DriftTable>()) {
|
||||
managerWriter.addTable(table);
|
||||
}
|
||||
managerWriter.write();
|
||||
// Add getter for the manager to the database class
|
||||
if (!scope.generationOptions.isModular) {
|
||||
managerWriter.writeTableManagers();
|
||||
}
|
||||
|
||||
// Write main class for managers and reference it in a getter from the
|
||||
// database class.
|
||||
managerWriter.writeMainClass();
|
||||
firstLeaf.writeln(managerWriter.managerGetter);
|
||||
}
|
||||
|
||||
|
|
|
@ -230,12 +230,14 @@ class _TableManagerWriter {
|
|||
/// The name of the filter composer class
|
||||
///
|
||||
/// E.G `UserFilterComposer`
|
||||
String get filterComposer => '\$${table.entityInfoName}FilterComposer';
|
||||
AnnotatedDartCode get filterComposer =>
|
||||
scope.generatedElement(table, '\$${table.entityInfoName}FilterComposer');
|
||||
|
||||
/// The name of the filter composer class
|
||||
/// The name of the ordering composer class
|
||||
///
|
||||
/// E.G `UserOrderingComposer`
|
||||
String get orderingComposer => '\$${table.entityInfoName}OrderingComposer';
|
||||
AnnotatedDartCode get orderingComposer => scope.generatedElement(
|
||||
table, '\$${table.entityInfoName}OrderingComposer');
|
||||
|
||||
/// The name of the processed table manager class
|
||||
///
|
||||
|
@ -246,7 +248,7 @@ class _TableManagerWriter {
|
|||
/// The name of the root table manager class
|
||||
///
|
||||
/// E.G `UserTableManager`
|
||||
String get rootTableManager => '\$${table.entityInfoName}TableManager';
|
||||
String get rootTableManager => ManagerWriter._rootManagerName(table);
|
||||
|
||||
/// Name of the typedef for the insertCompanionBuilder
|
||||
///
|
||||
|
@ -440,8 +442,7 @@ class _TableManagerWriter {
|
|||
.firstOrNull
|
||||
?.otherColumn;
|
||||
if (referencedCol != null && referencedCol.owner is DriftTable) {
|
||||
final referencedTable = tables.firstWhere(
|
||||
(t) => t.entityInfoName == referencedCol.owner.entityInfoName);
|
||||
final referencedTable = referencedCol.owner as DriftTable;
|
||||
return (referencedTable, referencedCol);
|
||||
}
|
||||
return null;
|
||||
|
@ -496,7 +497,7 @@ class _TableManagerWriter {
|
|||
|
||||
/// If this column is a foreign key to another table, add a filter and ordering
|
||||
/// for the referenced table
|
||||
if (referenced != null) {
|
||||
if (referenced != null && !referenced.$1.hasExistingRowClass) {
|
||||
final (referencedTable, referencedCol) = referenced;
|
||||
final referencedTableNames = _TableManagerWriter(
|
||||
referencedTable, scope, dbScope, databaseGenericName);
|
||||
|
@ -507,12 +508,14 @@ class _TableManagerWriter {
|
|||
c.filters.add(_ReferencedFilterWriter(c.fieldGetter,
|
||||
fieldGetter: c.fieldGetter,
|
||||
referencedColumnGetter: referencedColumnNames.fieldGetter,
|
||||
referencedFilterComposer: referencedTableNames.filterComposer,
|
||||
referencedFilterComposer:
|
||||
scope.dartCode(referencedTableNames.filterComposer),
|
||||
referencedTableField: referencedTableField));
|
||||
c.orderings.add(_ReferencedOrderingWriter(c.fieldGetter,
|
||||
fieldGetter: c.fieldGetter,
|
||||
referencedColumnGetter: referencedColumnNames.fieldGetter,
|
||||
referencedOrderingComposer: referencedTableNames.orderingComposer,
|
||||
referencedOrderingComposer:
|
||||
scope.dartCode(referencedTableNames.orderingComposer),
|
||||
referencedTableField: referencedTableField));
|
||||
}
|
||||
columns.add(c);
|
||||
|
@ -536,7 +539,8 @@ class _TableManagerWriter {
|
|||
backRefFilters.add(_ReferencedFilterWriter(filterName,
|
||||
fieldGetter: reference.$2.nameInDart,
|
||||
referencedColumnGetter: referencedColumnNames.fieldGetter,
|
||||
referencedFilterComposer: referencedTableNames.filterComposer,
|
||||
referencedFilterComposer:
|
||||
scope.dartCode(referencedTableNames.filterComposer),
|
||||
referencedTableField: referencedTableField));
|
||||
}
|
||||
}
|
||||
|
@ -604,8 +608,15 @@ class ManagerWriter {
|
|||
return '$databaseManagerName get managers => $databaseManagerName(this);';
|
||||
}
|
||||
|
||||
/// Write the manager to a provider [TextEmitter]
|
||||
void write() {
|
||||
static String _rootManagerName(DriftTable table) {
|
||||
return '\$${table.entityInfoName}TableManager';
|
||||
}
|
||||
|
||||
AnnotatedDartCode _referenceRootManager(DriftTable table) {
|
||||
return _scope.generatedElement(table, _rootManagerName(table));
|
||||
}
|
||||
|
||||
void writeTableManagers() {
|
||||
final leaf = _scope.leaf();
|
||||
|
||||
// create the manager class for each table
|
||||
|
@ -620,19 +631,29 @@ class ManagerWriter {
|
|||
tableWriters.removeWhere((t) => t.hasCustomRowClass);
|
||||
|
||||
// Write each tables manager to the leaf and append the getter to the main manager
|
||||
final tableManagerGetters = StringBuffer();
|
||||
for (var table in tableWriters) {
|
||||
table.writeManager(leaf);
|
||||
tableManagerGetters.writeln(
|
||||
"${table.rootTableManager} get ${table.table.dbGetterName} => ${table.rootTableManager}(_db, _db.${table.table.dbGetterName});");
|
||||
}
|
||||
}
|
||||
|
||||
// Write the main manager class
|
||||
/// Writes the main manager class referencing the generated classes for each
|
||||
/// table using a getter.
|
||||
void writeMainClass() {
|
||||
final leaf = _scope.leaf();
|
||||
leaf
|
||||
..writeln('class $databaseManagerName{')
|
||||
..writeln('final $_dbClassName _db;')
|
||||
..writeln('$databaseManagerName(this._db);')
|
||||
..writeln(tableManagerGetters)
|
||||
..writeln('}');
|
||||
..writeln('$databaseManagerName(this._db);');
|
||||
|
||||
for (final table in _addedTables) {
|
||||
if (!table.hasExistingRowClass) {
|
||||
final type = leaf.dartCode(_referenceRootManager(table));
|
||||
|
||||
leaf.writeln(
|
||||
'$type get ${table.dbGetterName} => $type(_db, _db.${table.dbGetterName});');
|
||||
}
|
||||
}
|
||||
|
||||
leaf.writeln('}');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import 'package:drift/internal/modular.dart' as i7;
|
|||
|
||||
abstract class $Database extends i0.GeneratedDatabase {
|
||||
$Database(i0.QueryExecutor e) : super(e);
|
||||
$DatabaseManager get managers => $DatabaseManager(this);
|
||||
late final i1.Users users = i1.Users(this);
|
||||
late final i2.Posts posts = i2.Posts(this);
|
||||
late final i3.SearchInPosts searchInPosts = i3.SearchInPosts(this);
|
||||
|
@ -69,3 +70,15 @@ abstract class $Database extends i0.GeneratedDatabase {
|
|||
i0.DriftDatabaseOptions get options =>
|
||||
const i0.DriftDatabaseOptions(storeDateTimeAsText: true);
|
||||
}
|
||||
|
||||
class $DatabaseManager {
|
||||
final $Database _db;
|
||||
$DatabaseManager(this._db);
|
||||
i1.$UsersTableManager get users => i1.$UsersTableManager(_db, _db.users);
|
||||
i2.$PostsTableManager get posts => i2.$PostsTableManager(_db, _db.posts);
|
||||
i3.$SearchInPostsTableManager get searchInPosts =>
|
||||
i3.$SearchInPostsTableManager(_db, _db.searchInPosts);
|
||||
i2.$LikesTableManager get likes => i2.$LikesTableManager(_db, _db.likes);
|
||||
i1.$FollowsTableManager get follows =>
|
||||
i1.$FollowsTableManager(_db, _db.follows);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// ignore_for_file: type=lint
|
||||
import 'package:drift/drift.dart' as i0;
|
||||
import 'package:modular/src/posts.drift.dart' as i1;
|
||||
import 'package:drift/internal/modular.dart' as i2;
|
||||
import 'package:modular/src/users.drift.dart' as i3;
|
||||
|
||||
class Posts extends i0.Table with i0.TableInfo<Posts, i1.Post> {
|
||||
@override
|
||||
|
@ -215,6 +217,111 @@ class PostsCompanion extends i0.UpdateCompanion<i1.Post> {
|
|||
}
|
||||
}
|
||||
|
||||
class $PostsFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.Posts> {
|
||||
$PostsFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ColumnFilters<int> get authorId => i0.ColumnFilters($table.author);
|
||||
i0.ComposableFilter author(
|
||||
i0.ComposableFilter Function(i3.$UsersFilterComposer f) f) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable:
|
||||
i2.ReadDatabaseContainer($db).resultSet<i3.Users>('users'),
|
||||
getCurrentColumn: (f) => f.author,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i3.$UsersFilterComposer(db, table),
|
||||
builder: f);
|
||||
}
|
||||
|
||||
i0.ColumnFilters<String> get content => i0.ColumnFilters($table.content);
|
||||
}
|
||||
|
||||
class $PostsOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.Posts> {
|
||||
$PostsOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<int> get authorId => i0.ColumnOrderings($table.author);
|
||||
i0.ComposableOrdering author(
|
||||
i0.ComposableOrdering Function(i3.$UsersOrderingComposer o) o) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable:
|
||||
i2.ReadDatabaseContainer($db).resultSet<i3.Users>('users'),
|
||||
getCurrentColumn: (f) => f.author,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i3.$UsersOrderingComposer(db, table),
|
||||
builder: o);
|
||||
}
|
||||
|
||||
i0.ColumnOrderings<String> get content => i0.ColumnOrderings($table.content);
|
||||
}
|
||||
|
||||
class $PostsProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.Posts,
|
||||
i1.Post,
|
||||
$PostsFilterComposer,
|
||||
$PostsOrderingComposer,
|
||||
$PostsProcessedTableManager,
|
||||
$PostsInsertCompanionBuilder,
|
||||
$PostsUpdateCompanionBuilder> {
|
||||
const $PostsProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $PostsInsertCompanionBuilder = i1.PostsCompanion Function({
|
||||
i0.Value<int> id,
|
||||
required int author,
|
||||
i0.Value<String?> content,
|
||||
});
|
||||
typedef $PostsUpdateCompanionBuilder = i1.PostsCompanion Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<int> author,
|
||||
i0.Value<String?> content,
|
||||
});
|
||||
|
||||
class $PostsTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.Posts,
|
||||
i1.Post,
|
||||
$PostsFilterComposer,
|
||||
$PostsOrderingComposer,
|
||||
$PostsProcessedTableManager,
|
||||
$PostsInsertCompanionBuilder,
|
||||
$PostsUpdateCompanionBuilder> {
|
||||
$PostsTableManager(i0.GeneratedDatabase db, i1.Posts table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $PostsFilterComposer(db, table),
|
||||
orderingComposer: $PostsOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) => $PostsProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<int> author = const i0.Value.absent(),
|
||||
i0.Value<String?> content = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.PostsCompanion(
|
||||
id: id,
|
||||
author: author,
|
||||
content: content,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
required int author,
|
||||
i0.Value<String?> content = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.PostsCompanion.insert(
|
||||
id: id,
|
||||
author: author,
|
||||
content: content,
|
||||
)));
|
||||
}
|
||||
|
||||
class Likes extends i0.Table with i0.TableInfo<Likes, i1.Like> {
|
||||
@override
|
||||
final i0.GeneratedDatabase attachedDatabase;
|
||||
|
@ -403,3 +510,132 @@ class LikesCompanion extends i0.UpdateCompanion<i1.Like> {
|
|||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
class $LikesFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.Likes> {
|
||||
$LikesFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get postId => i0.ColumnFilters($table.post);
|
||||
i0.ComposableFilter post(
|
||||
i0.ComposableFilter Function(i1.$PostsFilterComposer f) f) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable:
|
||||
i2.ReadDatabaseContainer($db).resultSet<i1.Posts>('posts'),
|
||||
getCurrentColumn: (f) => f.post,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i1.$PostsFilterComposer(db, table),
|
||||
builder: f);
|
||||
}
|
||||
|
||||
i0.ColumnFilters<int> get likedById => i0.ColumnFilters($table.likedBy);
|
||||
i0.ComposableFilter likedBy(
|
||||
i0.ComposableFilter Function(i3.$UsersFilterComposer f) f) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable:
|
||||
i2.ReadDatabaseContainer($db).resultSet<i3.Users>('users'),
|
||||
getCurrentColumn: (f) => f.likedBy,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i3.$UsersFilterComposer(db, table),
|
||||
builder: f);
|
||||
}
|
||||
}
|
||||
|
||||
class $LikesOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.Likes> {
|
||||
$LikesOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get postId => i0.ColumnOrderings($table.post);
|
||||
i0.ComposableOrdering post(
|
||||
i0.ComposableOrdering Function(i1.$PostsOrderingComposer o) o) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable:
|
||||
i2.ReadDatabaseContainer($db).resultSet<i1.Posts>('posts'),
|
||||
getCurrentColumn: (f) => f.post,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i1.$PostsOrderingComposer(db, table),
|
||||
builder: o);
|
||||
}
|
||||
|
||||
i0.ColumnOrderings<int> get likedById => i0.ColumnOrderings($table.likedBy);
|
||||
i0.ComposableOrdering likedBy(
|
||||
i0.ComposableOrdering Function(i3.$UsersOrderingComposer o) o) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable:
|
||||
i2.ReadDatabaseContainer($db).resultSet<i3.Users>('users'),
|
||||
getCurrentColumn: (f) => f.likedBy,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i3.$UsersOrderingComposer(db, table),
|
||||
builder: o);
|
||||
}
|
||||
}
|
||||
|
||||
class $LikesProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.Likes,
|
||||
i1.Like,
|
||||
$LikesFilterComposer,
|
||||
$LikesOrderingComposer,
|
||||
$LikesProcessedTableManager,
|
||||
$LikesInsertCompanionBuilder,
|
||||
$LikesUpdateCompanionBuilder> {
|
||||
const $LikesProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $LikesInsertCompanionBuilder = i1.LikesCompanion Function({
|
||||
required int post,
|
||||
required int likedBy,
|
||||
i0.Value<int> rowid,
|
||||
});
|
||||
typedef $LikesUpdateCompanionBuilder = i1.LikesCompanion Function({
|
||||
i0.Value<int> post,
|
||||
i0.Value<int> likedBy,
|
||||
i0.Value<int> rowid,
|
||||
});
|
||||
|
||||
class $LikesTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.Likes,
|
||||
i1.Like,
|
||||
$LikesFilterComposer,
|
||||
$LikesOrderingComposer,
|
||||
$LikesProcessedTableManager,
|
||||
$LikesInsertCompanionBuilder,
|
||||
$LikesUpdateCompanionBuilder> {
|
||||
$LikesTableManager(i0.GeneratedDatabase db, i1.Likes table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $LikesFilterComposer(db, table),
|
||||
orderingComposer: $LikesOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) => $LikesProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> post = const i0.Value.absent(),
|
||||
i0.Value<int> likedBy = const i0.Value.absent(),
|
||||
i0.Value<int> rowid = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.LikesCompanion(
|
||||
post: post,
|
||||
likedBy: likedBy,
|
||||
rowid: rowid,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
required int post,
|
||||
required int likedBy,
|
||||
i0.Value<int> rowid = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.LikesCompanion.insert(
|
||||
post: post,
|
||||
likedBy: likedBy,
|
||||
rowid: rowid,
|
||||
)));
|
||||
}
|
||||
|
|
|
@ -204,6 +204,84 @@ class SearchInPostsCompanion extends i0.UpdateCompanion<i1.SearchInPost> {
|
|||
}
|
||||
}
|
||||
|
||||
class $SearchInPostsFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.SearchInPosts> {
|
||||
$SearchInPostsFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<String> get author => i0.ColumnFilters($table.author);
|
||||
i0.ColumnFilters<String> get content => i0.ColumnFilters($table.content);
|
||||
}
|
||||
|
||||
class $SearchInPostsOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.SearchInPosts> {
|
||||
$SearchInPostsOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<String> get author => i0.ColumnOrderings($table.author);
|
||||
i0.ColumnOrderings<String> get content => i0.ColumnOrderings($table.content);
|
||||
}
|
||||
|
||||
class $SearchInPostsProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.SearchInPosts,
|
||||
i1.SearchInPost,
|
||||
$SearchInPostsFilterComposer,
|
||||
$SearchInPostsOrderingComposer,
|
||||
$SearchInPostsProcessedTableManager,
|
||||
$SearchInPostsInsertCompanionBuilder,
|
||||
$SearchInPostsUpdateCompanionBuilder> {
|
||||
const $SearchInPostsProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $SearchInPostsInsertCompanionBuilder = i1.SearchInPostsCompanion
|
||||
Function({
|
||||
required String author,
|
||||
required String content,
|
||||
i0.Value<int> rowid,
|
||||
});
|
||||
typedef $SearchInPostsUpdateCompanionBuilder = i1.SearchInPostsCompanion
|
||||
Function({
|
||||
i0.Value<String> author,
|
||||
i0.Value<String> content,
|
||||
i0.Value<int> rowid,
|
||||
});
|
||||
|
||||
class $SearchInPostsTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.SearchInPosts,
|
||||
i1.SearchInPost,
|
||||
$SearchInPostsFilterComposer,
|
||||
$SearchInPostsOrderingComposer,
|
||||
$SearchInPostsProcessedTableManager,
|
||||
$SearchInPostsInsertCompanionBuilder,
|
||||
$SearchInPostsUpdateCompanionBuilder> {
|
||||
$SearchInPostsTableManager(i0.GeneratedDatabase db, i1.SearchInPosts table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $SearchInPostsFilterComposer(db, table),
|
||||
orderingComposer: $SearchInPostsOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) =>
|
||||
$SearchInPostsProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<String> author = const i0.Value.absent(),
|
||||
i0.Value<String> content = const i0.Value.absent(),
|
||||
i0.Value<int> rowid = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.SearchInPostsCompanion(
|
||||
author: author,
|
||||
content: content,
|
||||
rowid: rowid,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
required String author,
|
||||
required String content,
|
||||
i0.Value<int> rowid = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.SearchInPostsCompanion.insert(
|
||||
author: author,
|
||||
content: content,
|
||||
rowid: rowid,
|
||||
)));
|
||||
}
|
||||
|
||||
i0.Trigger get postsInsert => i0.Trigger(
|
||||
'CREATE TRIGGER posts_insert AFTER INSERT ON posts BEGIN INSERT INTO search_in_posts ("rowid", author, content) VALUES (new.id, new.author, new.content);END',
|
||||
'posts_insert');
|
||||
|
|
|
@ -3,6 +3,7 @@ import 'package:drift/drift.dart' as i0;
|
|||
import 'package:modular/src/users.drift.dart' as i1;
|
||||
import 'package:modular/src/preferences.dart' as i2;
|
||||
import 'dart:typed_data' as i3;
|
||||
import 'package:drift/internal/modular.dart' as i4;
|
||||
|
||||
class Users extends i0.Table with i0.TableInfo<Users, i1.User> {
|
||||
@override
|
||||
|
@ -313,6 +314,106 @@ class UsersCompanion extends i0.UpdateCompanion<i1.User> {
|
|||
}
|
||||
}
|
||||
|
||||
class $UsersFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.Users> {
|
||||
$UsersFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get id => i0.ColumnFilters($table.id);
|
||||
i0.ColumnFilters<String> get name => i0.ColumnFilters($table.name);
|
||||
i0.ColumnFilters<String> get biography => i0.ColumnFilters($table.biography);
|
||||
i0.ColumnFilters<String> get preferencesValue =>
|
||||
i0.ColumnFilters($table.preferences);
|
||||
i0.ColumnWithTypeConverterFilters<i2.Preferences?, i2.Preferences, String>
|
||||
get preferences => i0.ColumnWithTypeConverterFilters($table.preferences);
|
||||
i0.ColumnFilters<i3.Uint8List> get profilePicture =>
|
||||
i0.ColumnFilters($table.profilePicture);
|
||||
}
|
||||
|
||||
class $UsersOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.Users> {
|
||||
$UsersOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<String> get name => i0.ColumnOrderings($table.name);
|
||||
i0.ColumnOrderings<String> get biography =>
|
||||
i0.ColumnOrderings($table.biography);
|
||||
i0.ColumnOrderings<String> get preferences =>
|
||||
i0.ColumnOrderings($table.preferences);
|
||||
i0.ColumnOrderings<i3.Uint8List> get profilePicture =>
|
||||
i0.ColumnOrderings($table.profilePicture);
|
||||
}
|
||||
|
||||
class $UsersProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.Users,
|
||||
i1.User,
|
||||
$UsersFilterComposer,
|
||||
$UsersOrderingComposer,
|
||||
$UsersProcessedTableManager,
|
||||
$UsersInsertCompanionBuilder,
|
||||
$UsersUpdateCompanionBuilder> {
|
||||
const $UsersProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $UsersInsertCompanionBuilder = i1.UsersCompanion Function({
|
||||
i0.Value<int> id,
|
||||
required String name,
|
||||
i0.Value<String?> biography,
|
||||
i0.Value<i2.Preferences?> preferences,
|
||||
i0.Value<i3.Uint8List?> profilePicture,
|
||||
});
|
||||
typedef $UsersUpdateCompanionBuilder = i1.UsersCompanion Function({
|
||||
i0.Value<int> id,
|
||||
i0.Value<String> name,
|
||||
i0.Value<String?> biography,
|
||||
i0.Value<i2.Preferences?> preferences,
|
||||
i0.Value<i3.Uint8List?> profilePicture,
|
||||
});
|
||||
|
||||
class $UsersTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.Users,
|
||||
i1.User,
|
||||
$UsersFilterComposer,
|
||||
$UsersOrderingComposer,
|
||||
$UsersProcessedTableManager,
|
||||
$UsersInsertCompanionBuilder,
|
||||
$UsersUpdateCompanionBuilder> {
|
||||
$UsersTableManager(i0.GeneratedDatabase db, i1.Users table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $UsersFilterComposer(db, table),
|
||||
orderingComposer: $UsersOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) => $UsersProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
i0.Value<String> name = const i0.Value.absent(),
|
||||
i0.Value<String?> biography = const i0.Value.absent(),
|
||||
i0.Value<i2.Preferences?> preferences = const i0.Value.absent(),
|
||||
i0.Value<i3.Uint8List?> profilePicture = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.UsersCompanion(
|
||||
id: id,
|
||||
name: name,
|
||||
biography: biography,
|
||||
preferences: preferences,
|
||||
profilePicture: profilePicture,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
i0.Value<int> id = const i0.Value.absent(),
|
||||
required String name,
|
||||
i0.Value<String?> biography = const i0.Value.absent(),
|
||||
i0.Value<i2.Preferences?> preferences = const i0.Value.absent(),
|
||||
i0.Value<i3.Uint8List?> profilePicture = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.UsersCompanion.insert(
|
||||
id: id,
|
||||
name: name,
|
||||
biography: biography,
|
||||
preferences: preferences,
|
||||
profilePicture: profilePicture,
|
||||
)));
|
||||
}
|
||||
|
||||
i0.Index get usersName =>
|
||||
i0.Index('users_name', 'CREATE INDEX users_name ON users (name)');
|
||||
|
||||
|
@ -510,6 +611,135 @@ class FollowsCompanion extends i0.UpdateCompanion<i1.Follow> {
|
|||
}
|
||||
}
|
||||
|
||||
class $FollowsFilterComposer
|
||||
extends i0.FilterComposer<i0.GeneratedDatabase, i1.Follows> {
|
||||
$FollowsFilterComposer(super.db, super.table);
|
||||
i0.ColumnFilters<int> get followedId => i0.ColumnFilters($table.followed);
|
||||
i0.ComposableFilter followed(
|
||||
i0.ComposableFilter Function(i1.$UsersFilterComposer f) f) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable:
|
||||
i4.ReadDatabaseContainer($db).resultSet<i1.Users>('users'),
|
||||
getCurrentColumn: (f) => f.followed,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i1.$UsersFilterComposer(db, table),
|
||||
builder: f);
|
||||
}
|
||||
|
||||
i0.ColumnFilters<int> get followerId => i0.ColumnFilters($table.follower);
|
||||
i0.ComposableFilter follower(
|
||||
i0.ComposableFilter Function(i1.$UsersFilterComposer f) f) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable:
|
||||
i4.ReadDatabaseContainer($db).resultSet<i1.Users>('users'),
|
||||
getCurrentColumn: (f) => f.follower,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i1.$UsersFilterComposer(db, table),
|
||||
builder: f);
|
||||
}
|
||||
}
|
||||
|
||||
class $FollowsOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.Follows> {
|
||||
$FollowsOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings<int> get followedId => i0.ColumnOrderings($table.followed);
|
||||
i0.ComposableOrdering followed(
|
||||
i0.ComposableOrdering Function(i1.$UsersOrderingComposer o) o) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable:
|
||||
i4.ReadDatabaseContainer($db).resultSet<i1.Users>('users'),
|
||||
getCurrentColumn: (f) => f.followed,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i1.$UsersOrderingComposer(db, table),
|
||||
builder: o);
|
||||
}
|
||||
|
||||
i0.ColumnOrderings<int> get followerId => i0.ColumnOrderings($table.follower);
|
||||
i0.ComposableOrdering follower(
|
||||
i0.ComposableOrdering Function(i1.$UsersOrderingComposer o) o) {
|
||||
return $composeWithJoins(
|
||||
$db: $db,
|
||||
$table: $table,
|
||||
referencedTable:
|
||||
i4.ReadDatabaseContainer($db).resultSet<i1.Users>('users'),
|
||||
getCurrentColumn: (f) => f.follower,
|
||||
getReferencedColumn: (f) => f.id,
|
||||
getReferencedComposer: (db, table) =>
|
||||
i1.$UsersOrderingComposer(db, table),
|
||||
builder: o);
|
||||
}
|
||||
}
|
||||
|
||||
class $FollowsProcessedTableManager extends i0.ProcessedTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.Follows,
|
||||
i1.Follow,
|
||||
$FollowsFilterComposer,
|
||||
$FollowsOrderingComposer,
|
||||
$FollowsProcessedTableManager,
|
||||
$FollowsInsertCompanionBuilder,
|
||||
$FollowsUpdateCompanionBuilder> {
|
||||
const $FollowsProcessedTableManager(super.$state);
|
||||
}
|
||||
|
||||
typedef $FollowsInsertCompanionBuilder = i1.FollowsCompanion Function({
|
||||
required int followed,
|
||||
required int follower,
|
||||
i0.Value<int> rowid,
|
||||
});
|
||||
typedef $FollowsUpdateCompanionBuilder = i1.FollowsCompanion Function({
|
||||
i0.Value<int> followed,
|
||||
i0.Value<int> follower,
|
||||
i0.Value<int> rowid,
|
||||
});
|
||||
|
||||
class $FollowsTableManager extends i0.RootTableManager<
|
||||
i0.GeneratedDatabase,
|
||||
i1.Follows,
|
||||
i1.Follow,
|
||||
$FollowsFilterComposer,
|
||||
$FollowsOrderingComposer,
|
||||
$FollowsProcessedTableManager,
|
||||
$FollowsInsertCompanionBuilder,
|
||||
$FollowsUpdateCompanionBuilder> {
|
||||
$FollowsTableManager(i0.GeneratedDatabase db, i1.Follows table)
|
||||
: super(i0.TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
filteringComposer: $FollowsFilterComposer(db, table),
|
||||
orderingComposer: $FollowsOrderingComposer(db, table),
|
||||
getChildManagerBuilder: (p0) => $FollowsProcessedTableManager(p0),
|
||||
getUpdateCompanionBuilder: ({
|
||||
i0.Value<int> followed = const i0.Value.absent(),
|
||||
i0.Value<int> follower = const i0.Value.absent(),
|
||||
i0.Value<int> rowid = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.FollowsCompanion(
|
||||
followed: followed,
|
||||
follower: follower,
|
||||
rowid: rowid,
|
||||
),
|
||||
getInsertCompanionBuilder: ({
|
||||
required int followed,
|
||||
required int follower,
|
||||
i0.Value<int> rowid = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.FollowsCompanion.insert(
|
||||
followed: followed,
|
||||
follower: follower,
|
||||
rowid: rowid,
|
||||
)));
|
||||
}
|
||||
|
||||
class PopularUser extends i0.DataClass {
|
||||
final int id;
|
||||
final String name;
|
||||
|
|
Loading…
Reference in New Issue