Sparksee
6.0.2
|
Graph class. More...
Instance Methods | |
(int) | - createNodeType: |
Creates a new node type. More... | |
(long long) | - createNode: |
Creates a new node instance. More... | |
(int) | - createEdgeType:directed:neighbors: |
Creates a new edge type. More... | |
(int) | - createRestrictedEdgeType:tail:head:neighbors: |
Creates a new restricted edge type. More... | |
(void) | - indexNeighbors:neighbors: |
Creates or destroys the neighbors index of an edge type. More... | |
(long long) | - createEdge:tail:head: |
Creates a new edge instance. More... | |
(long long) | - createEdgeWithAttributes:tailAttr:tailV:headAttr:headV: |
Creates a new edge instance. More... | |
(long long) | - countNodes |
Gets the number of nodes. More... | |
(long long) | - countEdges |
Gets the number of edges. More... | |
(STSEdgeData *) | - getEdgeData: |
Gets information about an edge. More... | |
(long long) | - getEdgePeer:node: |
Gets the other end for the given edge. More... | |
(void) | - drop: |
Drops the given OID. More... | |
(void) | - dropWithObjects: |
Drops all the OIDs from the given collection. More... | |
(int) | - getObjectType: |
Gets the Sparksee node or edge type identifier for the given OID. More... | |
(int) | - createAttribute:name:dt:kind: |
Creates a new attribute. More... | |
(int) | - createAttributeWithDefault:name:dt:kind:defaultValue: |
Creates a new attribute with a default value. More... | |
(int) | - createSessionAttribute:dt:kind: |
Creates a new Session attribute. More... | |
(int) | - createSessionAttributeWithDefault:dt:kind:defaultValue: |
Creates a new Session attribute with a default value. More... | |
(int) | - createArrayAttribute:name:dt:size: |
Creates a new array attribute. More... | |
(int) | - createSessionArrayAttribute:dt:size: |
Creates a new Session array attribute. More... | |
(void) | - setAttributeDefaultValue:value: |
Sets a default value for an attribute. More... | |
(void) | - indexAttribute:kind: |
Updates the index of the given attribute. More... | |
(void) | - getAttributeInValue:attr:value: |
Gets the Value for the given attribute and OID. More... | |
(STSValue *) | - getAttributeWithOid:attr: |
Gets the Value for the given attribute and OID. More... | |
(STSTextStream *) | - getAttributeText:attr: |
Gets the read-only TextStream for the given text attribute and OID. More... | |
(void) | - setAttributeText:attr:tstream: |
Sets the writable TextStream for the given text attribute and OID. More... | |
(STSValueArray *) | - getArrayAttribute:attr: |
Gets the ValueArray for the given array attribute and OID or NULL if it does not exist. More... | |
(STSValueArray *) | - setArrayAttribute:attr:value: |
Sets all the elements of the ValueArray for the given array attribute and OID and returns it. More... | |
(void) | - setArrayAttributeVoid:attr:value: |
Sets all the elements of the ValueArray for the given array attribute and OID. More... | |
(void) | - setAttribute:attr:value: |
Sets the Value for the given attribute and OID. More... | |
(STSAttributeStatistics *) | - getAttributeStatistics:basic: |
Gets statistics from the given attribute. More... | |
(long long) | - getAttributeIntervalCount:lower:includeLower:higher:includeHigher: |
Gets how many objects have a value into the given range for the given attribute. More... | |
(int) | - findType: |
Gets the Sparksee type identifier for the given type name. More... | |
(STSType *) | - getType: |
Gets information about the given type. More... | |
(void) | - removeType: |
Removes the given type. More... | |
(void) | - renameTypeWithName:newName: |
Renames a type. More... | |
(void) | - renameType:newName: |
Renames a type. More... | |
(int) | - findAttribute:name: |
Gets the Sparksee attribute identifier for the given type identifier and attribute name. More... | |
(STSAttribute *) | - getAttribute: |
Gets information about the given attribute. More... | |
(void) | - removeAttribute: |
Removes the given attribute. More... | |
(void) | - renameAttribute:newName: |
Renames an attribute. More... | |
(long long) | - findObject:value: |
Finds one object having the given Value for the given attribute. More... | |
(long long) | - findOrCreateObject:value: |
Finds one object having the given Value for the attribute or it creates one does not exist any. More... | |
(STSObjects *) | - selectWithType: |
Selects all OIDs belonging to the given type. More... | |
(STSObjects *) | - selectWithAttrValue:cond:value: |
Selects all OIDs satisfying the given condition for the given attribute. More... | |
(STSObjects *) | - selectWithAttrValues:cond:lower:higher: |
Selects all OIDs satisfying the given condition for the given attribute. More... | |
(STSObjects *) | - selectWithAttrValueRestriction:cond:value:restriction: |
Selects all OIDs satisfying the given condition for the given attribute. More... | |
(STSObjects *) | - selectWithAttrValuesRestriction:cond:lower:higher:restriction: |
Selects all OIDs satisfying the given condition for the given attribute. More... | |
(STSKeyValues *) | - topkWithAttr:order:k: |
Gets a KeyValues iterator as a result of the TopK operation. More... | |
(STSKeyValues *) | - topkWithAttrValue:operation:lower:order:k: |
Gets a KeyValues iterator as a result of the TopK operation. More... | |
(STSKeyValues *) | - topkWithAttrValues:operation:lower:higher:order:k: |
Gets a KeyValues iterator as a result of the TopK operation. More... | |
(STSKeyValues *) | - topK:order:k:restriction: |
Gets a KeyValues iterator as a result of the TopK operation. More... | |
(STSObjects *) | - explode:etype:dir: |
Selects all edges from or to the given node OID and for the given edge type. More... | |
(STSObjects *) | - explodeWithObjects:etype:dir: |
Selects all edges from or to each of the node OID in the given collection and for the given edge type. More... | |
(long long) | - degree:etype:dir: |
Gets the number of edges from or to the given node OID and for the given edge type. More... | |
(STSObjects *) | - neighbors:etype:dir: |
Selects all neighbor nodes from or to the given node OID and for the given edge type. More... | |
(STSObjects *) | - neighborsWithObjects:etype:dir: |
Selects all neighbor nodes from or to each of the node OID in the given collection and for the given edge type. More... | |
(STSObjects *) | - edges:tail:head: |
Gets all the edges of the given type between two given nodes (tail and head). More... | |
(long long) | - findEdge:tail:head: |
Gets any of the edges of the given type between two given nodes (tail and head). More... | |
(long long) | - findOrCreateEdge:tail:head: |
Gets any of the edges of the specified type between two given nodes (tail and head). More... | |
(STSObjects *) | - tails: |
Gets all the tails from the given edges collection. More... | |
(STSObjects *) | - heads: |
Gets all the heads from the given edges collection. More... | |
(void) | - tailsAndHeads:tails:heads: |
Gets all the tails and heads from the given edges collection. More... | |
(STSTypeList *) | - findNodeTypes |
Gets all existing Sparksee node type identifiers. More... | |
(STSTypeList *) | - findEdgeTypes |
Gets all existing Sparksee edge type identifiers. More... | |
(STSTypeList *) | - findTypes |
Gets all existing Sparksee node and edge type identifiers. More... | |
(STSAttributeList *) | - findAttributes: |
Gets all existing Sparksee attribute identifiers for the given type identifier. More... | |
(STSAttributeList *) | - getAttributes: |
Gets all Sparksee attribute identifiers with a non-NULL value for the given Sparksee OID. More... | |
(STSValues *) | - getValues: |
Gets the Value collection for the given attribute. More... | |
(void) | - dumpData: |
Dumps logical data to a file. More... | |
(void) | - dumpStorage: |
Dumps internal storage data to a file. More... | |
(void) | - exportGraph:type:em: |
Exports the Graph. More... | |
(void) | - backup: |
Dumps all the data to a backup file. More... | |
(void) | - encryptedBackup:keyInHex:ivInHex: |
Dumps all the data to a backup file. More... | |
Graph class.
Each Database has a Graph associated, which is the persistent graph which contains all data stored into the graph database and is retrieved from a Session.
Check out the 'API' and the 'SPARKSEE graph database' sections in the SPARKSEE User Manual for more details on the use of this class.
- (void) backup: | (NSString *) | file |
Dumps all the data to a backup file.
See the Sparksee class Restore methods.
file | [in] Output backup file path. |
System.ApplicationException | null |
System.IO.IOException | If the given file cannot be created. |
- (long long) countEdges |
Gets the number of edges.
- (long long) countNodes |
Gets the number of nodes.
- (int) createArrayAttribute: | (int) | type | |
name: | (NSString *) | name | |
dt: | (enum STSDataType) | dt | |
size: | (int) | size | |
Creates a new array attribute.
type | [in] Sparksee node or edge type identifier. |
name | [in] Unique name for the new attribute. |
dt | [in] Base Data type for the new array attribute elements. |
size | [in] The array size. |
- (int) createAttribute: | (int) | type | |
name: | (NSString *) | name | |
dt: | (enum STSDataType) | dt | |
kind: | (enum STSAttributeKind) | kind | |
Creates a new attribute.
type | [in] Sparksee node or edge type identifier. |
name | [in] Unique name for the new attribute. |
dt | [in] Data type for the new attribute. |
kind | [in] Attribute kind. |
- (int) createAttributeWithDefault: | (int) | type | |
name: | (NSString *) | name | |
dt: | (enum STSDataType) | dt | |
kind: | (enum STSAttributeKind) | kind | |
defaultValue: | (STSValue *) | defaultValue | |
Creates a new attribute with a default value.
type | [in] Sparksee node or edge type identifier. |
name | [in] Unique name for the new attribute. |
dt | [in] Data type for the new attribute. |
kind | [in] Attribute kind. |
defaultValue | [in] The default value to use in each new node/edge. |
- (long long) createEdge: | (int) | type | |
tail: | (long long) | tail | |
head: | (long long) | head | |
Creates a new edge instance.
type | [in] Sparksee type identifier. |
tail | [in] Source Sparksee OID. |
head | [in] Target Sparksee OID. |
- (int) createEdgeType: | (NSString *) | name | |
directed: | (BOOL) | directed | |
neighbors: | (BOOL) | neighbors | |
Creates a new edge type.
name | [in] Unique name for the new edge type. |
directed | [in] If TRUE, this creates a directed edge type, otherwise this creates a undirected edge type. |
neighbors | [in] If TRUE, this indexes neighbor nodes, otherwise not. |
- (long long) createEdgeWithAttributes: | (int) | type | |
tailAttr: | (int) | tailAttr | |
tailV: | (STSValue *) | tailV | |
headAttr: | (int) | headAttr | |
headV: | (STSValue *) | headV | |
Creates a new edge instance.
The tail of the edge will be any node having the given tailV Value for the given tailAttr attribute identifier, and the head of the edge will be any node having the given headV Value for the given headAttr attribute identifier.
type | [in] Sparksee type identifier. |
tailAttr | [in] Sparksee attribute identifier. |
tailV | [in] Value. |
headAttr | [in] Sparksee attribute identifier. |
headV | [in] Value. |
- (long long) createNode: | (int) | type |
Creates a new node instance.
type | [in] Sparksee type identifier. |
- (int) createNodeType: | (NSString *) | name |
Creates a new node type.
name | [in] Unique name for the new node type. |
- (int) createRestrictedEdgeType: | (NSString *) | name | |
tail: | (int) | tail | |
head: | (int) | head | |
neighbors: | (BOOL) | neighbors | |
Creates a new restricted edge type.
name | [in] Unique name for the new edge type. |
tail | [in] Tail Sparksee node type identifier. |
head | [in] Head Sparksee node type identifier. |
neighbors | [in] If TRUE, this indexes neighbor nodes, otherwise not. |
- (int) createSessionArrayAttribute: | (int) | type | |
dt: | (enum STSDataType) | dt | |
size: | (int) | size | |
Creates a new Session array attribute.
Session attributes are exclusive for the Session (just its Session can use the attribute) and are automatically removed when the Session is closed (thus, attribute data is not persistent into the database).
Since they are not persistent, they cannot be retrieved from the database, so they do not have an identifier name.
type | [in] Sparksee node or edge type identifier. |
dt | [in] Base Data type for the new array attribute elements. |
size | [in] The array size. |
- (int) createSessionAttribute: | (int) | type | |
dt: | (enum STSDataType) | dt | |
kind: | (enum STSAttributeKind) | kind | |
Creates a new Session attribute.
Session attributes are exclusive for the Session (just its Session can use the attribute) and are automatically removed when the Session is closed (thus, attribute data is not persistent into the database).
Since they are not persistent, they cannot be retrieved from the database, so they do not have an identifier name.
type | [in] Sparksee node or edge type identifier. |
dt | [in] Data type for the new attribute. |
kind | [in] Attribute kind. |
- (int) createSessionAttributeWithDefault: | (int) | type | |
dt: | (enum STSDataType) | dt | |
kind: | (enum STSAttributeKind) | kind | |
defaultValue: | (STSValue *) | defaultValue | |
Creates a new Session attribute with a default value.
Session attributes are exclusive for the Session (just its Session can use the attribute) and are automatically removed when the Session is closed (thus, attribute data is not persistent into the database).
Since they are not persistent, they cannot be retrieved from the database, so they do not have an identifier name.
type | [in] Sparksee node or edge type identifier. |
dt | [in] Data type for the new attribute. |
kind | [in] Attribute kind. |
defaultValue | [in] The default value to use in each new node/edge. |
- (long long) degree: | (long long) | oid | |
etype: | (int) | etype | |
dir: | (enum STSEdgesDirection) | dir | |
Gets the number of edges from or to the given node OID and for the given edge type.
oid | [in] Sparksee node OID. |
etype | [in] Sparksee edge type identifier. |
dir | [in] Direction. |
- (void) drop: | (long long) | oid |
Drops the given OID.
It also removes its egdges as well as its attribute values.
oid | [in] Sparksee OID to be removed. |
- (void) dropWithObjects: | (STSObjects *) | objs |
Drops all the OIDs from the given collection.
See Drop method with the single OID parameter. This performs the same operation for each object in the given set.
objs | [in] Objects collection with the OIDs to be removed. |
- (void) dumpData: | (NSString *) | file |
Dumps logical data to a file.
file | [in] Output file path. |
System.ApplicationException | null |
System.IO.IOException | If the given file cannot be created. |
- (void) dumpStorage: | (NSString *) | file |
Dumps internal storage data to a file.
file | [in] Output file path. |
System.ApplicationException | null |
System.IO.IOException | If the given file cannot be created. |
- (STSObjects*) edges: | (int) | etype | |
tail: | (long long) | tail | |
head: | (long long) | head | |
Gets all the edges of the given type between two given nodes (tail and head).
etype | [in] Sparksee edge type identifier. |
tail | [in] Tail node identifier. |
head | [in] Head node identifier. |
- (void) encryptedBackup: | (NSString *) | file | |
keyInHex: | (NSString *) | keyInHex | |
ivInHex: | (NSString *) | ivInHex | |
Dumps all the data to a backup file.
See the Sparksee class RestoreEncryptedBackup methods.
file | [in] Output backup file path. |
keyInHex | [In] The AES encryption Key as an hexadecimal string (8, 16 or 32 bytes). |
ivInHex | [In] The AES Initialization Vector as an hexadecimal string (16 bytes). |
System.ApplicationException | null |
System.IO.IOException | If the given file cannot be created. |
- (STSObjects*) explode: | (long long) | oid | |
etype: | (int) | etype | |
dir: | (enum STSEdgesDirection) | dir | |
Selects all edges from or to the given node OID and for the given edge type.
oid | [in] Sparksee node OID. |
etype | [in] Sparksee edge type identifier. |
dir | [in] Direction. |
- (STSObjects*) explodeWithObjects: | (STSObjects *) | objs | |
etype: | (int) | etype | |
dir: | (enum STSEdgesDirection) | dir | |
Selects all edges from or to each of the node OID in the given collection and for the given edge type.
objs | [in] Sparksee node OID collection. |
etype | [in] Sparksee edge type identifier. |
dir | [in] Direction. |
- (void) exportGraph: | (NSString *) | file | |
type: | (enum STSExportType) | type | |
em: | (STSExportManager *) | em | |
Exports the Graph.
file | [in] Output file. |
type | [in] Export type. |
em | [in] Defines how to do the export for each graph object. |
System.IO.IOException | null |
- (int) findAttribute: | (int) | type | |
name: | (NSString *) | name | |
Gets the Sparksee attribute identifier for the given type identifier and attribute name.
type | [in] Sparksee type identifier. |
name | [in] Unique attribute name. |
- (STSAttributeList*) findAttributes: | (int) | type |
Gets all existing Sparksee attribute identifiers for the given type identifier.
type | [in] Sparksee type identifier. |
- (long long) findEdge: | (int) | etype | |
tail: | (long long) | tail | |
head: | (long long) | head | |
Gets any of the edges of the given type between two given nodes (tail and head).
If there are more than one, then any of them will be returned. And in case there are no edge between the given tail and head, the Objects InvalidOID will be returned.
etype | [in] Sparksee edge type identifier. |
tail | [in] Tail node identifier. |
head | [in] Head node identifier. |
- (STSTypeList*) findEdgeTypes |
Gets all existing Sparksee edge type identifiers.
- (STSTypeList*) findNodeTypes |
Gets all existing Sparksee node type identifiers.
- (long long) findObject: | (int) | attr | |
value: | (STSValue *) | value | |
Finds one object having the given Value for the given attribute.
If there are more than one, then any of them will be returned. And in case there are no object having this Value, the Objects InvalidOID will be returned.
attr | [in] Sparksee attribute identifier. |
value | [in] Value. |
- (long long) findOrCreateEdge: | (int) | etype | |
tail: | (long long) | tail | |
head: | (long long) | head | |
Gets any of the edges of the specified type between two given nodes (tail and head).
If it can not find any edge of this type between them it tries to create a new one.
etype | [in] Sparksee edge type identifier. |
tail | [in] Tail node identifier. |
head | [in] Head node identifier. |
- (long long) findOrCreateObject: | (int) | attr | |
value: | (STSValue *) | value | |
Finds one object having the given Value for the attribute or it creates one does not exist any.
If the attribute is a node or edge attribute and at least one node/edge with that value is found, it returns one of them. But if it does not exist, then: If it's a node attribute it will create it and set the attribute. If it's an edge attribute it will return the InvalidOID.
Using this method with a global attribute will return the InvalidOID.
attr | [in] Sparksee attribute identifier. |
value | [in] Value. |
- (int) findType: | (NSString *) | name |
Gets the Sparksee type identifier for the given type name.
name | [in] Unique type name. |
- (STSTypeList*) findTypes |
Gets all existing Sparksee node and edge type identifiers.
- (STSValueArray*) getArrayAttribute: | (long long) | oid | |
attr: | (int) | attr | |
Gets the ValueArray for the given array attribute and OID or NULL if it does not exist.
oid | [in] Sparksee OID. |
attr | [in] Sparksee array attribute identifier. |
- (STSAttribute*) getAttribute: | (int) | attr |
Gets information about the given attribute.
attr | [in] Sparksee attribute identifier. |
- (long long) getAttributeIntervalCount: | (int) | attr | |
lower: | (STSValue *) | lower | |
includeLower: | (BOOL) | includeLower | |
higher: | (STSValue *) | higher | |
includeHigher: | (BOOL) | includeHigher | |
Gets how many objects have a value into the given range for the given attribute.
This only works for the attributes with the AttributeKind Indexed or Unique.
Given values must belong to the same DataType than the attribute.
attr | [in] Sparksee attribute identifier. |
lower | [in] Lower bound Value of the range. |
includeLower | [in] If TRUE, include lower bound Value of the range. |
higher | [in] Higher bound Value of the range. |
includeHigher | [in] If TRUE, include higher bound Value of the range. |
- (void) getAttributeInValue: | (long long) | oid | |
attr: | (int) | attr | |
value: | (STSValue *) | value | |
Gets the Value for the given attribute and OID.
oid | [in] Sparksee OID. |
attr | [in] Sparksee attribute identifier. |
value | [in|out] Value for the given attribute and for the given OID. |
- (STSAttributeList*) getAttributes: | (long long) | oid |
Gets all Sparksee attribute identifiers with a non-NULL value for the given Sparksee OID.
oid | [in] Sparksee OID. |
- (STSAttributeStatistics*) getAttributeStatistics: | (int) | attr | |
basic: | (BOOL) | basic | |
Gets statistics from the given attribute.
The statistics can only be obtained from Indexed or Unique attributes.
attr | [in] Sparksee attribute identifier. |
basic | [in] If FALSE all statistics are computed, if TRUE just those statistics marked as basic will be computed (see description of the AttributeStatistics class). Of course, computing just basic statistics will be faster than computing all of them. |
- (STSTextStream*) getAttributeText: | (long long) | oid | |
attr: | (int) | attr | |
Gets the read-only TextStream for the given text attribute and OID.
oid | [in] Sparksee OID. |
attr | [in] Sparksee attribute identifier. |
- (STSValue*) getAttributeWithOid: | (long long) | oid | |
attr: | (int) | attr | |
Gets the Value for the given attribute and OID.
The other version of this call, where the Value is an output parameter instead of the return, is better because it allows the user to reuse an existing Value instance, whereas this call always creates a new Value instance to be returned.
It never returns NULL. Thus, in case the OID has a NULL value for the attribute it returns a NULL Value instance.
oid | [in] Sparksee OID. |
attr | [in] Sparksee attribute identifier. |
- (STSEdgeData*) getEdgeData: | (long long) | edge |
Gets information about an edge.
edge | [in] Sparksee edge identifier. |
- (long long) getEdgePeer: | (long long) | edge | |
node: | (long long) | node | |
Gets the other end for the given edge.
edge | [in] Sparksee edge identifier. |
node | [in] Sparksee node identifier. It must be one of the ends of the edge. |
- (int) getObjectType: | (long long) | oid |
Gets the Sparksee node or edge type identifier for the given OID.
oid | [in] Sparksee OID. |
- (STSType*) getType: | (int) | type |
Gets information about the given type.
type | [in] Sparksee type identifier. |
- (STSValues*) getValues: | (int) | attr |
Gets the Value collection for the given attribute.
attr | [in] Sparksee attribute identifier. |
- (STSObjects*) heads: | (STSObjects *) | edges |
Gets all the heads from the given edges collection.
edges | [in] Sparksee edge identifier collection. |
- (void) indexAttribute: | (int) | attr | |
kind: | (enum STSAttributeKind) | kind | |
Updates the index of the given attribute.
This just works if the current index of the attribute corresponds to the AttributeKind Basic and the new one is Indexed or Unique.
attr | [in] Sparksee attribute identifier. |
kind | [in] Attribute kind. |
- (void) indexNeighbors: | (int) | edgeType | |
neighbors: | (BOOL) | neighbors | |
Creates or destroys the neighbors index of an edge type.
edgeType | [in] Sparksee Edge type identifier. |
neighbors | [in] If TRUE, it indexes the neighbor nodes, otherwise it removes the index. |
- (STSObjects*) neighbors: | (long long) | oid | |
etype: | (int) | etype | |
dir: | (enum STSEdgesDirection) | dir | |
Selects all neighbor nodes from or to the given node OID and for the given edge type.
oid | [in] Sparksee node OID. |
etype | [in] Sparksee edge type identifier. |
dir | [in] Direction. |
- (STSObjects*) neighborsWithObjects: | (STSObjects *) | objs | |
etype: | (int) | etype | |
dir: | (enum STSEdgesDirection) | dir | |
Selects all neighbor nodes from or to each of the node OID in the given collection and for the given edge type.
objs | [in] Sparksee node OID collection. |
etype | [in] Sparksee edge type identifier. |
dir | [in] Direction. |
- (void) removeAttribute: | (int) | attr |
Removes the given attribute.
attr | [in] Sparksee attribute identifier. |
- (void) removeType: | (int) | type |
Removes the given type.
This fails if there exist attributes defined for the type or if there exist restricted edges referencing this type.
type | [in] Sparksee type identifier. |
- (void) renameAttribute: | (int) | attr | |
newName: | (NSString *) | newName | |
Renames an attribute.
The new name must be available.
attr | [in] Sparksee attribute identifier. |
newName | [in] The new name for the attribute. |
- (void) renameType: | (int) | type | |
newName: | (NSString *) | newName | |
Renames a type.
The new name must be available.
type | [in] The type to be renamed. |
newName | [in] The new name for the type. |
- (void) renameTypeWithName: | (NSString *) | oldName | |
newName: | (NSString *) | newName | |
Renames a type.
The new name must be available.
oldName | [in] The current name of the type to be renamed. |
newName | [in] The new name for the type. |
- (STSObjects*) selectWithAttrValue: | (int) | attr | |
cond: | (enum STSCondition) | cond | |
value: | (STSValue *) | value | |
Selects all OIDs satisfying the given condition for the given attribute.
attr | [in] Sparksee attribute identifier. |
cond | [in] Condition to be satisfied. |
value | [in] Value to be satisfied. |
- (STSObjects*) selectWithAttrValueRestriction: | (int) | attr | |
cond: | (enum STSCondition) | cond | |
value: | (STSValue *) | value | |
restriction: | (STSObjects *) | restriction | |
Selects all OIDs satisfying the given condition for the given attribute.
attr | [in] Sparksee attribute identifier. |
cond | [in] Condition to be satisfied. |
value | [in] Value to be satisfied. |
restriction | [in] Objects to limit the select in this set of objects. |
- (STSObjects*) selectWithAttrValues: | (int) | attr | |
cond: | (enum STSCondition) | cond | |
lower: | (STSValue *) | lower | |
higher: | (STSValue *) | higher | |
Selects all OIDs satisfying the given condition for the given attribute.
This allows to perform the Between operation, thus it has two Value arguments.
attr | [in] Sparksee attribute identifier. |
cond | [in] Condition to be satisfied. It must be the Between Condition. |
lower | [in] Lower-bound Value to be satisfied. |
higher | [in] Higher-bound Value to be satisfied. |
- (STSObjects*) selectWithAttrValuesRestriction: | (int) | attr | |
cond: | (enum STSCondition) | cond | |
lower: | (STSValue *) | lower | |
higher: | (STSValue *) | higher | |
restriction: | (STSObjects *) | restriction | |
Selects all OIDs satisfying the given condition for the given attribute.
This allows to perform the Between operation, thus it has two Value arguments.
attr | [in] Sparksee attribute identifier. |
cond | [in] Condition to be satisfied. It must be the Between Condition. |
lower | [in] Lower-bound Value to be satisfied. |
higher | [in] Higher-bound Value to be satisfied. |
restriction | [in] Objects to limit the select in this set of objects. |
- (STSObjects*) selectWithType: | (int) | type |
Selects all OIDs belonging to the given type.
type | [in] Sparksee type identifier. |
- (STSValueArray*) setArrayAttribute: | (long long) | oid | |
attr: | (int) | attr | |
value: | (STSValue *) | value | |
Sets all the elements of the ValueArray for the given array attribute and OID and returns it.
Initializing the array with one of these SetArrayAttribute methods is the only way to create the array. But once created it can be updated using the ValueArray. And you can get it again with the GetArrayAttribute operation.
oid | [in] Sparksee OID. |
attr | [in] Sparksee array attribute identifier. |
value | [in] Value for all the array elements of the given attribute and OID. |
- (void) setArrayAttributeVoid: | (long long) | oid | |
attr: | (int) | attr | |
value: | (STSValue *) | value | |
Sets all the elements of the ValueArray for the given array attribute and OID.
Initializing the array with one of these SetArrayAttribute methods is the only way to create the array. But once created it can be updated using the ValueArray which can be obtained using the GetArrayAttribute operation.
oid | [in] Sparksee OID. |
attr | [in] Sparksee array attribute identifier. |
value | [in] Value for all the array elements of the given attribute and OID. |
- (void) setAttribute: | (long long) | oid | |
attr: | (int) | attr | |
value: | (STSValue *) | value | |
Sets the Value for the given attribute and OID.
oid | [in] Sparksee OID. |
attr | [in] Sparksee attribute identifier. |
value | [in] Value for the given attribute and for the given OID. |
- (void) setAttributeDefaultValue: | (int) | attr | |
value: | (STSValue *) | value | |
Sets a default value for an attribute.
The default value will be applied to all the new nodes or edges.
The given value must have the same DataType as the attribute or be a NULL value to remove the current default value.
attr | [in] The attribute. |
value | [in] The default value to use for this attribute. |
- (void) setAttributeText: | (long long) | oid | |
attr: | (int) | attr | |
tstream: | (STSTextStream *) | tstream | |
Sets the writable TextStream for the given text attribute and OID.
oid | [in] Sparksee OID. |
attr | [in] Sparksee attribute identifier. |
tstream | [in] New Text value. This corresponds to a TextStream to write. |
- (STSObjects*) tails: | (STSObjects *) | edges |
Gets all the tails from the given edges collection.
edges | [in] Sparksee edge identifier collection. |
- (void) tailsAndHeads: | (STSObjects *) | edges | |
tails: | (STSObjects *) | tails | |
heads: | (STSObjects *) | heads | |
Gets all the tails and heads from the given edges collection.
edges | [in] Sparksee edge identifier collection. |
tails | [in|out] If not NULL, all the tails will be stored here. |
heads | [in|out] If not NULL, all the heads will be stored here. |
- (STSKeyValues*) topK: | (int) | attribute | |
order: | (enum STSOrder) | order | |
k: | (int) | k | |
restriction: | (STSObjects *) | restriction | |
Gets a KeyValues iterator as a result of the TopK operation.
restrictonObjects to limit the topk to this set of objects
attribute | The attribute to perform the TopK on |
order | The ordering semantincs of the top-k |
k | The size of the TopK |
restriction | null |
- (STSKeyValues*) topkWithAttr: | (int) | attribute | |
order: | (enum STSOrder) | order | |
k: | (int) | k | |
Gets a KeyValues iterator as a result of the TopK operation.
attribute | The attribute to perform the TopK on |
order | The ordering semantincs of the top-k |
k | The size of the TopK |
- (STSKeyValues*) topkWithAttrValue: | (int) | attribute | |
operation: | (enum STSCondition) | operation | |
lower: | (STSValue *) | lower | |
order: | (enum STSOrder) | order | |
k: | (int) | k | |
Gets a KeyValues iterator as a result of the TopK operation.
attribute | The attribute to perform the TopK on |
operation | The operation to perform in the top k |
lower | The lower bound Value to be satisfied |
order | The ordering semantincs of the top-k |
k | The size of the TopK |
- (STSKeyValues*) topkWithAttrValues: | (int) | attribute | |
operation: | (enum STSCondition) | operation | |
lower: | (STSValue *) | lower | |
higher: | (STSValue *) | higher | |
order: | (enum STSOrder) | order | |
k: | (int) | k | |
Gets a KeyValues iterator as a result of the TopK operation.
attribute | The attribute to perform the TopK on |
operation | The operation to perform in the top k |
lower | The lower bound Value to be satisfied |
higher | The upper bound Value to be satisfied |
order | The ordering semantincs of the top-k |
k | The size of the TopK |