mirror of https://github.com/AMT-Cheif/drift.git
distict count by defualt
This commit is contained in:
parent
c723b4e81e
commit
7a8983dcc4
|
@ -301,9 +301,6 @@ abstract class BaseTableManager<
|
||||||
._getChildManagerBuilder($state.copyWith(limit: limit, offset: offset));
|
._getChildManagerBuilder($state.copyWith(limit: limit, offset: offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return the count of rows matched by the built statement
|
|
||||||
Future<int> count() => $state.count();
|
|
||||||
|
|
||||||
/// Writes all non-null fields from the entity into the columns of all rows
|
/// Writes all non-null fields from the entity into the columns of all rows
|
||||||
/// that match the [filter] clause. Warning: That also means that, when you're
|
/// that match the [filter] clause. Warning: That also means that, when you're
|
||||||
/// not setting a where clause explicitly, this method will update all rows in
|
/// not setting a where clause explicitly, this method will update all rows in
|
||||||
|
@ -338,6 +335,12 @@ abstract class ProcessedTableManager<
|
||||||
/// Create a new [ProcessedTableManager] instance
|
/// Create a new [ProcessedTableManager] instance
|
||||||
const ProcessedTableManager(super.$state);
|
const ProcessedTableManager(super.$state);
|
||||||
|
|
||||||
|
/// Return the count of rows matched by the built statement
|
||||||
|
/// When counting rows, the query will only count distinct rows by default
|
||||||
|
Future<int> count([bool distinct = true]) {
|
||||||
|
return $state.copyWith(distinct: true).count();
|
||||||
|
}
|
||||||
|
|
||||||
/// 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