trait Table[T <: Table[T]] extends CypherTable
Main abstraction of a relational backend. A table represents a relation in terms of relational algebra and exposes relational and additional auxiliary operators. Operators need to be implemented by the specific backend (e.g. morpheus-spark-cypher).
- T
backend-specific representation of that table (e.g. DataFrame for morpheus-spark-cypher)
- Self Type
- T
- Alphabetic
- By Inheritance
- Table
- CypherTable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
columnType: Map[String, CypherType]
- Definition Classes
- CypherTable
-
abstract
def
distinct(cols: String*): T
Returns a table where each row is unique with regard to the specified columns
Returns a table where each row is unique with regard to the specified columns
- cols
columns to consider when comparing rows
- returns
table containing the specific columns and distinct rows
-
abstract
def
distinct: T
Returns a table where each row is unique.
Returns a table where each row is unique.
- returns
table with unique rows
-
abstract
def
drop(cols: String*): T
Returns a table with the given columns removed.
Returns a table with the given columns removed.
- cols
columns to drop
- returns
table with dropped columns
-
abstract
def
filter(expr: Expr)(implicit header: RecordHeader, parameters: CypherMap): T
Returns a table containing only rows where the given expression evaluates to true.
Returns a table containing only rows where the given expression evaluates to true.
- expr
filter expression
- header
table record header
- parameters
query parameters
- returns
table with filtered rows
-
abstract
def
group(by: Set[Var], aggregations: Map[String, Aggregator])(implicit header: RecordHeader, parameters: CypherMap): T
Groups the rows within the table by the given query variables.
Groups the rows within the table by the given query variables. Additionally a set of aggregations can be performed on the grouped table.
- by
query variables to group by (e.g. (n)), if empty, the whole row is used as grouping key
- aggregations
set of aggregations functions and the column to store the result in
- header
table record header
- parameters
query parameters
- returns
table grouped by the given keys and results of possible aggregate functions
-
abstract
def
join(other: T, joinType: JoinType, joinCols: (String, String)*): T
Joins the current table with the given table on the specified join columns using equi-join semantics.
Joins the current table with the given table on the specified join columns using equi-join semantics.
- other
table to join
- joinType
join type to perform (e.g. inner, outer, ...)
- joinCols
columns to join the two tables on
- returns
joined table
-
abstract
def
limit(n: Long): T
Returns a table containing the first n rows of the current table.
Returns a table containing the first n rows of the current table.
- n
number of rows to return
- returns
table with at most n rows
-
abstract
def
orderBy(sortItems: (Expr, Order)*)(implicit header: RecordHeader, parameters: CypherMap): T
Returns a table that is ordered by the given columns.
Returns a table that is ordered by the given columns.
- sortItems
a sequence of column names and their order (i.e. ascending / descending)
- returns
ordered table
-
abstract
def
physicalColumns: Seq[String]
- Definition Classes
- CypherTable
-
abstract
def
rows: Iterator[(String) ⇒ CypherValue]
- Definition Classes
- CypherTable
-
abstract
def
select(col: (String, String), cols: (String, String)*): T
Returns a table containing only the given columns.
Returns a table containing only the given columns. The column order within the table is aligned with the argument.
- cols
columns to select and their alias
- returns
table containing only requested aliased columns
-
abstract
def
show(rows: Int = 20): Unit
Prints the table to the system console.
Prints the table to the system console.
- rows
number of rows to print
-
abstract
def
size: Long
- Definition Classes
- CypherTable
-
abstract
def
skip(n: Long): T
Returns a table without the first n rows of the current table.
Returns a table without the first n rows of the current table.
- n
number of rows to skip
- returns
table with skipped rows
-
abstract
def
unionAll(other: T): T
Computes the union of the current table and the given table.
Computes the union of the current table and the given table. Requires both tables to have identical column layouts.
- other
table to union with
- returns
union table
-
abstract
def
withColumns(columns: (Expr, String)*)(implicit header: RecordHeader, parameters: CypherMap): T
Returns a table with additional expressions, which are evaluated and stored in the specified columns.
Returns a table with additional expressions, which are evaluated and stored in the specified columns.
- columns
tuples of expressions to evaluate and corresponding column name
- header
table record header
- parameters
query parameters
- Note
If the column already exists, its contents will be replaced.
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
cache(): T
If supported by the backend, calling that operator caches the underlying table within the backend runtime.
If supported by the backend, calling that operator caches the underlying table within the backend runtime.
- returns
cached version of that table
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
logicalColumns: Option[Seq[String]]
- Definition Classes
- CypherTable
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
select(cols: String*): T
Returns a table containing only the given columns.
Returns a table containing only the given columns. The column order within the table is aligned with the argument.
- cols
columns to select
- returns
table containing only requested columns
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )