View Source Datatypes

EdgeDB driver for Elixir automatically converts EdgeDB types to the corresponding Elixir types and vice versa.

The table below shows the correspondence between EdgeDB and Elixir types.

EdgeDBElixirExample
strString.t/0"Hello EdgeDB!"
boolboolean/0true, false
int16, int32, int64integer/016
float32, float64float/03.1415
bigint, decimalDecimal.t/0#Decimal<1.23>
jsonany/042
uuidString.t/0"0eba1636-846e-11ec-845e-276b0105b857"
anyenumString.t/0"green"
datetimeDateTime.t/0~U[2018-05-07 15:01:22Z]
durationinteger/0 or Timex.Duration-420000000, #<Duration(PT7M)>
cal::local_datetimeNaiveDateTime.t/0~N[2018-05-07 15:01:22]
cal::local_dateDate.t/0~D[2018-05-07]
cal::local_timeTime.t/0~T[15:01:22]
cal::relative_durationEdgeDB.RelativeDuration.t/0#EdgeDB.RelativeDuration<"PT45.6S">
bytesbinary/0<<1, 2, 3>>, "some bytes"
array<anytype>list/0[1, 2, 3]
anytupletuple/0 or EdgeDB.NamedTuple.t/0{1, 2, 3}, #EdgeDB.NamedTuple<a: 1, b: 2, c: 3>}
objectEdgeDB.Object.t/0#EdgeDB.Object<name := "username">}
setEdgeDB.Set.t/0#EdgeDB.Set<{1, 2, 3}>}
cfg::memoryEdgeDB.ConfigMemory.t/0#EdgeDB.ConfigMemory<"5KiB">
rangeEdgeDB.Range.t/0#EdgeDB.Range<[1.1, 3.3)>