VertexType

scalation.database.graph.VertexType
See theVertexType companion object
class VertexType(_name: String, val schema: Schema, val verts: ArrayBuffer[Vertex], val color: Color, val shape: Shape) extends Identifiable, Serializable

The VertexType class collects vertices of the same type, e.g., a person vertex-type. A vertex-type is analogous to a relation with no foreign keys in an RDBMS.

Value parameters

_name

the name of this vertex-type ('name' form Identifiable)

color

the display color for vertices of this type

schema

the property names for this vertex-type

shape

the display shape template for vertices of this type

verts

the set of vertices having this vertex-type (extension)

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Identifiable
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

inline def -(vt2: VertexType): VertexType
def <(pname: String, pval: Double): VertexType

Return the vertices where property pname is less than value pval.

Return the vertices where property pname is less than value pval.

Value parameters

pname

the property name

pval

the property value

Attributes

def ==(pname: String, pval: ValueType): VertexType

Return the vertices where property pname has value pval.

Return the vertices where property pname has value pval.

Value parameters

pname

the property name

pval

the property value

Attributes

def add(vs: Vertex*): Unit

Add vertices into the existing list of vertices in this vertex-type.

Add vertices into the existing list of vertices in this vertex-type.

Value parameters

vs

the vertex to insert

Attributes

def buildIndex(pkey: String): Unit

Build the index for the primary key.

Build the index for the primary key.

Value parameters

pkey

the property designated as the primary key

Attributes

def check: Boolean

Check that the properties names are in the schema for this vertex-type, returning whether they match the schema.

Check that the properties names are in the schema for this vertex-type, returning whether they match the schema.

Attributes

def checkMissing(pname: String): Boolean

Check whether the given property name is defined for all the vertices in this vertex-type. Useful check before, groupBy and project operators.

Check whether the given property name is defined for all the vertices in this vertex-type. Useful check before, groupBy and project operators.

Value parameters

pname

the given property name

Attributes

Delete a single vertex from the existing list of vertices in this vertex-type, returning the updated vertex type/set.

Delete a single vertex from the existing list of vertices in this vertex-type, returning the updated vertex type/set.

Value parameters

v

the vertex to delete

Attributes

Make all the vectices in this vertex-type distinct, i.e., no duplicate vertices.

Make all the vectices in this vertex-type distinct, i.e., no duplicate vertices.

Attributes

def find(key: ValueType): Vertex

Find the unique vertex based on the primary key.

Find the unique vertex based on the primary key.

Value parameters

key

the primary key

Attributes

def groupBy(pname: String, agg_name: String, agg_fn: Double => Double): VertexType

Group the vertices within this vertex-type by the values of the given property name and apply the aggregate function agg_fn on the agg_name property.

Group the vertices within this vertex-type by the values of the given property name and apply the aggregate function agg_fn on the agg_name property.

Value parameters

agg_fn

the aggrgate function

agg_name

the property name for the aggregate

pname

the property name on which to group

Attributes

Insert a single vertex into the existing list of vertices in this vertex-type, returning the updated vertex type/set.

Insert a single vertex into the existing list of vertices in this vertex-type, returning the updated vertex type/set.

Value parameters

v

the vertex to insert

Attributes

infix def intersect(vt2: VertexType): VertexType

Intersect this vertex-type with a second vertex-type.

Intersect this vertex-type with a second vertex-type.

Value parameters

vt2

the second vertex-type

Attributes

def limit(n: Int, s: Int): VertexType

Limit the number of vertices to n after skipping the first s.

Limit the number of vertices to n after skipping the first s.

Value parameters

n

the number of vertices to keep

s

the number of vertices to skip

Attributes

infix def minus(vt2: VertexType): VertexType

Subtract (minus) second vertex-type from this vertex-type.

Subtract (minus) second vertex-type from this vertex-type.

Value parameters

vt2

the second vertex-type

Attributes

Return a new shape object based on the shape template.

Return a new shape object based on the shape template.

Attributes

def orderBy(pname: String): VertexType

Order the vertices within this vertex-type by the values of the given property name.

Order the vertices within this vertex-type by the values of the given property name.

Value parameters

pname

the property name on which to sort

Attributes

Project each vertex in this vertex-type onto to the given subschema x of properties.

Project each vertex in this vertex-type onto to the given subschema x of properties.

Value parameters

x

the subset of property names to project onto

Attributes

inline def project(x: String): VertexType
def rename(pOld: String, pNew: String): VertexType

Rename the old property name with the new property name.

Rename the old property name with the new property name.

Value parameters

pNew

new property name

pOld

existing property name

Attributes

def select(pred: Property => Boolean): VertexType

Select the vertices in this vertex-type that satisfy the predicate.

Select the vertices in this vertex-type that satisfy the predicate.

Value parameters

pred

the predicate to satisfy

Attributes

def show(rng: Range): Unit

SHOW/print this vertex-type, one vertex per row. Formatting: regular column is 'width_' chars wide, 'X' is double that FIX - currently only works for width_, not width

SHOW/print this vertex-type, one vertex per row. Formatting: regular column is 'width_' chars wide, 'X' is double that FIX - currently only works for width_, not width

Value parameters

rng

the range of vertices to show (e.g, 0 until 10), defaults to all

Attributes

override def toString: String

Convert this vertex-type to a string.

Convert this vertex-type to a string.

Attributes

Definition Classes
Any
infix def union(vt2: VertexType): VertexType

Union this vertex-type with a second vertex-type with no duplication.

Union this vertex-type with a second vertex-type with no duplication.

Value parameters

vt2

the second vertex-type

Attributes

infix def unionAll(vt2: VertexType): VertexType

Union this vertex-type with a second vertex-type.

Union this vertex-type with a second vertex-type.

Value parameters

vt2

the second vertex-type

Attributes

inline def π(x: String): VertexType
inline def σ(pred: Property => Boolean): VertexType
inline def (vt2: VertexType): VertexType
inline def (vt2: VertexType): VertexType

Inherited methods

override def equals(that: Any): Boolean

Determine whether Identifiable object 'this' equals Identifiable object 'that'. Works since 'id' is unique for all Identifiable objects.

Determine whether Identifiable object 'this' equals Identifiable object 'that'. Works since 'id' is unique for all Identifiable objects.

Attributes

Definition Classes
Identifiable -> Any
Inherited from:
Identifiable
override def hashCode: Int

Return the hashCode as the unique id.

Return the hashCode as the unique id.

Attributes

Definition Classes
Identifiable -> Any
Inherited from:
Identifiable
def me: String

Return the full identity.

Return the full identity.

Attributes

Inherited from:
Identifiable
def typeName: String

Get the type of the object.

Get the type of the object.

Attributes

Inherited from:
Identifiable

Concrete fields

val color: Color
val schema: Schema
val shape: Shape
val verts: ArrayBuffer[Vertex]

Inherited fields

val id: Int

Attributes

Inherited from:
Identifiable
val name: String

Attributes

Inherited from:
Identifiable