Data types¶
Data types in Squiller are inspired by Rust and Python. Strictly speaking they do not map to any SQL types by themselves, only to types in the target language. It is up to the database driver to then map those to SQL types. However, it is still useful to explain the types that Squiller supports in terms of the corresponding SQL data types.
Supported types¶
Vaporware warning: Not all of these are implemented.
Squiller | PostgreSQL | SQLite |
---|---|---|
i32 | int | integer |
i64 | bigint | integer |
f32 | float4 | number |
f64 | float8 | number |
str | text | text |
bytes | bytea | blob |
bool | bool | integer |
instant | timestamptz | text1 |
1 Encoded to text as an ISO-8601 timestamp with Z suffix.
Language mapping¶
Vaporware warning: Not all of these are implemented.
Squiller | Rust | Python | Haskell |
---|---|---|---|
i32 | i32 | int | Int32 |
i64 | i64 | int | Int64 |
f32 | f32 | float | Float |
f64 | f64 | float | Double |
str | &str or String | str | Text |
bytes | &[u8] or Vec<u8> | bytes | ByteString |
bool | bool | bool | Bool |
instant | DateTime<Utc> | datetime1 | UtcTime |
1 Non-naive datetime, where tzinfo
is not None
.