Class/Object

org.opencypher.okapi.api.schema

Schema

Related Docs: object Schema | package schema

Permalink

final case class Schema(labels: Set[String], relationshipTypes: Set[String], labelPropertyMap: LabelPropertyMap, relTypePropertyMap: RelTypePropertyMap) extends Product with Serializable

Self Type
Schema
Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Schema
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Schema(labels: Set[String], relationshipTypes: Set[String], labelPropertyMap: LabelPropertyMap, relTypePropertyMap: RelTypePropertyMap)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def ++(other: Schema): Schema

    Permalink
  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. def allLabelCombinations: Set[Set[String]]

    Permalink
  6. def allNodeKeys: PropertyKeys

    Permalink
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def combinationsFor(knownLabels: Set[String]): Set[Set[String]]

    Permalink

    Given a set of labels that a node definitely has, returns all combinations of labels that the node could possibly have.

  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def forNodeScan(labelConstraints: Set[String]): Schema

    Permalink

    Returns the sub-schema for a node scan under the given constraints.

    Returns the sub-schema for a node scan under the given constraints. Labels are interpreted as constraints on the resulting Schema. If no labels are specified, this means the resulting node can have any valid label combination.

    labelConstraints

    Specifies the labels that the node is guaranteed to have

    returns

    sub-schema for labelConstraints

  13. def forRelationship(relType: CTRelationship): Schema

    Permalink

    Returns the sub-schema for relType

    Returns the sub-schema for relType

    relType

    Specifies the type for which the schema is extracted

    returns

    sub-schema for relType

  14. def fromNodeEntity(labels: Set[String]): Schema

    Permalink

    Given the current schema, construct a new Schema for an entity with a given set of labels.

    Given the current schema, construct a new Schema for an entity with a given set of labels. If the set of labels is empty, this means that the resulting schema will only have properties present on nodes that have no labels.

    labels

    labels present on the node entity

  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def impliedLabels(knownLabels: Set[String]): Set[String]

    Permalink

    Given a set of labels that a node definitely has, returns all labels the node _must_ have.

  17. def impliedLabels(knownLabels: String*): Set[String]

    Permalink

    Given a set of labels that a node definitely has, returns all labels the node _must_ have.

  18. lazy val impliedLabels: ImpliedLabels

    Permalink

    Implied labels for each existing label

  19. def isEmpty: Boolean

    Permalink
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. def keysFor(labels: String*): PropertyKeys

    Permalink

    Returns the property keys that exist on any of the labels.

    Returns the property keys that exist on any of the labels. Types of conflicting property keys are joined.

    labels

    labels for which to return the property keys

    returns

    property keys for labels

  22. def keysFor(labelCombinations: Set[Set[String]]): PropertyKeys

    Permalink

    Computes property keys for the set of label combinations.

    Computes property keys for the set of label combinations.

    labelCombinations

    label combinations to consider.

    returns

    typed property keys, with joined or nullable types for conflicts.

  23. lazy val labelCombinations: LabelCombinations

    Permalink

    Groups of labels where each group contains possible label combinations.

  24. val labelPropertyMap: LabelPropertyMap

    Permalink
  25. val labels: Set[String]

    Permalink
  26. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. def nodeKeyType(labels: Set[String], key: String): Option[CypherType]

    Permalink

    Computes the type (if any) for a property given a predicate of labels.

    Computes the type (if any) for a property given a predicate of labels.

    labels

    the labels predicate; either a lower bound of expected labels, or a disjunction of possible labels

    key

    the property key

    returns

    the Cypher type, if any, mapped to the key for nodes that pass the predicate

  28. def nodeKeys(label: String): PropertyKeys

    Permalink
  29. def nodeKeys(labels: Set[String]): PropertyKeys

    Permalink

    Given a set of labels that a node definitely has, returns its property schema.

    Given a set of labels that a node definitely has, returns its property schema.

    TODO: consider implied labels here?

  30. def nodeKeys(labels: String*): PropertyKeys

    Permalink
  31. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. def pretty: String

    Permalink
  34. val relTypePropertyMap: RelTypePropertyMap

    Permalink
  35. def relationshipKeyType(types: Set[String], key: String): Option[CypherType]

    Permalink
  36. def relationshipKeys(typ: String): Map[String, CypherType]

    Permalink

    Returns the property schema for a given relationship type

  37. val relationshipTypes: Set[String]

    Permalink
  38. def sparkCompatibleJoin(label: Option[String], key: String, t1: CypherType, t2: CypherType): CypherType

    Permalink
  39. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  40. def toString(): String

    Permalink
    Definition Classes
    Schema → AnyRef → Any
  41. def verify: Schema

    Permalink
  42. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. def withNodePropertyKeys(nodeLabels: Set[String], keys: PropertyKeys): Schema

    Permalink

    Adds information about a label and its associated properties to the schema.

    Adds information about a label and its associated properties to the schema. The arguments provided to this method are interpreted as describing a whole piece of information, meaning that for a specific instance of the label, the given properties were present in their exact given shape. For example, consider

    val s = schema.withNodePropertyKeys("Foo")("p" -> CTString, "q" -> CTInteger)
    val t = s.withNodePropertyKeys("Foo")("p" -> CTString)

    The resulting schema (assigned to t) will indicate that the type of q is CTInteger.nullable, as the schema understands that it is possible to map :Foo to both sets of properties, and it calculates the join of the property types, respectively.

    nodeLabels

    the node labels to add to the schema

    keys

    the typed property keys to associate with the labels

    returns

    a copy of the Schema with the provided new data

  46. def withNodePropertyKeys(nodeLabels: String*)(keys: (String, CypherType)*): Schema

    Permalink
  47. def withRelationshipPropertyKeys(typ: String, keys: PropertyKeys): Schema

    Permalink

    Adds information about a relationship type and its associated properties to the schema.

    Adds information about a relationship type and its associated properties to the schema. The arguments provided to this method are interpreted as describing a whole piece of information, meaning that for a specific instance of the relationship type, the given properties were present in their exact given shape. For example, consider

    val s = schema.withRelationshipPropertyKeys("FOO")("p" -> CTString, "q" -> CTInteger)
    val t = s.withRelationshipPropertyKeys("FOO")("p" -> CTString)

    The resulting schema (assigned to t) will indicate that the type of q is CTInteger.nullable, as the schema understands that it is possible to map :FOO to both sets of properties, and it calculates the join of the property types, respectively.

    typ

    the relationship type to add to the schema

    keys

    the properties (name and type) to associate with the relationship type

    returns

    a copy of the Schema with the provided new data

  48. def withRelationshipPropertyKeys(typ: String)(keys: (String, CypherType)*): Schema

    Permalink
  49. def withRelationshipType(relType: String): Schema

    Permalink

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped