mirror of https://github.com/AMT-Cheif/drift.git
update docs
This commit is contained in:
parent
69c25d8e62
commit
b67e4234e7
|
@ -35,7 +35,7 @@ extension ManagerExamples on AppDatabase {
|
|||
.filter((f) => f.id.isIn([1, 2, 3]))
|
||||
.update((o) => o(content: Value('New Content')));
|
||||
}
|
||||
// #docregion manager_update
|
||||
// #enddocregion manager_update
|
||||
|
||||
// #docregion manager_replace
|
||||
Future<void> replaceTodoItems() async {
|
||||
|
@ -50,7 +50,7 @@ extension ManagerExamples on AppDatabase {
|
|||
objs = objs.map((o) => o.copyWith(content: 'New Content')).toList();
|
||||
await managers.todoItems.bulkReplace(objs);
|
||||
}
|
||||
// #docregion manager_replace
|
||||
// #enddocregion manager_replace
|
||||
|
||||
// #docregion manager_delete
|
||||
Future<void> deleteTodoItems() async {
|
||||
|
@ -60,5 +60,143 @@ extension ManagerExamples on AppDatabase {
|
|||
// Delete a single item
|
||||
await managers.todoItems.filter((f) => f.id(5)).delete();
|
||||
}
|
||||
// #docregion manager_delete
|
||||
// #enddocregion manager_delete
|
||||
|
||||
// #docregion manager_select
|
||||
Future<void> selectTodoItems() async {
|
||||
// Get all items
|
||||
managers.todoItems.get();
|
||||
|
||||
// A stream of all the todo items, updated in real-time
|
||||
managers.todoItems.watch();
|
||||
|
||||
// To get a single item, apply a filter and call `getSingle`
|
||||
await managers.todoItems.filter((f) => f.id(1)).getSingle();
|
||||
}
|
||||
// #enddocregion manager_select
|
||||
|
||||
// #docregion manager_filter
|
||||
Future<void> filterTodoItems() async {
|
||||
// All items with a title of "Title"
|
||||
await managers.todoItems.filter((f) => f.title("Title")).get();
|
||||
|
||||
// All items with a title of "Title" and content of "Content"
|
||||
await managers.todoItems
|
||||
.filter((f) => f.title("Title") & f.content("Content"))
|
||||
.get();
|
||||
|
||||
// All items with a title of "Title" or content that is not null
|
||||
await managers.todoItems
|
||||
.filter((f) => f.title("Title") | f.content.not.isNull())
|
||||
.get();
|
||||
}
|
||||
// #enddocregion manager_filter
|
||||
|
||||
// #docregion manager_type_specific_filter
|
||||
Future filterWithType() async {
|
||||
// Filter all items created since 7 days ago
|
||||
await managers.todoItems
|
||||
.filter((f) =>
|
||||
f.createdAt.isAfter(DateTime.now().subtract(Duration(days: 7))))
|
||||
.get();
|
||||
|
||||
// Filter all items with a title that starts with "Title"
|
||||
await managers.todoItems.filter((f) => f.title.startsWith('Title')).get();
|
||||
}
|
||||
// #enddocregion manager_type_specific_filter
|
||||
|
||||
// #docregion manager_ordering
|
||||
Future orderWithType() async {
|
||||
// Order all items by their creation date in ascending order
|
||||
await managers.todoItems.orderBy((o) => o.createdAt.asc()).get();
|
||||
|
||||
// Order all items by their title in ascending order and then by their content in ascending order
|
||||
await managers.todoItems
|
||||
.orderBy((o) => o.title.asc() & o.content.asc())
|
||||
.get();
|
||||
}
|
||||
// #enddocregion manager_ordering
|
||||
|
||||
// #docregion manager_count
|
||||
Future count() async {
|
||||
// Count all items
|
||||
await managers.todoItems.count();
|
||||
|
||||
// Count all items with a title of "Title"
|
||||
await managers.todoItems.filter((f) => f.title("Title")).count();
|
||||
}
|
||||
// #enddocregion manager_count
|
||||
|
||||
// #docregion manager_exists
|
||||
Future exists() async {
|
||||
// Check if any items exist
|
||||
await managers.todoItems.exists();
|
||||
|
||||
// Check if any items with a title of "Title" exist
|
||||
await managers.todoItems.filter((f) => f.title("Title")).exists();
|
||||
}
|
||||
// #enddocregion manager_exists
|
||||
}
|
||||
|
||||
// #docregion manager_filter_extensions
|
||||
// Extend drifts built-in filters by combining the existing filters to create a new one
|
||||
// or by creating a new filter from scratch
|
||||
extension After2000Filter on ColumnFilters<DateTime> {
|
||||
// Create a new filter by combining existing filters
|
||||
ComposableFilter after2000orBefore1900() =>
|
||||
isAfter(DateTime(2000)) | isBefore(DateTime(1900));
|
||||
|
||||
// Create a new filter from scratch using the `column` property
|
||||
ComposableFilter filterOnUnixEpoch(int value) =>
|
||||
ComposableFilter(column.unixepoch.equals(value), inverted: inverted);
|
||||
}
|
||||
|
||||
Future filterWithExtension(AppDatabase db) async {
|
||||
// Use the custom filters on any column that is of type DateTime
|
||||
await db.managers.todoItems
|
||||
.filter((f) => f.createdAt.after2000orBefore1900())
|
||||
.get();
|
||||
|
||||
// Use the custom filter on the `unixepoch` column
|
||||
await db.managers.todoItems
|
||||
.filter((f) => f.createdAt.filterOnUnixEpoch(0))
|
||||
.get();
|
||||
}
|
||||
// #enddocregion manager_filter_extensions
|
||||
|
||||
// #docregion manager_ordering_extensions
|
||||
// Extend drifts built-in orderings by create a new ordering from scratch
|
||||
extension After2000Ordering on ColumnOrderings<DateTime> {
|
||||
ComposableOrdering byUnixEpoch() => ColumnOrderings(column.unixepoch).asc();
|
||||
}
|
||||
|
||||
Future orderingWithExtension(AppDatabase db) async {
|
||||
// Use the custom orderings on any column that is of type DateTime
|
||||
await db.managers.todoItems.orderBy((f) => f.createdAt.byUnixEpoch()).get();
|
||||
}
|
||||
// #enddocregion manager_ordering_extensions
|
||||
|
||||
// #docregion manager_custom_filter
|
||||
// Extend the generated table filter composer to add a custom filter
|
||||
extension NoContentOrBefore2000FilterX on $$TodoItemsTableFilterComposer {
|
||||
ComposableFilter noContentOrBefore2000() =>
|
||||
(content.isNull() | createdAt.isBefore(DateTime(2000)));
|
||||
}
|
||||
|
||||
Future customFilter(AppDatabase db) async {
|
||||
// Use the custom filter on the `TodoItems` table
|
||||
await db.managers.todoItems.filter((f) => f.noContentOrBefore2000()).get();
|
||||
}
|
||||
// #enddocregion manager_custom_filter
|
||||
|
||||
// #docregion manager_custom_ordering
|
||||
// Extend the generated table filter composer to add a custom filter
|
||||
extension ContentThenCreationDataX on $$TodoItemsTableOrderingComposer {
|
||||
ComposableOrdering contentThenCreatedAt() => content.asc() & createdAt.asc();
|
||||
}
|
||||
|
||||
Future customOrdering(AppDatabase db) async {
|
||||
// Use the custom ordering on the `TodoItems` table
|
||||
await db.managers.todoItems.orderBy((f) => f.contentThenCreatedAt()).get();
|
||||
}
|
||||
// #enddocregion manager_custom_ordering
|
||||
|
|
|
@ -53,8 +53,8 @@ class $$CategoriesTableFilterComposer
|
|||
class $$CategoriesTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.$CategoriesTable> {
|
||||
$$CategoriesTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings get name => i0.ColumnOrderings($table.name);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<String> get name => i0.ColumnOrderings($table.name);
|
||||
}
|
||||
|
||||
class $$CategoriesTableProcessedTableManager extends i0.ProcessedTableManager<
|
||||
|
@ -143,10 +143,10 @@ class $$TodoItemsTableFilterComposer
|
|||
class $$TodoItemsTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.$TodoItemsTable> {
|
||||
$$TodoItemsTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings get title => i0.ColumnOrderings($table.title);
|
||||
i0.ColumnOrderings get content => i0.ColumnOrderings($table.content);
|
||||
i0.ColumnOrderings get categoryId => i0.ColumnOrderings($table.category);
|
||||
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(
|
||||
|
@ -161,7 +161,8 @@ class $$TodoItemsTableOrderingComposer
|
|||
builder: o);
|
||||
}
|
||||
|
||||
i0.ColumnOrderings get dueDate => i0.ColumnOrderings($table.dueDate);
|
||||
i0.ColumnOrderings<DateTime> get dueDate =>
|
||||
i0.ColumnOrderings($table.dueDate);
|
||||
}
|
||||
|
||||
class $$TodoItemsTableProcessedTableManager extends i0.ProcessedTableManager<
|
||||
|
|
|
@ -31,9 +31,10 @@ class $$BuyableItemsTableFilterComposer
|
|||
class $$BuyableItemsTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.$BuyableItemsTable> {
|
||||
$$BuyableItemsTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings get description => i0.ColumnOrderings($table.description);
|
||||
i0.ColumnOrderings get price => i0.ColumnOrderings($table.price);
|
||||
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<
|
||||
|
@ -115,8 +116,8 @@ class $$ShoppingCartsTableFilterComposer
|
|||
class $$ShoppingCartsTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i2.$ShoppingCartsTable> {
|
||||
$$ShoppingCartsTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings get entries => i0.ColumnOrderings($table.entries);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<String> get entries => i0.ColumnOrderings($table.entries);
|
||||
}
|
||||
|
||||
class $$ShoppingCartsTableProcessedTableManager
|
||||
|
|
|
@ -49,9 +49,10 @@ class $$BuyableItemsTableFilterComposer
|
|||
class $$BuyableItemsTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i1.$BuyableItemsTable> {
|
||||
$$BuyableItemsTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings get description => i0.ColumnOrderings($table.description);
|
||||
i0.ColumnOrderings get price => i0.ColumnOrderings($table.price);
|
||||
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<
|
||||
|
@ -142,7 +143,7 @@ class $$ShoppingCartsTableFilterComposer
|
|||
class $$ShoppingCartsTableOrderingComposer
|
||||
extends i0.OrderingComposer<i0.GeneratedDatabase, i2.$ShoppingCartsTable> {
|
||||
$$ShoppingCartsTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings get id => i0.ColumnOrderings($table.id);
|
||||
i0.ColumnOrderings<int> get id => i0.ColumnOrderings($table.id);
|
||||
}
|
||||
|
||||
class $$ShoppingCartsTableProcessedTableManager
|
||||
|
@ -237,7 +238,7 @@ class $$ShoppingCartEntriesTableFilterComposer extends i0
|
|||
class $$ShoppingCartEntriesTableOrderingComposer extends i0
|
||||
.OrderingComposer<i0.GeneratedDatabase, i2.$ShoppingCartEntriesTable> {
|
||||
$$ShoppingCartEntriesTableOrderingComposer(super.db, super.table);
|
||||
i0.ColumnOrderings get shoppingCartId =>
|
||||
i0.ColumnOrderings<int> get shoppingCartId =>
|
||||
i0.ColumnOrderings($table.shoppingCart);
|
||||
i0.ComposableOrdering shoppingCart(
|
||||
i0.ComposableOrdering Function($$ShoppingCartsTableOrderingComposer o)
|
||||
|
@ -254,7 +255,7 @@ class $$ShoppingCartEntriesTableOrderingComposer extends i0
|
|||
builder: o);
|
||||
}
|
||||
|
||||
i0.ColumnOrderings get itemId => i0.ColumnOrderings($table.item);
|
||||
i0.ColumnOrderings<int> get itemId => i0.ColumnOrderings($table.item);
|
||||
i0.ComposableOrdering item(
|
||||
i0.ComposableOrdering Function($$BuyableItemsTableOrderingComposer o) o) {
|
||||
return $composeWithJoins(
|
||||
|
|
|
@ -24,12 +24,20 @@ class TodoItems extends Table {
|
|||
IntColumn get id => integer().autoIncrement()();
|
||||
TextColumn get title => text().withLength(min: 6, max: 32)();
|
||||
TextColumn get content => text().named('body')();
|
||||
IntColumn get category => integer().nullable()();
|
||||
IntColumn get category =>
|
||||
integer().nullable().references(TodoCategory, #id)();
|
||||
DateTimeColumn get createdAt => dateTime().nullable()();
|
||||
}
|
||||
|
||||
class TodoCategory extends Table {
|
||||
IntColumn get id => integer().autoIncrement()();
|
||||
TextColumn get description => text()();
|
||||
}
|
||||
|
||||
// #enddocregion table
|
||||
// #docregion open
|
||||
|
||||
@DriftDatabase(tables: [TodoItems])
|
||||
@DriftDatabase(tables: [TodoItems, TodoCategory])
|
||||
class AppDatabase extends _$AppDatabase {
|
||||
// #enddocregion open
|
||||
// After generating code, this class needs to define a `schemaVersion` getter
|
||||
|
|
|
@ -5,11 +5,12 @@ data:
|
|||
weight: 1
|
||||
|
||||
template: layouts/docs/single
|
||||
path: /docs/getting-started/manager/
|
||||
---
|
||||
|
||||
{% assign snippets = 'package:drift_docs/snippets/dart_api/manager.dart.excerpt.json' | readString | json_decode %}
|
||||
|
||||
With generated code, drift allows writing SQL queries in typesafe Dart.
|
||||
With generated code, drift allows writing SQL queries in type-safe Dart.
|
||||
While this is provides lots of flexibility, it requires familiarity with SQL.
|
||||
As a simpler alternative, drift 2.17 introduced a new set of APIs designed to
|
||||
make common queries much easier to write.
|
||||
|
@ -19,12 +20,40 @@ instructions.
|
|||
|
||||
## Select
|
||||
|
||||
### Count and exists
|
||||
The manager simplifies the process of retrieving rows from a table. Use it to read rows from the table or watch
|
||||
for changes to the table.
|
||||
|
||||
{% include "blocks/snippet" snippets = snippets name = 'manager_select' %}
|
||||
|
||||
The manager provides a really easy to use API for selecting rows from a table. These can be combined with `|` and `&` and parenthesis to construct more complex queries. Use `.not` to negate a condition.
|
||||
|
||||
{% include "blocks/snippet" snippets = snippets name = 'manager_filter' %}
|
||||
|
||||
Every column has filters for equality, inequality and nullability.
|
||||
Type specific filters for `int`, `double`, `Int64`, `DateTime` and `String` are included out of the box.
|
||||
|
||||
{% include "blocks/snippet" snippets = snippets name = 'manager_type_specific_filter' %}
|
||||
|
||||
|
||||
### Filtering across tables
|
||||
|
||||
### Ordering
|
||||
|
||||
You can also order the results of a query using the `orderBy` method. The syntax is similar to the `filter` method.
|
||||
Use the `&` to combine multiple orderings. Orderings are applied in the order they are added.
|
||||
You can also use ordering across multiple tables just like with filters.
|
||||
|
||||
{% include "blocks/snippet" snippets = snippets name = 'manager_ordering' %}
|
||||
|
||||
|
||||
### Count and exists
|
||||
The manager makes it easy to check if a row exists or to count the number of rows that match a certain condition.
|
||||
|
||||
{% include "blocks/snippet" snippets = snippets name = 'manager_count' %}
|
||||
|
||||
{% include "blocks/snippet" snippets = snippets name = 'manager_exists' %}
|
||||
|
||||
|
||||
## Updates
|
||||
We can use the manager to update rows in bulk or individual rows that meet a certain condition.
|
||||
|
||||
|
@ -47,3 +76,27 @@ Any rows that meet the specified condition will be deleted.
|
|||
|
||||
{% include "blocks/snippet" snippets = snippets name = 'manager_delete' %}
|
||||
|
||||
## Extensions
|
||||
The manager provides a set of filters and orderings out of the box for common types, however you can
|
||||
extend them to add new filters and orderings.
|
||||
|
||||
#### Custom Column Filters
|
||||
If you want to add new filters for individual columns types, you can extend the `ColumnFilter<T>` class.
|
||||
|
||||
{% include "blocks/snippet" snippets = snippets name = 'manager_filter_extensions' %}
|
||||
|
||||
#### Custom Table Filters
|
||||
You can also create custom filters that operate on multiple columns by extending generated filtersets.
|
||||
|
||||
{% include "blocks/snippet" snippets = snippets name = 'manager_custom_filter' %}
|
||||
|
||||
#### Custom Column Orderings
|
||||
You can create new ordering methods for individual columns types by extending the `ColumnOrdering<T>` class.
|
||||
Use the `ComposableOrdering` class to create complex orderings.
|
||||
|
||||
{% include "blocks/snippet" snippets = snippets name = 'manager_ordering_extensions' %}
|
||||
|
||||
#### Custom Table Filters
|
||||
You can also create custom filters that operate on multiple columns by extending generated filtersets.
|
||||
|
||||
{% include "blocks/snippet" snippets = snippets name = 'manager_custom_filter' %}
|
|
@ -729,8 +729,8 @@ class $$TodoCategoriesTableFilterComposer
|
|||
class $$TodoCategoriesTableOrderingComposer
|
||||
extends OrderingComposer<_$Database, $TodoCategoriesTable> {
|
||||
$$TodoCategoriesTableOrderingComposer(super.db, super.table);
|
||||
ColumnOrderings get id => ColumnOrderings($table.id);
|
||||
ColumnOrderings get name => ColumnOrderings($table.name);
|
||||
ColumnOrderings<int> get id => ColumnOrderings($table.id);
|
||||
ColumnOrderings<String> get name => ColumnOrderings($table.name);
|
||||
}
|
||||
|
||||
class $$TodoCategoriesTableProcessedTableManager extends ProcessedTableManager<
|
||||
|
@ -818,10 +818,10 @@ class $$TodoItemsTableFilterComposer
|
|||
class $$TodoItemsTableOrderingComposer
|
||||
extends OrderingComposer<_$Database, $TodoItemsTable> {
|
||||
$$TodoItemsTableOrderingComposer(super.db, super.table);
|
||||
ColumnOrderings get id => ColumnOrderings($table.id);
|
||||
ColumnOrderings get title => ColumnOrderings($table.title);
|
||||
ColumnOrderings get content => ColumnOrderings($table.content);
|
||||
ColumnOrderings get categoryIdId => ColumnOrderings($table.categoryId);
|
||||
ColumnOrderings<int> get id => ColumnOrderings($table.id);
|
||||
ColumnOrderings<String> get title => ColumnOrderings($table.title);
|
||||
ColumnOrderings<String> get content => ColumnOrderings($table.content);
|
||||
ColumnOrderings<int> get categoryIdId => ColumnOrderings($table.categoryId);
|
||||
ComposableOrdering categoryId(
|
||||
ComposableOrdering Function($$TodoCategoriesTableOrderingComposer o) o) {
|
||||
return $composeWithJoins(
|
||||
|
@ -835,7 +835,8 @@ class $$TodoItemsTableOrderingComposer
|
|||
builder: o);
|
||||
}
|
||||
|
||||
ColumnOrderings get generatedText => ColumnOrderings($table.generatedText);
|
||||
ColumnOrderings<String> get generatedText =>
|
||||
ColumnOrderings($table.generatedText);
|
||||
}
|
||||
|
||||
class $$TodoItemsTableProcessedTableManager extends ProcessedTableManager<
|
||||
|
|
|
@ -9,7 +9,7 @@ class ColumnOrderings<T extends Object> {
|
|||
ColumnOrderings(this.column);
|
||||
|
||||
/// Column that this [ColumnOrderings] wraps
|
||||
GeneratedColumn<T> column;
|
||||
Expression<T> column;
|
||||
|
||||
/// Sort this column in ascending order
|
||||
///
|
||||
|
@ -30,7 +30,7 @@ class OrderingBuilder {
|
|||
final OrderingMode mode;
|
||||
|
||||
/// The column that the ordering is applied to
|
||||
final GeneratedColumn column;
|
||||
final Expression<Object> column;
|
||||
|
||||
/// Create a new ordering builder, will be used by the [TableManagerState] to create [OrderingTerm]s
|
||||
OrderingBuilder(this.mode, this.column);
|
||||
|
|
|
@ -1981,8 +1981,8 @@ class $WithDefaultsFilterComposer
|
|||
class $WithDefaultsOrderingComposer
|
||||
extends OrderingComposer<_$CustomTablesDb, WithDefaults> {
|
||||
$WithDefaultsOrderingComposer(super.db, super.table);
|
||||
ColumnOrderings get a => ColumnOrderings($table.a);
|
||||
ColumnOrderings get b => ColumnOrderings($table.b);
|
||||
ColumnOrderings<String> get a => ColumnOrderings($table.a);
|
||||
ColumnOrderings<int> get b => ColumnOrderings($table.b);
|
||||
}
|
||||
|
||||
class $WithDefaultsProcessedTableManager extends ProcessedTableManager<
|
||||
|
@ -2058,9 +2058,9 @@ class $WithConstraintsFilterComposer
|
|||
class $WithConstraintsOrderingComposer
|
||||
extends OrderingComposer<_$CustomTablesDb, WithConstraints> {
|
||||
$WithConstraintsOrderingComposer(super.db, super.table);
|
||||
ColumnOrderings get a => ColumnOrderings($table.a);
|
||||
ColumnOrderings get b => ColumnOrderings($table.b);
|
||||
ColumnOrderings get c => ColumnOrderings($table.c);
|
||||
ColumnOrderings<String> get a => ColumnOrderings($table.a);
|
||||
ColumnOrderings<int> get b => ColumnOrderings($table.b);
|
||||
ColumnOrderings<double> get c => ColumnOrderings($table.c);
|
||||
}
|
||||
|
||||
class $WithConstraintsProcessedTableManager extends ProcessedTableManager<
|
||||
|
@ -2151,10 +2151,11 @@ class $ConfigTableFilterComposer
|
|||
class $ConfigTableOrderingComposer
|
||||
extends OrderingComposer<_$CustomTablesDb, ConfigTable> {
|
||||
$ConfigTableOrderingComposer(super.db, super.table);
|
||||
ColumnOrderings get configKey => ColumnOrderings($table.configKey);
|
||||
ColumnOrderings get configValue => ColumnOrderings($table.configValue);
|
||||
ColumnOrderings get syncState => ColumnOrderings($table.syncState);
|
||||
ColumnOrderings get syncStateImplicit =>
|
||||
ColumnOrderings<String> get configKey => ColumnOrderings($table.configKey);
|
||||
ColumnOrderings<DriftAny> get configValue =>
|
||||
ColumnOrderings($table.configValue);
|
||||
ColumnOrderings<int> get syncState => ColumnOrderings($table.syncState);
|
||||
ColumnOrderings<int> get syncStateImplicit =>
|
||||
ColumnOrderings($table.syncStateImplicit);
|
||||
}
|
||||
|
||||
|
@ -2243,10 +2244,10 @@ class $MytableFilterComposer extends FilterComposer<_$CustomTablesDb, Mytable> {
|
|||
class $MytableOrderingComposer
|
||||
extends OrderingComposer<_$CustomTablesDb, Mytable> {
|
||||
$MytableOrderingComposer(super.db, super.table);
|
||||
ColumnOrderings get someid => ColumnOrderings($table.someid);
|
||||
ColumnOrderings get sometext => ColumnOrderings($table.sometext);
|
||||
ColumnOrderings get isInserting => ColumnOrderings($table.isInserting);
|
||||
ColumnOrderings get somedate => ColumnOrderings($table.somedate);
|
||||
ColumnOrderings<int> get someid => ColumnOrderings($table.someid);
|
||||
ColumnOrderings<String> get sometext => ColumnOrderings($table.sometext);
|
||||
ColumnOrderings<bool> get isInserting => ColumnOrderings($table.isInserting);
|
||||
ColumnOrderings<DateTime> get somedate => ColumnOrderings($table.somedate);
|
||||
}
|
||||
|
||||
class $MytableProcessedTableManager extends ProcessedTableManager<
|
||||
|
@ -2325,9 +2326,9 @@ class $EmailFilterComposer extends FilterComposer<_$CustomTablesDb, Email> {
|
|||
|
||||
class $EmailOrderingComposer extends OrderingComposer<_$CustomTablesDb, Email> {
|
||||
$EmailOrderingComposer(super.db, super.table);
|
||||
ColumnOrderings get sender => ColumnOrderings($table.sender);
|
||||
ColumnOrderings get title => ColumnOrderings($table.title);
|
||||
ColumnOrderings get body => ColumnOrderings($table.body);
|
||||
ColumnOrderings<String> get sender => ColumnOrderings($table.sender);
|
||||
ColumnOrderings<String> get title => ColumnOrderings($table.title);
|
||||
ColumnOrderings<String> get body => ColumnOrderings($table.body);
|
||||
}
|
||||
|
||||
class $EmailProcessedTableManager extends ProcessedTableManager<
|
||||
|
@ -2407,8 +2408,8 @@ class $WeirdTableFilterComposer
|
|||
class $WeirdTableOrderingComposer
|
||||
extends OrderingComposer<_$CustomTablesDb, WeirdTable> {
|
||||
$WeirdTableOrderingComposer(super.db, super.table);
|
||||
ColumnOrderings get sqlClass => ColumnOrderings($table.sqlClass);
|
||||
ColumnOrderings get textColumn => ColumnOrderings($table.textColumn);
|
||||
ColumnOrderings<int> get sqlClass => ColumnOrderings($table.sqlClass);
|
||||
ColumnOrderings<String> get textColumn => ColumnOrderings($table.textColumn);
|
||||
}
|
||||
|
||||
class $WeirdTableProcessedTableManager extends ProcessedTableManager<
|
||||
|
|
|
@ -2527,10 +2527,11 @@ class $$CategoriesTableFilterComposer
|
|||
class $$CategoriesTableOrderingComposer
|
||||
extends OrderingComposer<_$TodoDb, $CategoriesTable> {
|
||||
$$CategoriesTableOrderingComposer(super.db, super.table);
|
||||
ColumnOrderings get id => ColumnOrderings($table.id);
|
||||
ColumnOrderings get description => ColumnOrderings($table.description);
|
||||
ColumnOrderings get priority => ColumnOrderings($table.priority);
|
||||
ColumnOrderings get descriptionInUpperCase =>
|
||||
ColumnOrderings<int> get id => ColumnOrderings($table.id);
|
||||
ColumnOrderings<String> get description =>
|
||||
ColumnOrderings($table.description);
|
||||
ColumnOrderings<int> get priority => ColumnOrderings($table.priority);
|
||||
ColumnOrderings<String> get descriptionInUpperCase =>
|
||||
ColumnOrderings($table.descriptionInUpperCase);
|
||||
}
|
||||
|
||||
|
@ -2627,11 +2628,12 @@ class $$TodosTableTableFilterComposer
|
|||
class $$TodosTableTableOrderingComposer
|
||||
extends OrderingComposer<_$TodoDb, $TodosTableTable> {
|
||||
$$TodosTableTableOrderingComposer(super.db, super.table);
|
||||
ColumnOrderings get id => ColumnOrderings($table.id);
|
||||
ColumnOrderings get title => ColumnOrderings($table.title);
|
||||
ColumnOrderings get content => ColumnOrderings($table.content);
|
||||
ColumnOrderings get targetDate => ColumnOrderings($table.targetDate);
|
||||
ColumnOrderings get categoryId => ColumnOrderings($table.category);
|
||||
ColumnOrderings<int> get id => ColumnOrderings($table.id);
|
||||
ColumnOrderings<String> get title => ColumnOrderings($table.title);
|
||||
ColumnOrderings<String> get content => ColumnOrderings($table.content);
|
||||
ColumnOrderings<DateTime> get targetDate =>
|
||||
ColumnOrderings($table.targetDate);
|
||||
ColumnOrderings<int> get categoryId => ColumnOrderings($table.category);
|
||||
ComposableOrdering category(
|
||||
ComposableOrdering Function($$CategoriesTableOrderingComposer o) o) {
|
||||
return $composeWithJoins(
|
||||
|
@ -2645,7 +2647,7 @@ class $$TodosTableTableOrderingComposer
|
|||
builder: o);
|
||||
}
|
||||
|
||||
ColumnOrderings get status => ColumnOrderings($table.status);
|
||||
ColumnOrderings<String> get status => ColumnOrderings($table.status);
|
||||
}
|
||||
|
||||
class $$TodosTableTableProcessedTableManager extends ProcessedTableManager<
|
||||
|
@ -2744,11 +2746,13 @@ class $$UsersTableFilterComposer extends FilterComposer<_$TodoDb, $UsersTable> {
|
|||
class $$UsersTableOrderingComposer
|
||||
extends OrderingComposer<_$TodoDb, $UsersTable> {
|
||||
$$UsersTableOrderingComposer(super.db, super.table);
|
||||
ColumnOrderings get id => ColumnOrderings($table.id);
|
||||
ColumnOrderings get name => ColumnOrderings($table.name);
|
||||
ColumnOrderings get isAwesome => ColumnOrderings($table.isAwesome);
|
||||
ColumnOrderings get profilePicture => ColumnOrderings($table.profilePicture);
|
||||
ColumnOrderings get creationTime => ColumnOrderings($table.creationTime);
|
||||
ColumnOrderings<int> get id => ColumnOrderings($table.id);
|
||||
ColumnOrderings<String> get name => ColumnOrderings($table.name);
|
||||
ColumnOrderings<bool> get isAwesome => ColumnOrderings($table.isAwesome);
|
||||
ColumnOrderings<Uint8List> get profilePicture =>
|
||||
ColumnOrderings($table.profilePicture);
|
||||
ColumnOrderings<DateTime> get creationTime =>
|
||||
ColumnOrderings($table.creationTime);
|
||||
}
|
||||
|
||||
class $$UsersTableProcessedTableManager extends ProcessedTableManager<
|
||||
|
@ -2835,8 +2839,8 @@ class $$SharedTodosTableFilterComposer
|
|||
class $$SharedTodosTableOrderingComposer
|
||||
extends OrderingComposer<_$TodoDb, $SharedTodosTable> {
|
||||
$$SharedTodosTableOrderingComposer(super.db, super.table);
|
||||
ColumnOrderings get todo => ColumnOrderings($table.todo);
|
||||
ColumnOrderings get user => ColumnOrderings($table.user);
|
||||
ColumnOrderings<int> get todo => ColumnOrderings($table.todo);
|
||||
ColumnOrderings<int> get user => ColumnOrderings($table.user);
|
||||
}
|
||||
|
||||
class $$SharedTodosTableProcessedTableManager extends ProcessedTableManager<
|
||||
|
@ -2914,7 +2918,7 @@ class $$PureDefaultsTableFilterComposer
|
|||
class $$PureDefaultsTableOrderingComposer
|
||||
extends OrderingComposer<_$TodoDb, $PureDefaultsTable> {
|
||||
$$PureDefaultsTableOrderingComposer(super.db, super.table);
|
||||
ColumnOrderings get txt => ColumnOrderings($table.txt);
|
||||
ColumnOrderings<String> get txt => ColumnOrderings($table.txt);
|
||||
}
|
||||
|
||||
class $$PureDefaultsTableProcessedTableManager extends ProcessedTableManager<
|
||||
|
@ -2984,7 +2988,7 @@ class $$WithCustomTypeTableFilterComposer
|
|||
class $$WithCustomTypeTableOrderingComposer
|
||||
extends OrderingComposer<_$TodoDb, $WithCustomTypeTable> {
|
||||
$$WithCustomTypeTableOrderingComposer(super.db, super.table);
|
||||
ColumnOrderings get id => ColumnOrderings($table.id);
|
||||
ColumnOrderings<UuidValue> get id => ColumnOrderings($table.id);
|
||||
}
|
||||
|
||||
class $$WithCustomTypeTableProcessedTableManager extends ProcessedTableManager<
|
||||
|
@ -3071,16 +3075,16 @@ class $$TableWithEveryColumnTypeTableFilterComposer
|
|||
class $$TableWithEveryColumnTypeTableOrderingComposer
|
||||
extends OrderingComposer<_$TodoDb, $TableWithEveryColumnTypeTable> {
|
||||
$$TableWithEveryColumnTypeTableOrderingComposer(super.db, super.table);
|
||||
ColumnOrderings get id => ColumnOrderings($table.id);
|
||||
ColumnOrderings get aBool => ColumnOrderings($table.aBool);
|
||||
ColumnOrderings get aDateTime => ColumnOrderings($table.aDateTime);
|
||||
ColumnOrderings get aText => ColumnOrderings($table.aText);
|
||||
ColumnOrderings get anInt => ColumnOrderings($table.anInt);
|
||||
ColumnOrderings get anInt64 => ColumnOrderings($table.anInt64);
|
||||
ColumnOrderings get aReal => ColumnOrderings($table.aReal);
|
||||
ColumnOrderings get aBlob => ColumnOrderings($table.aBlob);
|
||||
ColumnOrderings get anIntEnum => ColumnOrderings($table.anIntEnum);
|
||||
ColumnOrderings get aTextWithConverter =>
|
||||
ColumnOrderings<int> get id => ColumnOrderings($table.id);
|
||||
ColumnOrderings<bool> get aBool => ColumnOrderings($table.aBool);
|
||||
ColumnOrderings<DateTime> get aDateTime => ColumnOrderings($table.aDateTime);
|
||||
ColumnOrderings<String> get aText => ColumnOrderings($table.aText);
|
||||
ColumnOrderings<int> get anInt => ColumnOrderings($table.anInt);
|
||||
ColumnOrderings<BigInt> get anInt64 => ColumnOrderings($table.anInt64);
|
||||
ColumnOrderings<double> get aReal => ColumnOrderings($table.aReal);
|
||||
ColumnOrderings<Uint8List> get aBlob => ColumnOrderings($table.aBlob);
|
||||
ColumnOrderings<int> get anIntEnum => ColumnOrderings($table.anIntEnum);
|
||||
ColumnOrderings<String> get aTextWithConverter =>
|
||||
ColumnOrderings($table.aTextWithConverter);
|
||||
}
|
||||
|
||||
|
|
|
@ -203,8 +203,8 @@ class $$_SomeTableTableFilterComposer
|
|||
class $$_SomeTableTableOrderingComposer
|
||||
extends OrderingComposer<_$_SomeDb, $_SomeTableTable> {
|
||||
$$_SomeTableTableOrderingComposer(super.db, super.table);
|
||||
ColumnOrderings get id => ColumnOrderings($table.id);
|
||||
ColumnOrderings get name => ColumnOrderings($table.name);
|
||||
ColumnOrderings<int> get id => ColumnOrderings($table.id);
|
||||
ColumnOrderings<String> get name => ColumnOrderings($table.name);
|
||||
}
|
||||
|
||||
class $$_SomeTableTableProcessedTableManager extends ProcessedTableManager<
|
||||
|
|
Loading…
Reference in New Issue