mirror of https://github.com/AMT-Cheif/drift.git
move count to base manager
This commit is contained in:
parent
22ec0f77a6
commit
f17c251126
|
@ -348,6 +348,9 @@ abstract class BaseTableManager<
|
||||||
Future<int> count([bool distinct = true]) {
|
Future<int> count([bool distinct = true]) {
|
||||||
return $state.copyWith(distinct: true).count();
|
return $state.copyWith(distinct: true).count();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Checks whether any rows exist
|
||||||
|
Future<bool> exists() => $state.exists();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A table manager that can be used to select rows from a table
|
/// A table manager that can be used to select rows from a table
|
||||||
|
@ -368,9 +371,6 @@ abstract class ProcessedTableManager<
|
||||||
/// Create a new [ProcessedTableManager] instance
|
/// Create a new [ProcessedTableManager] instance
|
||||||
const ProcessedTableManager(super.$state);
|
const ProcessedTableManager(super.$state);
|
||||||
|
|
||||||
/// Checks whether any rows exist
|
|
||||||
Future<bool> exists() => $state.exists();
|
|
||||||
|
|
||||||
/// Deletes all rows matched by built statement
|
/// Deletes all rows matched by built statement
|
||||||
///
|
///
|
||||||
/// Returns the amount of rows that were deleted by this statement directly
|
/// Returns the amount of rows that were deleted by this statement directly
|
||||||
|
|
Loading…
Reference in New Issue