View Source surreal (surreal v1.1.0)
Link to this section Summary
Functions
Authenticates the current connection with a JWT token.
change(Connection, TableOrId, Data)
deprecated
Change all records in a table, or a specific record.
Close connection.
Creates a record in the database.
Deletes all records in a table, or a specific record, from the database.
Invalidates the authentication for the current connection.
Change all records in a table, or a specific record.
modify(Connection, TableOrId, Data)
deprecated
Applies JSON Patch changes to all records in a table, or a specific record.
Applies JSON Patch changes to all records in a table, or a specific record.
Runs a set of SurrealQL statements against the database.
Runs a set of SurrealQL statements against the database with parameters.
Selects all records in a table, or a specific record, from the database.
Assigns a value as a parameter for this connection.
Signs in to a specific authentication scope.
Signs in to a specific authentication scope with more advanced inputs.
Signs up to a specific authentication scope.
Same with "start_link" but without linking process.
Connects to a local or remote database endpoint.
Removes a parameter for this connection
Updates all records in a table, or a specific record.
Switch to a specific namespace and database.
Link to this section Functions
-spec authenticate(Connection :: gen_server:server_ref(), Token :: string()) -> surreal_response:result().
This function is deprecated. Please use surreal:merge/3 instead..
-spec change(Connection :: gen_server:server_ref(), TableOrId :: string(), Data :: map()) -> surreal_response:result().
-spec close(Connection :: gen_server:server_ref()) -> shutdown_ok.
-spec create(Connection :: gen_server:server_ref(), TableOrId :: string(), Data :: map()) -> surreal_response:result().
-spec delete(Connection :: gen_server:server_ref(), TableOrId :: string()) -> surreal_response:result().
-spec invalidate(Connection :: gen_server:server_ref()) -> surreal_response:result().
-spec merge(Connection :: gen_server:server_ref(), TableOrId :: string(), Data :: map()) -> surreal_response:result().
This function is deprecated. Please use surreal:patch/3 instead..
-spec modify(Connection :: gen_server:server_ref(), TableOrId :: string(), Data :: map()) -> surreal_response:result().
-spec patch(Connection :: gen_server:server_ref(), TableOrId :: string(), Data :: map()) -> surreal_response:result().
-spec query(Connection :: gen_server:server_ref(), Query :: string()) -> surreal_response:result().
-spec query(Connection :: gen_server:server_ref(), Query :: string(), Params :: map()) -> surreal_response:result().
-spec select(Connection :: gen_server:server_ref(), TableOrId :: string()) -> surreal_response:result().
-spec set(Connection :: gen_server:server_ref(), Name :: string(), Value :: term()) -> surreal_response:result().
-spec signin(Connection :: gen_server:server_ref(), Username :: string(), Password :: string()) -> surreal_response:result().
Link to this function
signin(Connection, Namespace, Database, Scope, Username, Password)
View Source-spec signin(Connection :: gen_server:server_ref(), Namespace :: string(), Database :: string(), Scope :: string(), Username :: string(), Password :: string()) -> surreal_response:result().
Link to this function
signup(Connection, Namespace, Database, Scope, Username, Password)
View Source-spec signup(Connection :: gen_server:server_ref(), Namespace :: string(), Database :: string(), Scope :: string(), Username :: string(), Password :: string()) -> surreal_response:result().
-spec start(Url :: string()) -> {ok, pid()} | {error, term()}.
-spec start_link(Url :: string()) -> {ok, pid()} | {error, term()}.
-spec unset(Connection :: gen_server:server_ref(), Name :: string()) -> surreal_response:result().
-spec update(Connection :: gen_server:server_ref(), TableOrId :: string(), Data :: map()) -> surreal_response:result().
-spec use(Connection :: gen_server:server_ref(), Namespace :: string(), Database :: string()) -> surreal_response:result().