View Source surreal_query (surreal v1.0.0)

Link to this section Summary

Link to this section Types

-type query() ::
    {block, Inside :: [query()]} |
    {select} |
    {select, Field :: string_format()} |
    {from, Target :: string_format()} |
    {from, Targets :: [string_format()]} |
    {where, {Operator :: string_format(), Left :: string_format(), Right :: term()}} |
    {where, {Left :: string_format(), Right :: term()}} |
    {where,
     Conditions ::
         [{Operator :: string_format(), Left :: string_format(), Right :: term()} |
          {Left :: string_format(), Right :: term()}]} |
    {create, Something :: string_format()} |
    {set, {Key :: string_format(), Value :: term()}} |
    {set, [{Key :: string_format(), Value :: term()}]} |
    {var, {Key :: string_format(), Value :: term()}} |
    {sleep, Millis :: integer()} |
    {delete, Something :: string_format()} |
    {update, Something :: string_format()} |
    {use, {namespace, Namespace :: string_format()}} |
    {use, {database, Database :: string_format()}} |
    {use, {Namespace :: string_format(), Database :: string_format()}}.
-type string_format() :: binary() | atom() | bitstring().

Link to this section Functions

-spec make_all(Queries :: [[query()]]) -> string().
-spec make_one(Query :: [query()]) -> string().