DRY DB::TYPES and DB::Any

This commit is contained in:
Brian J. Cardiff 2016-06-21 12:08:51 -03:00
parent 76e3a35d59
commit 0daa1c18d7
1 changed files with 4 additions and 2 deletions

View File

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