class Processor extends AnyRef
Sclera statement processor
- Alphabetic
- By Inheritance
- Processor
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Processor(schemaDbms: String, schemaDb: String, schemaDbConfig: List[(String, String)], tempDbms: String, tempDb: String, tempDbConfig: List[(String, String)], checkSchema: Boolean)
- schemaDbms
DBMS to be used to store Sclera's schema tables
- schemaDb
Designated database in the schema DBMS specified above
- schemaDbConfig
Configuration for the schema DBMS connection
- tempDbms
DBMS to be used to store temporary tables
- tempDb
Designated database in the temporary DBMS specified above
- tempDbConfig
Configuration for the temporary DBMS connection
- checkSchema
Check schema during initialization
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
- def addTable(tableId: TableId, tableOpt: Option[Table]): Unit
Add an external table to the schema
Add an external table to the schema
- tableId
The id to be assigned to the table
- tableOpt
Specification of the table to be added, if different from that provided by the underlying system
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def baseTables(locIdOpt: Option[LocationId]): List[(SchemaTable, DbObjectDuration)]
List of base tables at a location (all locations if not specified)
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def close(): Unit
Clean up and free allocated resources
- def createDbObject(sqlDbObj: SqlDbObject, duration: DbObjectDuration): SchemaObject
Create a database object
Create a database object
- sqlDbObj
Specification of the database object to be created
- duration
Preferred duration of the object, temporary or permanent
- def createExt(dataTarget: ExternalTarget, relExpr: RelExpr): Unit
Create an external target and populate with the result of evaluating the relational expression
Create an external target and populate with the result of evaluating the relational expression
- dataTarget
External target to be created and populated
- relExpr
Relational expression to be evaluated
- def createIndex(stmt: SqlCreateIndex, dur: DbObjectDuration = Persistent): Unit
Create an index
Create an index
- stmt
Specification of the index
- dur
Duration of the index, temporary or permanent
- def createMLObject(libOpt: Option[String], sqlMLObj: SqlMLObject, trainRelExpr: RelExpr, duration: DbObjectDuration): SchemaMLObject
Create a machine learning object
Create a machine learning object
- libOpt
The underlying machine learning library, use the default library if not specified
- sqlMLObj
Specification of the object to be created
- trainRelExpr
Relational expression -- is evaluated and the result is used for training the object
- duration
Preferred duration of the object, temporary or permanent
- def createTable(name: String, relExpr: RelExpr, duration: DbObjectDuration, locIdOpt: Option[LocationId]): SchemaTable
Create a table containing the result of evaluating a relational expression.
Create a table containing the result of evaluating a relational expression.
- duration
Preferred duration of the table, temporary or permanent
- locIdOpt
Preferred location on which to create the table, use the most convenient location if None. Evaluation * takes care of cross-location data transfer when needed.
- returns
Schema entry of the created table
- def createTable(table: Table, duration: DbObjectDuration, locIdOpt: Option[LocationId]): SchemaTable
Create an empty table
Create an empty table
- table
Specification of the table to be created
- duration
Preferred duration of the table, temporary or permanent
- locIdOpt
Location on which to create the table, use default location if None.
- returns
Schema entry of the created table
- def createTable(table: Table, duration: DbObjectDuration, locIdOpt: Option[LocationId], relExprOpt: Option[RelExpr]): SchemaTable
Create a table and populate with the result of evaluating a relational expression.
Create a table and populate with the result of evaluating a relational expression.
- table
Specification of the table to be created
- duration
Preferred duration of the table, temporary or permanent
- locIdOpt
Location on which to create the table, use default location if None.
- relExprOpt
If specified, evaluate the expression and populate the table with the result
- returns
Schema entry of the created table
- def createTableFromExpr(preparedRelExpr: RelExpr, tableName: String, duration: DbObjectDuration): SchemaTable
Create a table containing the result of evaluating a prepared relational expression.
Create a table containing the result of evaluating a prepared relational expression. Convenience method, not to be called directly by applications.
- def createTableFromTuples(dataColumns: List[Column], dataRows: Iterator[TableRow], dstLocId: LocationId, dstTableName: String, dstTableDuration: DbObjectDuration): SchemaTable
Create a table containing the rows provided by the given iterator.
Create a table containing the rows provided by the given iterator.
- dataColumns
Columns metadata for the rows
- dataRows
Iterator providing the rows for the table
- dstLocId
Location of the created table
- dstTableName
Name of the created table
- dstTableDuration
Duration of the table -- temporary or permanent
- returns
Schema entry of the created table
- def createView(name: String, expr: LogicalExpr, duration: DbObjectDuration): SchemaView
Create a view
Create a view
- name
Name of the view to be created
- expr
Logical expression underlying the view to be created
- duration
Duration of the view -- temporary or permanent
- returns
Schema entry of the created view
- def dataCacheLocation: Location
Designated location for the data cache (needed for query evaluation)
- def delete(tableId: TableId, predExpr: ScalExpr = BoolConst(true)): Unit
Delete rows from a table
Delete rows from a table
- tableId
Table from which the rows are to be deleted
- predExpr
Predicate specifying the rows to be deleted -- if not specified, all rows in the table are deleted
- def drop(id: String): Unit
Drop the object with the given id from the schema
- def drop(id: SchemaObjectId): Unit
Drop the object with the given id from the schema
- def dropIndex(stmt: SqlDropIndex): Unit
Drop the specified index
- def dropTemporaryObjects(): Unit
Drop all temporary duration objects in the schema
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def executeNativeStatement(locId: LocationId, stmtStr: String): Unit
Execute a native statement at the specified location
Execute a native statement at the specified location
- locId
Location at which to execute the given statement
- stmtStr
The statement to be executed (not interpreted by Sclera)
- def explain(relExpr: RelExpr): TableResult
A list of rows explaining the evaluation plan for the given relational expression, structured as a query result
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def handleAdminQueryStatement(aqstmt: SqlAdminQueryStatement): TableResult
Handle a parsed admin query statement
Handle a parsed admin query statement
- aqstmt
Parsed admin statement
- returns
Result of evaluating the statement
- def handleAdminStatement(astmt: SqlAdminStatement): Unit
Handle a parsed admin statement
Handle a parsed admin statement
- astmt
Parsed admin statement
- def handleListQuery[T](relExpr: RelExpr, f: (TableRow) => T): List[T]
Handle a query specified as a relational expression.
Handle a query specified as a relational expression. The result should be finite for the call to complete.
- relExpr
Relational expression to be evaluated
- f
Function to handle each row of the returned result
- returns
The list of the values returned by the function
f
on each row
- def handleQuery[T](query: RelExpr, f: (TableResult) => T): T
Handle a query specified as a relational expression
Handle a query specified as a relational expression
- query
Relational expression to be evaluated
- f
Function to handle the returned result. The result should not be closed by the function, it will be closed automatically when done.
- def handleQueryStatement[T](qstmt: SqlRelQueryStatement, f: (TableResult) => T): T
Handle a parsed query statement
Handle a parsed query statement
- qstmt
Parsed query statement
- f
Function to handle the returned result. The result should not be closed by the function, it will be closed automatically when done.
- def handleSingletonQuery[T](relExpr: RelExpr, f: (TableRow) => T): Option[T]
Handle a singleton query specified as a relational expression.
Handle a singleton query specified as a relational expression. The query result should have at most one row.
- relExpr
Relational expression to be evaluated
- f
Function to handle the returned result. The result should not be closed by the function, it will be closed automatically when done.
- returns
If the result is empty then
None
, otherwise the value computed by functionf
on the result row, wrapped inSome
.
- def handleStatement(ustr: String): Unit
Handle an update or admin statement
Handle an update or admin statement
- ustr
Statement string
- def handleStatement[T](qstr: String, f: (TableResult) => T): T
Handle a query statement
Handle a query statement
- qstr
Query string
- f
Function to handle the returned result. The result should not be closed by the function, it will be closed automatically when done.
- def handleUpdateStatement(ustmt: SqlUpdateStatement): Option[Int]
Handle a parsed update statement
Handle a parsed update statement
- ustmt
Parsed update statement
- returns
Number of rows affected, if available
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def init(): Unit
Initialize
- def insert(tableRef: TableRefTarget, dataColumns: List[Column], dataRows: Iterator[TableRow]): Unit
Insert rows into a table
Insert rows into a table
- tableRef
Table into which the rows are to be inserted
- dataColumns
Column metadata for the rows to be inserted
- dataRows
Iterator providing the rows to be inserted
- def insert(tableRef: TableRefTarget, relExpr: RelExpr): Unit
Evaluate a relational expression and insert the result into a table
Evaluate a relational expression and insert the result into a table
- tableRef
Table into which the result is to be inserted
- relExpr
Relational expression to be evaluated
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def listLocations: TableResult
List of all the locations, structured as a query result
- def listObjects(dbObjects: List[(SchemaObject, DbObjectDuration)], format: Format): TableResult
List the given objects in the given format
List the given objects in the given format
- dbObjects
List of objects with their duration
- format
Output format
- returns
The list in the specified format, structured as a query result
- def locationDbHandler(locationId: LocationId): DbHandler
Handler for the specified location
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val normalizer: Normalizer
Statement normalizer
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val parser: SqlParser
ScleraSQL and admin statement parser
- val planExplain: PlanExplain
Statement execution plan explainer (needed for EXPLAIN commands)
- def planQuery(expr: RelExpr, maxRowsOpt: Option[Int] = None): RelEvalPlan
Plan the given query, with a limit on number of result rows if specified (needed by the JDBC driver)
- def planQuery(s: SqlRelQueryStatement, maxRowsOpt: Option[Int]): RelEvalPlan
Plan the given query (needed by the JDBC driver)
- val planner: Planner
Statement execution planner
- def queryResult(preparedRelExpr: RelExpr): TableResult
Evaluate a prepared relational expression.
Evaluate a prepared relational expression. Convenience method, not to be called directly by applications.
- def remainingTables(locIdOpt: Option[LocationId]): List[(SchemaTable, DbObjectDuration)]
Tables at a location (all locations if not specified) not yet added to the schema
- def removeTable(tableId: TableId): Unit
Remove the specified table from the schema
- val scalExprEvaluator: ScalExprEvaluator
Scalar expression evaluator
- lazy val schema: Schema
Associated schema object
- val schemaDb: String
- def showConfig: TableResult
The list of configuration parameters, structured as a query result
- def showOptions: TableResult
The list of configuration options, structured as a query result
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def updateBatch(stmts: List[SqlUpdateTable]): Unit
Execute a batch of update statements
- def updateTable(stmt: SqlUpdateTable): Unit
Update the rows of a table
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])