Current section

Files

Jump to
tds lib tds binary_utils.ex
Raw

lib/tds/binary_utils.ex

defmodule Tds.BinaryUtils do
@moduledoc false
defmacro int64 do
quote do: signed - 64
end
defmacro int32 do
quote do: signed - 32
end
defmacro int16 do
quote do: signed - 16
end
defmacro uint16 do
quote do: unsigned - 16
end
defmacro int8 do
quote do: signed - 8
end
defmacro float64 do
quote do: float - 64
end
defmacro float32 do
quote do: float - 32
end
defmacro binary(size) do
quote do: binary - size(unquote(size))
end
defmacro binary(size, unit) do
quote do: binary - size(unquote(size)) - unit(unquote(unit))
end
defmacro unicode(size) do
quote do: little - binary - size(unquote(size)) - unit(16)
end
end