List supported column types in website (#624)

This commit is contained in:
Simon Binder 2020-06-11 18:37:14 +02:00
parent d089edd4c9
commit db3387736a
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
1 changed files with 15 additions and 1 deletions

View File

@ -114,4 +114,18 @@ class GroupMemberships extends Table {
Note that the primary key must essentially be constant so that the generator can recognize it. That means:
- it must be defined with the `=>` syntax, function bodies aren't supported
- it must return a set literal without collection elements like `if`, `for` or spread operators
- it must return a set literal without collection elements like `if`, `for` or spread operators
## Supported column types
Moor supports a variety of column types out of the box. You can store custom classes in columns by using
[type converters]({{<relref "../Advanced Features/type_converters.md">}}).
| Dart type | Colum | Corresponding SQLite type |
|--------------|---------------|-----------------------------------------------------|
| `int` | `integer()` | `INTEGER` |
| `double` | `real()` | `REAL` |
| `boolean` | `boolean()` | `INTEGER`, which a `CHECK` to only allow `0` or `1` |
| `String` | `text()` | `TEXT` |
| `DateTime` | `dateTime()` | `INTEGER` (Unix timestamp in seconds) |
| `Uint8List` | `blob()` | `BLOB` |