|
34 | 34 | import com.arcadedb.network.binary.ChannelBinaryServer; |
35 | 35 | import com.arcadedb.query.sql.SQLQueryEngine; |
36 | 36 | import com.arcadedb.query.sql.executor.BasicCommandContext; |
| 37 | +import com.arcadedb.query.sql.executor.CommandContext; |
37 | 38 | import com.arcadedb.query.sql.executor.IteratorResultSet; |
38 | 39 | import com.arcadedb.query.sql.executor.Result; |
39 | 40 | import com.arcadedb.query.sql.executor.ResultInternal; |
@@ -318,6 +319,7 @@ private void executeCommand() { |
318 | 319 | else { |
319 | 320 | if (!portal.executed) { |
320 | 321 | final Object[] parameters = portal.parameterValues != null ? portal.parameterValues.toArray() : new Object[0]; |
| 322 | + |
321 | 323 | final ResultSet resultSet = portal.sqlStatement.execute(database, parameters, createCommandContext()); |
322 | 324 | portal.executed = true; |
323 | 325 | if (portal.isExpectingResult) { |
@@ -345,8 +347,8 @@ private void executeCommand() { |
345 | 347 | } |
346 | 348 | } |
347 | 349 |
|
348 | | - private BasicCommandContext createCommandContext() { |
349 | | - BasicCommandContext commandContext = new BasicCommandContext(); |
| 350 | + private CommandContext createCommandContext() { |
| 351 | + CommandContext commandContext = new BasicCommandContext(); |
350 | 352 | commandContext.setConfiguration(server.getConfiguration()); |
351 | 353 | return commandContext; |
352 | 354 | } |
@@ -836,7 +838,6 @@ private void parseCommand() { |
836 | 838 | case "sql": |
837 | 839 | final SQLQueryEngine sqlEngine = (SQLQueryEngine) database.getQueryEngine("sql"); |
838 | 840 | portal.sqlStatement = sqlEngine.parse(query.query, (DatabaseInternal) database); |
839 | | - |
840 | 841 | if (portal.query.equalsIgnoreCase("BEGIN") || portal.query.equalsIgnoreCase("BEGIN TRANSACTION")) { |
841 | 842 | explicitTransactionStarted = true; |
842 | 843 | setEmptyResultSet(portal); |
|
0 commit comments