Packages

A SurrealDB Orm for Gleam!

Current section

Files

Jump to
surreal_gleam src types.erl
Raw

src/types.erl

-module(types).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export_type([geometry_type/0, field_type/0, default_field_type/0, table_entity/0]).
-type geometry_type() :: feature |
point |
line_string |
polygon |
multi_point |
multi_line |
multi_polygon |
collection.
-type field_type() :: {array, field_type()} |
{set, field_type()} |
boolean |
none |
null |
int |
float |
decimal |
string |
date_time |
record |
{geometry, geometry_type()} |
object |
{option, field_type()}.
-type default_field_type() :: {default_int, integer()} |
{default_string, binary()} |
{default_array, list(default_field_type())} |
default_none.
-type table_entity() :: {table,
binary(),
list({binary(), field_type(), {ok, binary()} | {error, binary()}}),
list({ok, binary()} | {error, binary()})}.