class RelationSQL extends Tabular with Serializable
The RelationSQL
class provides an SQL-like API to data stored internally
in a Relation
object.
- Alphabetic
- By Inheritance
- RelationSQL
- Serializable
- Serializable
- Tabular
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
RelationSQL(r: Relation)
Construct a new
RelationSQL
object from an existing relation 'r'.Construct a new
RelationSQL
object from an existing relation 'r'.- r
the existing relation
-
new
RelationSQL(name: String, colName: Seq[String], col: Vector[Vec], key: Int = 0, domain: String = null, fKeys: Seq[(String, String, Int)] = null)
- name
the name of the relation
- colName
the names of columns
- col
the Scala Vector of columns making up the columnar relation
- key
the column number for the primary key (< 0 => no primary key)
- domain
an optional string indicating domains for columns (e.g., 'SD' = 'StrNum', 'Double')
- fKeys
an optional sequence of foreign keys - Seq (column name, ref table name, ref column position)
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
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
groupBy(cName: String*): RelationSQL
Group 'this' relation by the specified column names, returning 'this' relation.
Group 'this' relation by the specified column names, returning 'this' relation.
- cName
the group column names
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
intersect(r2: RelationSQL): RelationSQL
Intersect 'this' relation and 'r2'.
Intersect 'this' relation and 'r2'. Check that the two relations are compatible. Use index to finish intersect operation.
- r2
the other relation
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
join(r2: RelationSQL): RelationSQL
Join 'this' relation and 'r2' by performing a "natural-join".
Join 'this' relation and 'r2' by performing a "natural-join".
- r2
the other relation
-
def
minus(r2: RelationSQL): RelationSQL
Take the difference of 'this' relation and 'r2' ('this - r2').
Take the difference of 'this' relation and 'r2' ('this - r2'). Check that the two relations are compatible.
- r2
the other relation
-
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
orderBy(cName: String*): RelationSQL
Order (ascending) the rows in the relation by the selected columns '_cName'.
Order (ascending) the rows in the relation by the selected columns '_cName'. A stable sorting is used to allow sorting on multiple columns.
- cName
the column names that are to be sorted
-
def
repr: Relation
Return the internal representation.
-
def
reverseOrderBy(cName: String*): RelationSQL
Order (descending) the rows in the relation by the selected columns '_cName'.
Order (descending) the rows in the relation by the selected columns '_cName'. A stable sorting is used to allow sorting on multiple columns.
- cName
the column names that are to be sorted
-
def
save(): Unit
Save 'this' relation in a file using serialization.
-
def
select(cName: String*): RelationSQL
Select the attributes to return in the answer to the query.
Select the attributes to return in the answer to the query.
- cName
the attribute names
-
def
show(limit: Int = Int.MaxValue): Unit
Show 'this' relation row by row.
Show 'this' relation row by row.
- limit
the limit on the number of rows to display
- Definition Classes
- RelationSQL → Tabular
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
union(r2: RelationSQL): RelationSQL
Union 'this' relation and 'r2'.
Union 'this' relation and 'r2'. Check that the two relations are compatible. If they are not, return the first 'this' relation.
- r2
the other relation
-
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( ... )
-
def
where[T](p: Predicate[T]*)(implicit arg0: ClassTag[T]): RelationSQL
The where function filters on predicates (logic is and), returning the relation satisfying the predicates (column compare with constant)
The where function filters on predicates (logic is and), returning the relation satisfying the predicates (column compare with constant)
- T
the predicate type
- p
tuple(1): column name, tuple(2): predicate (T => Boolean)