SparkseePython
6.0.2
|
Public Member Functions | |
def | find_or_create_edge (self, etype, tail, head) |
Gets any of the edges of the specified type between two given nodes (tail and head). More... | |
def | find_edge_types (self) |
Gets all existing Sparksee edge type identifiers. More... | |
def | get_attribute_interval_count (self, attr, lower, include_lower, higher, include_higher) |
Gets how many objects have a value into the given range for the given attribute. More... | |
def | neighbors (self, objs, 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... | |
def | backup (self, file) |
Dumps all the data to a backup file. More... | |
def | remove_attribute (self, attr) |
Removes the given attribute. More... | |
def | remove_type (self, type) |
Removes the given type. More... | |
def | degree (self, oid, etype, dir) |
Gets the number of edges from or to the given node OID and for the given edge type. More... | |
def | find_types (self) |
Gets all existing Sparksee node and edge type identifiers. More... | |
def | new_array_attribute (self, type, name, dt, size) |
Creates a new array attribute. More... | |
def | find_type (self, name) |
Gets the Sparksee type identifier for the given type name. More... | |
def | top_k (self, attribute, operation, lower, order, k) |
Gets a KeyValues iterator as a result of the TopK operation. More... | |
def | get_edge_peer (self, edge, node) |
Gets the other end for the given edge. More... | |
def | set_attribute_text (self, oid, attr, tstream) |
Sets the writable TextStream for the given text attribute and OID. More... | |
def | set_attribute (self, attr, value) |
Sets the value of the given attribute for all the objects of the types the attribute applies to. More... | |
def | index_neighbors (self, edge_type, neighbors) |
Creates or destroys the neighbors index of an edge type. More... | |
def | get_object_type (self, oid) |
Gets the Sparksee node or edge type identifier for the given OID. More... | |
def | index_attribute (self, attr, kind) |
Updates the index of the given attribute. More... | |
def | set_array_attribute (self, attr, value) |
Sets all the values of the array of the given array attribute for all the objects of the types the attribute applies to. More... | |
def | top_k (self, attribute, order, k) |
Gets a KeyValues iterator as a result of the TopK operation. More... | |
def | get_attribute (self, oid, attr, value) |
Gets the Value for the given attribute and OID. More... | |
def | get_attribute_statistics (self, attr, basic) |
Gets statistics from the given attribute. More... | |
def | select (self, attr, cond, lower, higher, restriction) |
Selects all OIDs satisfying the given condition for the given attribute. More... | |
def | count_nodes (self) |
Gets the number of nodes. More... | |
def | set_attribute_default_value (self, attr, value) |
Sets a default value for an attribute. More... | |
def | find_object (self, attr, value) |
Finds one object having the given Value for the given attribute. More... | |
def | neighbors (self, oid, etype, dir) |
Selects all neighbor nodes from or to the given node OID and for the given edge type. More... | |
def | new_session_attribute (self, type, dt, kind) |
Creates a new Session attribute. More... | |
def | encrypted_backup (self, file, key_in_hex, iv_in_hex) |
Dumps all the data to a backup file. More... | |
def | drop (self, oid) |
Drops the given OID. More... | |
def | set_array_attribute_void (self, oid, attr, value) |
Sets all the elements of the ValueArray for the given array attribute and OID. More... | |
def | edges (self, etype, tail, head) |
Gets all the edges of the given type between two given nodes (tail and head). More... | |
def | set_attribute (self, oid, attr, value) |
Sets the Value for the given attribute and OID. More... | |
def | find_edge (self, etype, tail, head) |
Gets any of the edges of the given type between two given nodes (tail and head). More... | |
def | tails (self, edges) |
Gets all the tails from the given edges collection. More... | |
def | select (self, attr, cond, lower, higher) |
Selects all OIDs satisfying the given condition for the given attribute. More... | |
def | get_values (self, attr) |
Gets the Value collection for the given attribute. More... | |
def | export (self, file, type, em) |
Exports the Graph. More... | |
def | new_restricted_edge_type (self, name, tail, head, neighbors) |
Creates a new restricted edge type. More... | |
def | get_attribute_text (self, oid, attr) |
Gets the read-only TextStream for the given text attribute and OID. More... | |
def | explode (self, objs, etype, dir) |
Selects all edges from or to each of the node OID in the given collection and for the given edge type. More... | |
def | new_edge_type (self, name, directed, neighbors) |
Creates a new edge type. More... | |
def | top_k (self, attribute, operation, lower, higher, order, k) |
Gets a KeyValues iterator as a result of the TopK operation. More... | |
def | dump_data (self, file) |
Dumps logical data to a file. More... | |
def | set_array_attribute (self, oid, attr, value) |
Sets all the elements of the ValueArray for the given array attribute and OID and returns it. More... | |
def | top_k (self, attribute, operation, lower, higher, order, k, restriction) |
Gets a KeyValues iterator as a result of the TopK operation. More... | |
def | find_attribute (self, type, name) |
Gets the Sparksee attribute identifier for the given type identifier and attribute name. More... | |
def | new_node (self, type) |
Creates a new node instance. More... | |
def | find_node_types (self) |
Gets all existing Sparksee node type identifiers. More... | |
def | new_attribute (self, type, name, dt, kind) |
Creates a new attribute. More... | |
def | top_k (self, attribute, operation, lower, order, k, restriction) |
Gets a KeyValues iterator as a result of the TopK operation. More... | |
def | new_session_array_attribute (self, type, dt, size) |
Creates a new Session array attribute. More... | |
def | new_edge (self, type, tail_attr, tail_v, head_attr, head_v) |
Creates a new edge instance. More... | |
def | get_attribute (self, attr) |
Gets information about the given attribute. More... | |
def | new_node_type (self, name) |
Creates a new node type. More... | |
def | dump_storage (self, file) |
Dumps internal storage data to a file. More... | |
def | select (self, type) |
Selects all OIDs belonging to the given type. More... | |
def | select (self, attr, cond, value, restriction) |
Selects all OIDs satisfying the given condition for the given attribute. More... | |
def | select (self, attr, cond, value) |
Selects all OIDs satisfying the given condition for the given attribute. More... | |
def | rename_attribute (self, attr, new_name) |
Renames an attribute. More... | |
def | top_k (self, attribute, order, k, restriction) |
Gets a KeyValues iterator as a result of the TopK operation. More... | |
def | count_edges (self) |
Gets the number of edges. More... | |
def | rename_type (self, type, new_name) |
Renames a type. More... | |
def | tails_and_heads (self, edges, tails, heads) |
Gets all the tails and heads from the given edges collection. More... | |
def | new_session_attribute (self, type, dt, kind, default_value) |
Creates a new Session attribute with a default value. More... | |
def | heads (self, edges) |
Gets all the heads from the given edges collection. More... | |
def | new_attribute (self, type, name, dt, kind, default_value) |
Creates a new attribute with a default value. More... | |
def | rename_type (self, old_name, new_name) |
Renames a type. More... | |
def | explode (self, oid, etype, dir) |
Selects all edges from or to the given node OID and for the given edge type. More... | |
def | get_attributes (self, oid) |
Gets all Sparksee attribute identifiers with a non-NULL value for the given Sparksee OID. More... | |
def | find_attributes (self, type) |
Gets all existing Sparksee attribute identifiers for the given type identifier. More... | |
def | get_array_attribute (self, oid, attr) |
Gets the ValueArray for the given array attribute and OID or NULL if it does not exist. More... | |
def | get_attribute (self, oid, attr) |
Gets the Value for the given attribute and OID. More... | |
def | find_or_create_object (self, attr, value) |
Finds one object having the given Value for the attribute or it creates one does not exist any. More... | |
def | get_edge_data (self, edge) |
Gets information about an edge. More... | |
def | drop (self, objs) |
Drops all the OIDs from the given collection. More... | |
def | new_edge (self, type, tail, head) |
Creates a new edge instance. More... | |
def | get_type (self, type) |
Gets information about the given type. 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.
def sparksee.Graph.backup | ( | self, | |
file | |||
) |
Dumps all the data to a backup file.
See the Sparksee class Restore methods.
file | [in] Output backup file path. |
RuntimeError | null |
IOError | If the given file cannot be created. |
def sparksee.Graph.count_edges | ( | self | ) |
Gets the number of edges.
def sparksee.Graph.count_nodes | ( | self | ) |
Gets the number of nodes.
def sparksee.Graph.degree | ( | self, | |
oid, | |||
etype, | |||
dir | |||
) |
def sparksee.Graph.drop | ( | self, | |
oid | |||
) |
Drops the given OID.
It also removes its egdges as well as its attribute values.
oid | [in] Sparksee OID to be removed. |
Referenced by sparksee.Graph.drop().
def sparksee.Graph.drop | ( | self, | |
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. |
References sparksee.Graph.drop().
def sparksee.Graph.dump_data | ( | self, | |
file | |||
) |
Dumps logical data to a file.
file | [in] Output file path. |
RuntimeError | null |
IOError | If the given file cannot be created. |
def sparksee.Graph.dump_storage | ( | self, | |
file | |||
) |
Dumps internal storage data to a file.
file | [in] Output file path. |
RuntimeError | null |
IOError | If the given file cannot be created. |
def sparksee.Graph.edges | ( | self, | |
etype, | |||
tail, | |||
head | |||
) |
def sparksee.Graph.encrypted_backup | ( | self, | |
file, | |||
key_in_hex, | |||
iv_in_hex | |||
) |
Dumps all the data to a backup file.
See the Sparksee class RestoreEncryptedBackup methods.
file | [in] Output backup file path. |
key_in_hex | [In] The AES encryption Key as an hexadecimal string (8, 16 or 32 bytes). |
iv_in_hex | [In] The AES Initialization Vector as an hexadecimal string (16 bytes). |
RuntimeError | null |
IOError | If the given file cannot be created. |
def sparksee.Graph.explode | ( | self, | |
objs, | |||
etype, | |||
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. |
Referenced by sparksee.Graph.explode().
def sparksee.Graph.explode | ( | self, | |
oid, | |||
etype, | |||
dir | |||
) |
Selects all edges from or to the given node OID and for the given edge type.
References sparksee.Graph.explode().
def sparksee.Graph.export | ( | self, | |
file, | |||
type, | |||
em | |||
) |
Exports the Graph.
file | [in] Output file. |
type | [in] Export type. |
em | [in] Defines how to do the export for each graph object. |
IOError | null |
def sparksee.Graph.find_attribute | ( | self, | |
type, | |||
name | |||
) |
Gets the Sparksee attribute identifier for the given type identifier and attribute name.
type | [in] Sparksee type identifier. |
name | [in] Unique attribute name. |
def sparksee.Graph.find_attributes | ( | self, | |
type | |||
) |
def sparksee.Graph.find_edge | ( | self, | |
etype, | |||
tail, | |||
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. |
def sparksee.Graph.find_edge_types | ( | self | ) |
def sparksee.Graph.find_node_types | ( | self | ) |
def sparksee.Graph.find_object | ( | self, | |
attr, | |||
value | |||
) |
def sparksee.Graph.find_or_create_edge | ( | self, | |
etype, | |||
tail, | |||
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. |
def sparksee.Graph.find_or_create_object | ( | self, | |
attr, | |||
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.
def sparksee.Graph.find_type | ( | self, | |
name | |||
) |
def sparksee.Graph.find_types | ( | self | ) |
def sparksee.Graph.get_array_attribute | ( | self, | |
oid, | |||
attr | |||
) |
Gets the ValueArray for the given array attribute and OID or NULL if it does not exist.
def sparksee.Graph.get_attribute | ( | self, | |
oid, | |||
attr, | |||
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. |
Referenced by sparksee.Graph.get_attribute().
def sparksee.Graph.get_attribute | ( | self, | |
attr | |||
) |
Gets information about the given attribute.
attr | [in] Sparksee attribute identifier. |
References sparksee.Graph.get_attribute().
def sparksee.Graph.get_attribute | ( | self, | |
oid, | |||
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.
References sparksee.Graph.get_attribute().
def sparksee.Graph.get_attribute_interval_count | ( | self, | |
attr, | |||
lower, | |||
include_lower, | |||
higher, | |||
include_higher | |||
) |
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. |
include_lower | [in] If TRUE, include lower bound Value of the range. |
higher | [in] Higher bound Value of the range. |
include_higher | [in] If TRUE, include higher bound Value of the range. |
def sparksee.Graph.get_attribute_statistics | ( | self, | |
attr, | |||
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. |
def sparksee.Graph.get_attribute_text | ( | self, | |
oid, | |||
attr | |||
) |
Gets the read-only TextStream for the given text attribute and OID.
def sparksee.Graph.get_attributes | ( | self, | |
oid | |||
) |
def sparksee.Graph.get_edge_data | ( | self, | |
edge | |||
) |
def sparksee.Graph.get_edge_peer | ( | self, | |
edge, | |||
node | |||
) |
def sparksee.Graph.get_object_type | ( | self, | |
oid | |||
) |
def sparksee.Graph.get_type | ( | self, | |
type | |||
) |
def sparksee.Graph.get_values | ( | self, | |
attr | |||
) |
def sparksee.Graph.heads | ( | self, | |
edges | |||
) |
Gets all the heads from the given edges collection.
edges | [in] Sparksee edge identifier collection. |
def sparksee.Graph.index_attribute | ( | self, | |
attr, | |||
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.
def sparksee.Graph.index_neighbors | ( | self, | |
edge_type, | |||
neighbors | |||
) |
Creates or destroys the neighbors index of an edge type.
edge_type | [in] Sparksee Edge type identifier. |
neighbors | [in] If TRUE, it indexes the neighbor nodes, otherwise it removes the index. |
def sparksee.Graph.neighbors | ( | self, | |
objs, | |||
etype, | |||
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. |
Referenced by sparksee.Graph.neighbors().
def sparksee.Graph.neighbors | ( | self, | |
oid, | |||
etype, | |||
dir | |||
) |
Selects all neighbor nodes from or to the given node OID and for the given edge type.
References sparksee.Graph.neighbors().
def sparksee.Graph.new_array_attribute | ( | self, | |
type, | |||
name, | |||
dt, | |||
size | |||
) |
def sparksee.Graph.new_attribute | ( | self, | |
type, | |||
name, | |||
dt, | |||
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. |
Referenced by sparksee.Graph.new_attribute().
def sparksee.Graph.new_attribute | ( | self, | |
type, | |||
name, | |||
dt, | |||
kind, | |||
default_value | |||
) |
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. |
default_value | [in] The default value to use in each new node/edge. |
References sparksee.Graph.new_attribute().
def sparksee.Graph.new_edge | ( | self, | |
type, | |||
tail_attr, | |||
tail_v, | |||
head_attr, | |||
head_v | |||
) |
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. |
tail_attr | [in] Sparksee attribute identifier. |
tail_v | [in] Value. |
head_attr | [in] Sparksee attribute identifier. |
head_v | [in] Value. |
Referenced by sparksee.Graph.new_edge().
def sparksee.Graph.new_edge | ( | self, | |
type, | |||
tail, | |||
head | |||
) |
Creates a new edge instance.
type | [in] Sparksee type identifier. |
tail | [in] Source Sparksee OID. |
head | [in] Target Sparksee OID. |
References sparksee.Graph.new_edge().
def sparksee.Graph.new_edge_type | ( | self, | |
name, | |||
directed, | |||
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. |
def sparksee.Graph.new_node | ( | self, | |
type | |||
) |
Creates a new node instance.
type | [in] Sparksee type identifier. |
def sparksee.Graph.new_node_type | ( | self, | |
name | |||
) |
Creates a new node type.
name | [in] Unique name for the new node type. |
def sparksee.Graph.new_restricted_edge_type | ( | self, | |
name, | |||
tail, | |||
head, | |||
neighbors | |||
) |
def sparksee.Graph.new_session_array_attribute | ( | self, | |
type, | |||
dt, | |||
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. |
def sparksee.Graph.new_session_attribute | ( | self, | |
type, | |||
dt, | |||
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. |
Referenced by sparksee.Graph.new_session_attribute().
def sparksee.Graph.new_session_attribute | ( | self, | |
type, | |||
dt, | |||
kind, | |||
default_value | |||
) |
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. |
default_value | [in] The default value to use in each new node/edge. |
References sparksee.Graph.new_session_attribute().
def sparksee.Graph.remove_attribute | ( | self, | |
attr | |||
) |
Removes the given attribute.
attr | [in] Sparksee attribute identifier. |
def sparksee.Graph.remove_type | ( | self, | |
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. |
def sparksee.Graph.rename_attribute | ( | self, | |
attr, | |||
new_name | |||
) |
Renames an attribute.
The new name must be available.
attr | [in] Sparksee attribute identifier. |
new_name | [in] The new name for the attribute. |
def sparksee.Graph.rename_type | ( | self, | |
type, | |||
new_name | |||
) |
Renames a type.
The new name must be available.
type | [in] The type to be renamed. |
new_name | [in] The new name for the type. |
Referenced by sparksee.Graph.rename_type().
def sparksee.Graph.rename_type | ( | self, | |
old_name, | |||
new_name | |||
) |
Renames a type.
The new name must be available.
old_name | [in] The current name of the type to be renamed. |
new_name | [in] The new name for the type. |
References sparksee.Graph.rename_type().
def sparksee.Graph.select | ( | self, | |
attr, | |||
cond, | |||
lower, | |||
higher, | |||
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. |
Referenced by sparksee.Graph.select().
def sparksee.Graph.select | ( | self, | |
attr, | |||
cond, | |||
lower, | |||
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. |
References sparksee.Graph.select().
def sparksee.Graph.select | ( | self, | |
type | |||
) |
Selects all OIDs belonging to the given type.
type | [in] Sparksee type identifier. |
References sparksee.Graph.select().
def sparksee.Graph.select | ( | self, | |
attr, | |||
cond, | |||
value, | |||
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. |
References sparksee.Graph.select().
def sparksee.Graph.select | ( | self, | |
attr, | |||
cond, | |||
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. |
References sparksee.Graph.select().
def sparksee.Graph.set_array_attribute | ( | self, | |
attr, | |||
value | |||
) |
Sets all the values of the array of the given array attribute for all the objects of the types the attribute applies to.
attr | [in] Sparksee array attribute identifier. |
value | [in] Value for all the array elements of the arrays. |
Referenced by sparksee.Graph.set_array_attribute().
def sparksee.Graph.set_array_attribute | ( | self, | |
oid, | |||
attr, | |||
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. |
References sparksee.Graph.set_array_attribute().
def sparksee.Graph.set_array_attribute_void | ( | self, | |
oid, | |||
attr, | |||
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.
def sparksee.Graph.set_attribute | ( | self, | |
attr, | |||
value | |||
) |
Sets the value of the given attribute for all the objects of the types the attribute applies to.
Does not work for TEXT attribute types
txThe Transaction this operation belongs to attributeThe attribute to initialize
attr | null |
value | The value to initialize the attribute to |
Referenced by sparksee.Graph.set_attribute().
def sparksee.Graph.set_attribute | ( | self, | |
oid, | |||
attr, | |||
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. |
References sparksee.Graph.set_attribute().
def sparksee.Graph.set_attribute_default_value | ( | self, | |
attr, | |||
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. |
def sparksee.Graph.set_attribute_text | ( | self, | |
oid, | |||
attr, | |||
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. |
def sparksee.Graph.tails | ( | self, | |
edges | |||
) |
Gets all the tails from the given edges collection.
edges | [in] Sparksee edge identifier collection. |
def sparksee.Graph.tails_and_heads | ( | self, | |
edges, | |||
tails, | |||
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. |
def sparksee.Graph.top_k | ( | self, | |
attribute, | |||
operation, | |||
lower, | |||
order, | |||
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 |
Referenced by sparksee.Graph.top_k().
def sparksee.Graph.top_k | ( | self, | |
attribute, | |||
order, | |||
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 |
References sparksee.Graph.top_k().
def sparksee.Graph.top_k | ( | self, | |
attribute, | |||
operation, | |||
lower, | |||
higher, | |||
order, | |||
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 |
References sparksee.Graph.top_k().
def sparksee.Graph.top_k | ( | self, | |
attribute, | |||
operation, | |||
lower, | |||
higher, | |||
order, | |||
k, | |||
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 |
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 |
restriction | null |
References sparksee.Graph.top_k().
def sparksee.Graph.top_k | ( | self, | |
attribute, | |||
operation, | |||
lower, | |||
order, | |||
k, | |||
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 |
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 |
restriction | null |
References sparksee.Graph.top_k().
def sparksee.Graph.top_k | ( | self, | |
attribute, | |||
order, | |||
k, | |||
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 |
References sparksee.Graph.top_k().