Package org.apache.calcite.jdbc
Interface CalcitePrepare
- All Known Implementing Classes:
CalcitePrepareImpl
public interface CalcitePrepare
API for a service that prepares statements for execution.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
The result of analyzing a view.static class
The result of preparing a query.static interface
Context for preparing a statement.static class
The result of parsing and validating a SQL query and converting it to relational algebra.static class
Namespace that allows us to define non-abstract methods inside an interface.static class
The result of parsing and validating a SQL query.static class
static interface
Callback to register Spark as the main engine. -
Field Summary
Modifier and TypeFieldDescriptionstatic final Function0<CalcitePrepare>
static final TryThreadLocal<Deque<CalcitePrepare.Context>>
-
Method Summary
Modifier and TypeMethodDescriptionanalyzeView
(CalcitePrepare.Context context, String sql, boolean fail) Analyzes a view.convert
(CalcitePrepare.Context context, String sql) void
executeDdl
(CalcitePrepare.Context context, SqlNode node) Executes a DDL statement.parse
(CalcitePrepare.Context context, String sql) prepareQueryable
(CalcitePrepare.Context context, Queryable<T> queryable) prepareSql
(CalcitePrepare.Context context, CalcitePrepare.Query<T> query, Type elementType, long maxRowCount)
-
Field Details
-
DEFAULT_FACTORY
-
THREAD_CONTEXT_STACK
-
-
Method Details
-
parse
-
convert
-
executeDdl
Executes a DDL statement.The statement identified itself as DDL in the
CalcitePrepare.ParseResult.kind()
field. -
analyzeView
CalcitePrepare.AnalyzeViewResult analyzeView(CalcitePrepare.Context context, String sql, boolean fail) Analyzes a view.- Parameters:
context
- Contextsql
- View SQLfail
- Whether to fail (and throw a descriptive error message) if the view is not modifiable- Returns:
- Result of analyzing the view
-
prepareSql
<T> CalcitePrepare.CalciteSignature<T> prepareSql(CalcitePrepare.Context context, CalcitePrepare.Query<T> query, Type elementType, long maxRowCount) -
prepareQueryable
<T> CalcitePrepare.CalciteSignature<T> prepareQueryable(CalcitePrepare.Context context, Queryable<T> queryable)
-