use of com.hazelcast.sql.impl.security.SqlSecurityContext in project hazelcast by hazelcast.
the class SqlExecuteMessageTask method call.
@Override
protected Object call() {
SqlSecurityContext sqlSecurityContext = prepareSecurityContext();
SqlStatement query = new SqlStatement(parameters.sql);
for (Data param : parameters.parameters) {
query.addParameter(serializationService.toObject(param));
}
query.setSchema(parameters.schema);
query.setTimeoutMillis(parameters.timeoutMillis);
query.setCursorBufferSize(parameters.cursorBufferSize);
query.setExpectedResultType(SqlExpectedResultType.fromId(parameters.expectedResultType));
SqlServiceImpl sqlService = nodeEngine.getSqlService();
boolean skipUpdateStatistics = parameters.isSkipUpdateStatisticsExists && parameters.skipUpdateStatistics;
return sqlService.execute(query, sqlSecurityContext, parameters.queryId, skipUpdateStatistics);
}
Aggregations