Class: AxideClient

AxideClient(host, portopt)

AxideClient class. Is used to connect to and access axideDB instances.

Constructor

new AxideClient(host, portopt)

Create an Axide client
Parameters:
Name Type Attributes Default Description
host String
port number <optional>
5135
Source:

Methods

(async) createFormula(name) → {Promise}

Create a new formula
Parameters:
Name Type Description
name String Name of the created formula
Source:
Returns:
Resolves with boolean 'did already exist' property or rejects with error.
Type
Promise

(async) createHash(formula, name, valueopt) → {Promise}

Create a new hash
Parameters:
Name Type Attributes Description
formula String Formula in which the hash will be created
name String Name of the created hash
value Object <optional>
Hash values
Source:
Returns:
Resolves with no properties or rejects with error.
Type
Promise

(async) deleteFormula(name) → {Promise}

Delete a formula
Parameters:
Name Type Description
name String Name of the formula to delete
Source:
Returns:
Resolves with no properties or rejects with error.
Type
Promise

(async) deleteHash(formula, name) → {Promise}

Delete a hash
Parameters:
Name Type Description
formula String Formula in which the hash will be created
name String Name of the hash to delete
Source:
Returns:
Resolves with no properties or rejects with error.
Type
Promise

(async) exists(formulaopt, name, type) → {Promise}

Test if an entity exists
Parameters:
Name Type Attributes Description
formula String <optional>
If type is 'hash', specifies in which formula to look for the hash.
name String Name of the entity
type String Type of the entity ('formula', 'hash')
Source:
Returns:
Resolves with boolean representing existance of entity or rejects with error.
Type
Promise

(async) getFormula(name) → {Promise}

Get the names of entities within a formula
Parameters:
Name Type Description
name String Name of formula
Source:
Returns:
Resolves with list of entity names or rejects with error.
Type
Promise

(async) getFormulas() → {Promise}

Get the names of all formulas in database
Source:
Returns:
Resolves with list of formula names or rejects with error.
Type
Promise

(async) getHash(formula, name) → {Promise}

Get the full object of a hash (resource intensive)
Parameters:
Name Type Description
formula String
name String Name of the hash to retrieve
Source:
Returns:
Resolves with full hash object or rejects with error.
Type
Promise

(async) getHashProperty(formula, hash, name) → {Promise}

Get the value of a hash property
Parameters:
Name Type Description
formula String
hash String
name String Name of the hash property whose value should be retrieved
Source:
Returns:
Resolves with hash property value or rejects with error.
Type
Promise

(async) setHashProperty(formula, hash, name, value) → {Promise}

Set the value of a hash property
Parameters:
Name Type Description
formula String
hash String
name String Name of the hash property whose value will be set
value String New value of the hash property. (If object, will usually be stringified by DB.)
Source:
Returns:
Resolves with hash property value or rejects with error.
Type
Promise