Provide an example usage in the `withDefault` method

This commit is contained in:
Simon Binder 2019-06-15 09:30:07 +02:00
parent acbcc6bb58
commit 110d775a90
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
2 changed files with 7 additions and 1 deletions

View File

@ -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.

View File

@ -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