mirror of https://github.com/AMT-Cheif/drift.git
Provide an example usage in the `withDefault` method
This commit is contained in:
parent
acbcc6bb58
commit
110d775a90
|
@ -89,6 +89,12 @@ class ColumnBuilder<
|
|||
/// Particularly, you can use methods like [and], [or] and [not] to form
|
||||
/// expressions here.
|
||||
///
|
||||
/// If you need a column that just stores a static default value, you could
|
||||
/// use this method with a [Constant]:
|
||||
/// ```dart
|
||||
/// IntColumn get level => int().withDefault(const Constant(1))();
|
||||
/// ```
|
||||
///
|
||||
/// See also:
|
||||
/// - [Constant], which can be used to model literals that appear in CREATE
|
||||
/// TABLE statements.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: moor
|
||||
description: Moor is a safe and reactive persistence library for Dart applications
|
||||
version: 1.4.0
|
||||
version: 1.4.0+1
|
||||
repository: https://github.com/simolus3/moor
|
||||
homepage: https://moor.simonbinder.eu/
|
||||
issue_tracker: https://github.com/simolus3/moor/issues
|
||||
|
|
Loading…
Reference in New Issue