new GraphDB(driver)
Parameters:
Name | Type | Description |
---|---|---|
driver |
olympe.dc.DBView |
- Deprecated:
-
- this class has been replaced by the database driver
olympe.dc.DBView
.
- this class has been replaced by the database driver
Methods
-
getCurrentDefaultProperties(tag [, ownOnly])
-
Gets all current instance default properties values.
Parameters:
Name Type Argument Default Description tag
string Instance tag
ownOnly
boolean <optional>
false If true, returns only own properties (ie. not inherited)
- Deprecated:
-
- use
olympe.dc.DBView#getDefaultProperties
instead
- use
Returns:
A map of all the default properties values indexed by properties names
- Type
- Object
-
getCurrentDefaultProperty(tag, name [, ownOnly])
-
Get an instance default property current value.
Parameters:
Name Type Argument Default Description tag
string Instance tag
name
string Property name
ownOnly
boolean <optional>
false If true, returns only own property (ie. not inherited)
- Deprecated:
-
- use
olympe.dc.DBView#getDefaultProperty
instead
- use
Returns:
- Type
- * | undefined
-
getCurrentExtend(tag)
-
Gets the current instance parent model, that is the parent at the time of the method call
Parameters:
Name Type Description tag
string Instance tag
- Deprecated:
-
- use
olympe.dc.DBView#extension
instead
- use
Returns:
Current parent model tag if any, undefined otherwise
- Type
- string | undefined
-
getCurrentIncomingRelated(tag)
-
Gets currently incoming relations, that is left-related relations types at the time of the method call
Parameters:
Name Type Description tag
string Instance tag
- Deprecated:
-
- use
olympe.dc.DBView#getIncomingRelations
instead
- use
Returns:
An array of incoming relation tags
- Type
- Array.<string>
-
getCurrentModel(tag)
-
Gets the current instance model, that is the model at the time of the method call
Parameters:
Name Type Description tag
string Instance tag
- Deprecated:
-
- use
olympe.dc.DBView#model
instead
- use
Returns:
Current model tag for the specified instance if any, undefined otherwise
- Type
- string | undefined
-
getCurrentOutgoingRelated(tag)
-
Gets currently outgoing relations, that is right-related relations types at the time of the method call
Parameters:
Name Type Description tag
string Instance tag
- Deprecated:
-
- use
olympe.dc.DBView#getOutgoingRelations
instead
- use
Returns:
An array of incoming relation tags
- Type
- Array.<string>
-
getCurrentProperties(tag [, ownOnly])
-
Gets all current instance properties values, that is values at the time of the method call
Parameters:
Name Type Argument Default Description tag
string Instance tag
ownOnly
boolean <optional>
false If true, returns only own properties (ie. not inherited and defaults)
- Deprecated:
-
- use
olympe.dc.DBView#getProperties
instead
- use
Returns:
A map of all properties values indexed by properties names
- Type
- Object
-
getCurrentProperty(tag, name)
-
Gets an instance property current value, that is the value at the moment of the method call
Parameters:
Name Type Description tag
string Instance tag
name
string Property name
- Deprecated:
-
- use
olympe.dc.DBView#getProperty
instead
- use
Returns:
Current property value or undefined if not found
- Type
- * | undefined
-
getCurrentRelated(tag, type, direction)
-
Gets currently related instances, that is related instances at the time of the method call
Parameters:
Name Type Description tag
string Instance tag
type
string Relation type tag
direction
olympe.dc.RelationDirection Relation direction
- Deprecated:
-
- use
olympe.dc.DBView#getRelated
instead
- use
Returns:
A map of related instances tags to related instances tag
- Type
- Object.<string>
-
getCurrentRelatedCount(tag, type, direction)
-
Gets the amount of related instances at the time of the method call
Parameters:
Name Type Description tag
string Instance tag
type
string Relation type tag
direction
olympe.dc.RelationDirection Relation direction
Returns:
- Type
- number
-
getCurrentSource(tag)
-
Gets the current instance source, that is the source master of the instance at the time of the method call
Parameters:
Name Type Description tag
string Instance tag
- Deprecated:
-
- use
olympe.dc.DBView#source
instead
- use
Returns:
Current source id for the specified instance
- Type
- string | undefined
-
getCurrentVersion(tag)
-
Gets the current instance version, that is the version at the moment of the method call
Parameters:
Name Type Description tag
string Instance tag
- Deprecated:
-
- use
olympe.dc.DBView#version
instead
- use
Returns:
Current instance version
- Type
- number | undefined
-
getUniqueCurrentRelated(tag, type, direction)
-
Gets the unique instance that is related at the time of the method call. This function differs from getCurrentRelated in the following way:
- it returns a tag directly, and not a map of tags
- it returns undefined if no related instance is found
- it throws an error if more than one relation is found
Parameters:
Name Type Description tag
string Instance tag
type
string Relation type tag
direction
olympe.dc.RelationDirection Relation direction
- Deprecated:
-
- use
olympe.dc.DBView#getUniqueRelated
instead
- use
Returns:
The related instance tag
- Type
- string | undefined
-
instanceCurrentlyExists(tag)
-
Checks whether an existing instance exists in the DB under the given tag at the time the call is made
Parameters:
Name Type Description tag
string - Deprecated:
-
- use
olympe.dc.DBView#exist
instead
- use
Returns:
- Type
- boolean
-
offAnyProperty(tag, id)
-
Unregisters an anyProperty callback from the specified instance
Parameters:
Name Type Description tag
string id
string - Deprecated:
-
- use
olympe.dc.DBView#offAnyProperty
instead
- use
-
offAnyRelation(tag, id [, noEvent])
-
Unregisters a callback on all relations of an instance. For each existing relation at the time of hte method call and unless otherwise specified, a REMOVED event will be immediately fired upon unregistration.
Parameters:
Name Type Argument Default Description tag
string Instance tag
id
string Callback identifier
noEvent
boolean <optional>
false If true, no REMOVED event will be fired upon unregistration
- Deprecated:
-
- use
olympe.dc.DBView#onAnyRelation
instead
- use
-
offInstance(tag, id [, noEvent])
-
Unregisters a callback on an instance. Unless otherwise specified, calling this method will immediately trigger a REMOVED event.
Parameters:
Name Type Argument Default Description tag
string Instance tag
id
string Callback identifier
noEvent
boolean <optional>
false If true, no REMOVED event will be fired upon unregistration
- Deprecated:
-
- use
olympe.dc.DBView#offInstance
instead
- use
-
offProperty(tag, name, id)
-
Unregisters a property update callback from an instance.
Parameters:
Name Type Description tag
string Instance tag.
name
string Property name.
id
string Callback identifier.
- Deprecated:
-
- use
olympe.dc.DBView#offProperty
instead
- use
-
offRelation(tag, type, direction, id [, noEvent])
-
Unregisters a callback on an instance relation. For each existing relation at the time of the method call and unless otherwise specified, a REMOVED event will be immediately fired upon unregistration.
Parameters:
Name Type Argument Default Description tag
string Instance tag
type
string Relation type tag
direction
olympe.dc.RelationDirection Relation direction
id
string Callback identifier
noEvent
boolean <optional>
false If true, no REMOVED event will be fired upon unregistration
- Deprecated:
-
- use
olympe.dc.DBView#offRelation
instead
- use
-
onAnyProperty(tag, callback [, id])
-
Registers a callback to be invoked any time a property of the specified instance gets a value.
Parameters:
Name Type Argument Description tag
string callback
olympe.dc.DBView.AnyPropertyCallback id
string <optional>
- Deprecated:
-
- use
olympe.dc.DBView#onAnyProperty
instead
- use
Returns:
- Type
- string
-
onAnyRelation(tag, callback [, id])
-
Register a callback on an instance which is called every time the instance get a new relation. For each existing relation at the time of the method call, an ADDED event will be immediately fired. If two callbacks are registered with the same identifier, the last registered one will simply overwrite the first one.
Parameters:
Name Type Argument Description tag
string Instance tag
callback
olympe.dc.DBView.RelationCallback Function to run when any relation is created or removed on the specified instance
id
string <optional>
Callback identifier
- Deprecated:
-
- use
olympe.dc.DBView#onAnyRelation
instead
- use
Returns:
Registered callback identifier
- Type
- string
-
onInstance(tag, callback [, id])
-
Register a callback on an instance. If the instance already exists at the time of the method call, an ADDED event will be immediately fired
Parameters:
Name Type Argument Description tag
string Instance tag
callback
olympe.dc.DBView.InstanceCallback Callback function
id
string <optional>
Callback identifier
- Deprecated:
-
- use
olympe.dc.DBView#onInstance
instead
- use
Returns:
Registered callback identifier
- Type
- string
-
onProperty(tag, name, callback [, id])
-
Registers a callback to be invoked when the specified property of the specified instance is updated.
Parameters:
Name Type Argument Description tag
string Instance tag.
name
string Property name.
callback
olympe.dc.DBView.PropertyCallback Callback function.
id
string <optional>
Callback identifier.
- Deprecated:
-
- use
olympe.dc.DBView#onProperty
instead
- use
Returns:
Registered callback identifier.
- Type
- string
-
onRelation(tag, type, direction, callback [, id])
-
Register a callback on an instance relation. For each existing relation at the time of the method call, an ADDED event will be immediately fired. Also, if two callbacks are registered with the same identifier, the last registered one will simply overwrite the first one.
Parameters:
Name Type Argument Description tag
string Instance tag
type
string Relation type tag
direction
olympe.dc.RelationDirection Relation direction
callback
olympe.dc.DBView.InstanceCallback Callback function
id
string <optional>
Callback identifier
- Deprecated:
-
- use
olympe.dc.DBView#onRelation
instead
- use
Returns:
Registered callback identifier
- Type
- string