mirror of https://github.com/AMT-Cheif/drift.git
pos
This commit is contained in:
parent
42f32e0227
commit
f9407945ba
|
@ -346,8 +346,8 @@ abstract class RootTableManager<
|
||||||
|
|
||||||
Future<int> create(
|
Future<int> create(
|
||||||
Insertable<D> Function(CI o) f,
|
Insertable<D> Function(CI o) f,
|
||||||
InsertMode? mode,
|
{InsertMode? mode,
|
||||||
UpsertClause<Table, dynamic>? onConflict,
|
UpsertClause<Table, dynamic>? onConflict},
|
||||||
) {
|
) {
|
||||||
return state.db
|
return state.db
|
||||||
.into(state.table)
|
.into(state.table)
|
||||||
|
@ -356,8 +356,8 @@ abstract class RootTableManager<
|
||||||
|
|
||||||
Future<D> createReturning(
|
Future<D> createReturning(
|
||||||
Insertable<D> Function(CI o) f,
|
Insertable<D> Function(CI o) f,
|
||||||
InsertMode? mode,
|
{InsertMode? mode,
|
||||||
UpsertClause<Table, dynamic>? onConflict,
|
UpsertClause<Table, dynamic>? onConflict},
|
||||||
) {
|
) {
|
||||||
return state.db.into(state.table).insertReturning(f(_createInsertable),
|
return state.db.into(state.table).insertReturning(f(_createInsertable),
|
||||||
mode: mode, onConflict: onConflict) as Future<D>;
|
mode: mode, onConflict: onConflict) as Future<D>;
|
||||||
|
@ -365,8 +365,8 @@ abstract class RootTableManager<
|
||||||
|
|
||||||
Future<void> bulkCreate(
|
Future<void> bulkCreate(
|
||||||
Iterable<Insertable<D>> Function(CI o) f,
|
Iterable<Insertable<D>> Function(CI o) f,
|
||||||
InsertMode? mode,
|
{InsertMode? mode,
|
||||||
UpsertClause<Table, dynamic>? onConflict,
|
UpsertClause<Table, dynamic>? onConflict},
|
||||||
) {
|
) {
|
||||||
return state.db.batch((b) => b.insertAll(state.table, f(_createInsertable),
|
return state.db.batch((b) => b.insertAll(state.table, f(_createInsertable),
|
||||||
mode: mode, onConflict: onConflict));
|
mode: mode, onConflict: onConflict));
|
||||||
|
|
Loading…
Reference in New Issue