mirror of https://github.com/AMT-Cheif/drift.git
List supported column types in website (#624)
This commit is contained in:
parent
d089edd4c9
commit
db3387736a
|
@ -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` |
|
Loading…
Reference in New Issue