mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
DRY DB::TYPES and DB::Any
This commit is contained in:
parent
76e3a35d59
commit
0daa1c18d7
1 changed files with 4 additions and 2 deletions
|
@ -72,8 +72,10 @@ module DB
|
|||
# method to be used as query parameters
|
||||
TYPES = [Nil, String, Int32, Int64, Float32, Float64, Slice(UInt8)]
|
||||
|
||||
# See `DB::TYPES` in `DB`. `Any` is a nillable version of the union of all types in `DB::TYPES`
|
||||
alias Any = Nil | String | Int32 | Int64 | Float32 | Float64 | Slice(UInt8)
|
||||
# See `DB::TYPES` in `DB`. `Any` is a union of all types in `DB::TYPES`
|
||||
{% begin %}
|
||||
alias Any = Union({{*TYPES}})
|
||||
{% end %}
|
||||
|
||||
# Result of a `#exec` statement.
|
||||
record ExecResult, rows_affected : Int32, last_insert_id : Int64
|
||||
|
|
Loading…
Reference in a new issue