error() = {error, [{ExceptionClass::binary(), ExceptionMessage::binary()}]}
Result type for an error
fetched_record() = {Key::true | rid(), document, Version::integer(), Class::string(), Data::#{}} | {Key::true | rid(), raw, Version::integer(), Class::raw, Data::binary()}
The result of a record fetch
mode() = sync | async | no_response
record() = {Class::string(), Data::#{string() => any()}}
record_type() = raw | flat | document
rid() = {ClusterId::integer(), ClusterPosition::integer()}
A record ID
tx_operation() = {update, Rid::rid(), RecordType::record_type(), Version::integer(), UpdateContent::boolean(), Record::record()} | {delete, Rid::rid(), RecordType::record_type(), Version::integer()} | {create, Rid::rid(), RecordType::record_type(), Record::record()}
A transaction operation
close/1 | Close the connection. |
command/2 | Syncronous SQL command. |
command/4 | Syncronous SQL command with parameters. |
connect/4 | Connect to a server. |
datacluster_add/3 | Add a new data cluster. |
datacluster_remove/2 | Remove a cluster. |
db_close/1 | Closes the database and the network connection to the OrientDB Server instance. |
db_countrecords/1 | Asks for the number of records in a database in the OrientDB Server instance. |
db_create/5 | Creates a database in the remote OrientDB server instance. |
db_delete/3 | Removes a database from the OrientDB Server instance. |
db_exist/3 | Asks if a database exists in the OrientDB Server instance. |
db_open/5 | Open a database. |
db_reload/1 | Reloads database information. |
db_size/1 | Returns size of the opened database. |
live_query/3 | Live SELECT query. |
live_query/4 | Live SELECT query with parameters. |
query/4 | SQL query (SELECT or TRAVERSE). |
query/5 | SQL query with parameters (SELECT or TRAVERSE). |
record_create/5 | Create a new record. |
record_delete/4 | Delete a record by its RecordID. |
record_load/4 | Load a record by RecordID, according to a fetch plan. |
record_update/6 | Update a record. |
record_update/7 | Update a record. |
script/3 | Syncronous script. |
script/5 | Syncronous script with parameters. |
tx_commit/4 | Commits a transaction. |
close(C::pid()) -> ok
Close the connection.
command(C::pid(), SQL::string()) -> [fetched_record()] | error()
Syncronous SQL command.
command(C::pid(), SQL::string(), SimpleParams::#{string() => any()} | null, ComplexParams::#{string() => {embedded_list, []}} | null) -> [fetched_record()] | error()
Syncronous SQL command with parameters.
connect(Host::string(), Username::string(), Password::string(), Opts::[{timeout, Timeout::integer()} | {port, Port::integer()}]) -> {ok, Con::pid()} | error()
Connect to a server.
This is the first operation requested by the client when it needs to work with the server instance without openning a database.datacluster_add(C::pid(), Name::string(), ClusterId::integer()) -> integer() | error()
Add a new data cluster.
datacluster_remove(C::pid(), ClusterId::integer()) -> boolean() | error()
Remove a cluster.
db_close(C::pid()) -> {stop, closed}
Closes the database and the network connection to the OrientDB Server instance.
db_countrecords(C::pid()) -> integer() | error()
Asks for the number of records in a database in the OrientDB Server instance.
db_create(C::pid(), DatabaseName::string(), DatabaseType::string(), StorageType::string(), BackupPath::string()) -> ok | error()
Creates a database in the remote OrientDB server instance.
Works in connect-mode.db_delete(C::pid(), DatabaseName::string(), StorageType::string()) -> ok | error()
Removes a database from the OrientDB Server instance.
Works in connect-mode.db_exist(C::pid(), DatabaseName::string(), StorageType::string()) -> boolean() | error()
Asks if a database exists in the OrientDB Server instance.
It returns true (non-zero) or false (zero). Works in connect-mode.db_open(Host::string(), Dbname::string(), Username::string(), Password::string(), Opts::[{timeout, Timeout::integer()} | {port, Port::integer()}]) -> {Clusters::[{ClusterName::string(), ClusterId::integer()}], Con::pid()} | error()
Open a database
This is the first operation the client should call. It opens a database on the remote OrientDB Server.db_reload(C::pid()) -> [{ClusterName::string(), ClusterId::integer()}] | error()
Reloads database information.
db_size(C::pid()) -> integer() | error()
Returns size of the opened database.
live_query(C::pid(), SQL::string(), CallBack::fun((live | live_unsubscription, {loaded | updated | deleted | created, fetched_record()} | {}) -> any())) -> {ok, Token::integer()} | error()
Live SELECT query.
live_query(C::pid(), SQL::string(), Params::#{string() => any()} | null, CallBack::fun((live, {loaded | updated | deleted | created, fetched_record()}) -> any())) -> {ok, Token::integer()} | error()
Live SELECT query with parameters.
query(C::pid(), SQL::string(), Limit::integer(), FetchPlan::string() | default) -> {Results::[fetched_record()], Cached::[fetched_record()]} | error()
SQL query (SELECT or TRAVERSE).
query(C::pid(), SQL::string(), Limit::integer(), FetchPlan::string() | default, Params::#{string() => any()} | null) -> {Results::[fetched_record()], Cached::[fetched_record()]} | error()
SQL query with parameters (SELECT or TRAVERSE).
record_create(C::pid(), ClusterId::integer(), RecordContent::binary(), RecordType::record_type(), Mode::mode()) -> {ClusterId::integer(), ClusterPosition::integer(), RecordVersion::integer(), [{Uuid::integer(), UpdatedFileId::integer(), UpdatePageIndex::integer(), UpdatedPageOffset::integer()}]} | error()
Create a new record.
Returns the position in the cluster of the new record.Delete a record by its RecordID.
record_load(C::pid(), X2::{ClusterId::integer(), RecordPosition::integer()}, FetchPlan::string() | default, IgnoreCache::boolean()) -> [fetched_record()] | error()
Load a record by RecordID, according to a fetch plan.
record_update(C::pid(), RID::rid(), UpdateContent::boolean(), Record::record(), OldRecordVersion::integer(), Mode::mode()) -> {RecordVersion::integer(), [{Uuid::integer(), UpdatedFileId::integer(), UpdatePageIndex::integer(), UpdatedPageOffset::integer()}]} | error()
Update a record. Returns the new record's version.
record_update(C::pid(), RID::rid(), UpdateContent::boolean(), Record::binary(), OldRecordVersion::integer(), RecordType::record_type(), Mode::mode()) -> {OldRecordVersion::integer(), [{Uuid::integer(), UpdatedFileId::integer(), UpdatePageIndex::integer(), UpdatedPageOffset::integer()}]} | error()
Update a record. Returns the new record's version.
script(C::pid(), Language::string(), Code::string()) -> {[fetched_record()], [fetched_record()]} | error()
Syncronous script.
script(C::pid(), Language::string(), Code::string(), SimpleParams::#{string() => any()} | null, ComplexParams::#{string() => {embedded_list, []}} | null) -> {[fetched_record()], [fetched_record()]} | error()
Syncronous script with parameters.
tx_commit(C::pid(), TxId::integer(), UsingLog::boolean(), Operations::[tx_operation()]) -> {CreatedRecords::[{ClientSpecifiedRid::rid(), ActualRid::rid()}], UpdatedRecords::[{UpdatedRid::rid(), NewRecordVersion::integer()}], CollectionChanges::[{Uuid::number(), UpdatedFileId::number(), UpdatedPageIndex::number(), UpdatedPageOffset::number()}]} | error()
Commits a transaction.
This operation flushes all the given changes to the server side in a single transaction.Generated by EDoc