Java Code Examples for org.apache.calcite.avatica.Meta#StatementType
The following examples show how to use
org.apache.calcite.avatica.Meta#StatementType .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CalcitePrepare.java From Quicksql with MIT License | 6 votes |
public CalciteSignature(String sql, List<AvaticaParameter> parameterList, Map<String, Object> internalParameters, RelDataType rowType, List<ColumnMetaData> columns, Meta.CursorFactory cursorFactory, CalciteSchema rootSchema, List<RelCollation> collationList, long maxRowCount, Bindable<T> bindable, Meta.StatementType statementType) { super(columns, sql, parameterList, internalParameters, cursorFactory, statementType); this.rowType = rowType; this.rootSchema = rootSchema; this.collationList = collationList; this.maxRowCount = maxRowCount; this.bindable = bindable; }
Example 2
Source File: CalcitePrepare.java From calcite with Apache License 2.0 | 6 votes |
public CalciteSignature(String sql, List<AvaticaParameter> parameterList, Map<String, Object> internalParameters, RelDataType rowType, List<ColumnMetaData> columns, Meta.CursorFactory cursorFactory, CalciteSchema rootSchema, List<RelCollation> collationList, long maxRowCount, Bindable<T> bindable, Meta.StatementType statementType) { super(columns, sql, parameterList, internalParameters, cursorFactory, statementType); this.rowType = rowType; this.rootSchema = rootSchema; this.collationList = collationList; this.maxRowCount = maxRowCount; this.bindable = bindable; }
Example 3
Source File: CalcitePrepareImpl.java From Quicksql with MIT License | 5 votes |
/** * Deduces the broad type of statement. * Currently returns SELECT for most statement types, but this may change. * * @param kind Kind of statement */ private Meta.StatementType getStatementType(SqlKind kind) { switch (kind) { case INSERT: case DELETE: case UPDATE: return Meta.StatementType.IS_DML; default: return Meta.StatementType.SELECT; } }
Example 4
Source File: CalcitePrepareImpl.java From Quicksql with MIT License | 5 votes |
/** * Deduces the broad type of statement for a prepare result. * Currently returns SELECT for most statement types, but this may change. * * @param preparedResult Prepare result */ private Meta.StatementType getStatementType(Prepare.PreparedResult preparedResult) { if (preparedResult.isDml()) { return Meta.StatementType.IS_DML; } else { return Meta.StatementType.SELECT; } }
Example 5
Source File: JdbcMeta.java From calcite-avatica with Apache License 2.0 | 5 votes |
protected static Signature signature(ResultSetMetaData metaData, ParameterMetaData parameterMetaData, String sql, Meta.StatementType statementType) throws SQLException { final CursorFactory cf = CursorFactory.LIST; // because JdbcResultSet#frame return new Signature(columns(metaData), sql, parameters(parameterMetaData), null, cf, statementType); }
Example 6
Source File: QuarkMetaImpl.java From quark with Apache License 2.0 | 5 votes |
protected static Signature signature(ResultSetMetaData metaData, ParameterMetaData parameterMetaData, String sql, Meta.StatementType statementType) throws SQLException { final CursorFactory cf = CursorFactory.ARRAY; // because JdbcResultSet#frame return new Signature(columns(metaData), sql, parameters(parameterMetaData), null, cf, statementType); }
Example 7
Source File: CalcitePrepareImpl.java From calcite with Apache License 2.0 | 5 votes |
/** * Deduces the broad type of statement. * Currently returns SELECT for most statement types, but this may change. * * @param kind Kind of statement */ private Meta.StatementType getStatementType(SqlKind kind) { switch (kind) { case INSERT: case DELETE: case UPDATE: return Meta.StatementType.IS_DML; default: return Meta.StatementType.SELECT; } }
Example 8
Source File: CalcitePrepareImpl.java From calcite with Apache License 2.0 | 5 votes |
/** * Deduces the broad type of statement for a prepare result. * Currently returns SELECT for most statement types, but this may change. * * @param preparedResult Prepare result */ private Meta.StatementType getStatementType(Prepare.PreparedResult preparedResult) { if (preparedResult.isDml()) { return Meta.StatementType.IS_DML; } else { return Meta.StatementType.SELECT; } }