View Source surreal (surreal v1.0.0)
Link to this section Summary
Functions
Authenticates the current connection with a JWT token.
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.
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.
Signs in to a specific authentication scope.
Signs up to a specific authentication scope.
Same with "start_link" but without linking process.
Connects to a local or remote database endpoint.
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 :: pid(), Token :: string()) -> surreal_response:result().
-spec change(Connection :: pid(), TableOrId :: string(), Data :: map()) -> surreal_response:result().
-spec close(Connection :: pid()) -> shutdown_ok.
-spec create(Connection :: pid(), TableOrId :: string(), Data :: map()) -> surreal_response:result().
-spec delete(Connection :: pid(), TableOrId :: string()) -> surreal_response:result().
-spec invalidate(Connection :: pid()) -> surreal_response:result().
-spec modify(Connection :: pid(), TableOrId :: string(), Data :: map()) -> surreal_response:result().
-spec query(Connection :: pid(), Query :: string()) -> surreal_response:result().
-spec query(Connection :: pid(), Query :: string(), Params :: map()) -> surreal_response:result().
-spec select(Connection :: pid(), TableOrId :: string()) -> surreal_response:result().
-spec signin(Connection :: pid(), User :: string(), Pass :: string()) -> surreal_response:result().
-spec signup(Connection :: pid(), Namespace :: string(), Database :: string(), Scope :: string(), Email :: string(), Password :: string()) -> surreal_response:result().
-spec start(Url :: string()) -> {ok, pid()} | {error, term()}.
-spec start_link(Url :: string()) -> {ok, pid()} | {error, term()}.
-spec update(Connection :: pid(), TableOrId :: string(), Data :: map()) -> surreal_response:result().
-spec use(Connection :: pid(), Namespace :: string(), Database :: string()) -> surreal_response:result().