public void processRequest() throws TeiidComponentException, TeiidProcessingException { LogManager.logDetail(LogConstants.CTX_DQP, this.requestId, "executing", this.requestMsg.isPreparedStatement()?"prepared":"", this.requestMsg.getCommandString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ initMetadata(); generatePlan(false); createProcessor(); }
public void processRequest() throws TeiidComponentException, TeiidProcessingException { LogManager.logDetail(LogConstants.CTX_DQP, this.requestId, "executing", this.requestMsg.isPreparedStatement()?"prepared":"", this.requestMsg.getCommandString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ initMetadata(); generatePlan(false); createProcessor(); }
public void processRequest() throws TeiidComponentException, TeiidProcessingException { LogManager.logDetail(LogConstants.CTX_DQP, this.requestId, "executing", this.requestMsg.isPreparedStatement()?"prepared":"", this.requestMsg.getCommandString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ initMetadata(); generatePlan(false); postProcessXML(); createProcessor(); }
private Command parseCommand() throws QueryParserException { if (requestMsg.getCommand() != null) { return (Command)requestMsg.getCommand(); } String[] commands = requestMsg.getCommands(); ParseInfo parseInfo = createParseInfo(this.requestMsg, this.workContext.getSession()); QueryParser queryParser = QueryParser.getQueryParser(); if (requestMsg.isPreparedStatement() || requestMsg.isCallableStatement() || !requestMsg.isBatchedUpdate()) { String commandStr = commands[0]; if (preParser != null) { commandStr = preParser.preParse(commandStr, this.context); } return queryParser.parseCommand(commandStr, parseInfo); } List<Command> parsedCommands = new ArrayList<Command>(commands.length); for (int i = 0; i < commands.length; i++) { String updateCommand = commands[i]; if (preParser != null) { updateCommand = preParser.preParse(updateCommand, this.context); } parsedCommands.add(queryParser.parseCommand(updateCommand, parseInfo)); } return new BatchedUpdateCommand(parsedCommands); }
private Command parseCommand() throws QueryParserException { if (requestMsg.getCommand() != null) { return (Command)requestMsg.getCommand(); } String[] commands = requestMsg.getCommands(); ParseInfo parseInfo = createParseInfo(this.requestMsg, this.workContext.getSession()); QueryParser queryParser = QueryParser.getQueryParser(); if (requestMsg.isPreparedStatement() || requestMsg.isCallableStatement() || !requestMsg.isBatchedUpdate()) { String commandStr = commands[0]; if (preParser != null) { commandStr = preParser.preParse(commandStr, this.context); } return queryParser.parseCommand(commandStr, parseInfo); } List<Command> parsedCommands = new ArrayList<Command>(commands.length); for (int i = 0; i < commands.length; i++) { String updateCommand = commands[i]; if (preParser != null) { updateCommand = preParser.preParse(updateCommand, this.context); } parsedCommands.add(queryParser.parseCommand(updateCommand, parseInfo)); } return new BatchedUpdateCommand(parsedCommands); }
private Command parseCommand() throws QueryParserException { if (requestMsg.getCommand() != null) { return (Command)requestMsg.getCommand(); } String[] commands = requestMsg.getCommands(); ParseInfo parseInfo = createParseInfo(this.requestMsg, this.workContext.getSession()); QueryParser queryParser = QueryParser.getQueryParser(); if (requestMsg.isPreparedStatement() || requestMsg.isCallableStatement() || !requestMsg.isBatchedUpdate()) { String commandStr = commands[0]; if (preParser != null) { commandStr = preParser.preParse(commandStr, this.context); } return queryParser.parseCommand(commandStr, parseInfo); } List<Command> parsedCommands = new ArrayList<Command>(commands.length); for (int i = 0; i < commands.length; i++) { String updateCommand = commands[i]; if (preParser != null) { updateCommand = preParser.preParse(updateCommand, this.context); } parsedCommands.add(queryParser.parseCommand(updateCommand, parseInfo)); } return new BatchedUpdateCommand(parsedCommands); }
@Test public void testSerialize() throws Exception { RequestMessage copy = UnitTestUtil.helpSerialize(example()); assertTrue(copy.isCallableStatement()); assertEquals(100, copy.getFetchSize()); assertNotNull(copy.getParameterValues()); assertEquals(4, copy.getParameterValues().size()); assertEquals(new Integer(100), copy.getParameterValues().get(0)); assertEquals(new Integer(200), copy.getParameterValues().get(1)); assertEquals(new Integer(300), copy.getParameterValues().get(2)); assertEquals(new Integer(400), copy.getParameterValues().get(3)); assertFalse(copy.isPreparedStatement()); assertEquals("myStyleSheet", copy.getStyleSheet()); //$NON-NLS-1$ assertEquals("myExecutionPayload", copy.getExecutionPayload()); //$NON-NLS-1$ assertEquals(RequestMessage.TXN_WRAP_ON, copy.getTxnAutoWrapMode()); assertEquals(ShowPlan.ON, copy.getShowPlan()); assertEquals(1313, copy.getRowLimit()); assertTrue(copy.isReturnAutoGeneratedKeys()); assertTrue(copy.isDelaySerialization()); assertEquals("foo", copy.getSpanContext()); }
requestMsg.setFetchSize(Math.min(requestMsg.getFetchSize(), this.config.getMaxRowsFetchSize())); Request request = null; if ( requestMsg.isPreparedStatement() || requestMsg.isCallableStatement() || requestMsg.getRequestOptions().isContinuous()) { request = new PreparedStatementRequest(prepPlanCache); } else {
assertTrue("RequestMessage.isBatchedUpdate should be true", statement.requestMessage.isBatchedUpdate()); //$NON-NLS-1$ assertFalse("RequestMessage.isCallableStatement should be false", statement.requestMessage.isCallableStatement()); //$NON-NLS-1$ assertTrue("RequestMessage.isPreparedStatement should be true", statement.requestMessage.isPreparedStatement()); //$NON-NLS-1$
requestMsg.setFetchSize(Math.min(requestMsg.getFetchSize(), this.config.getMaxRowsFetchSize())); Request request = null; if ( requestMsg.isPreparedStatement() || requestMsg.isCallableStatement() || requestMsg.getRequestOptions().isContinuous()) { request = new PreparedStatementRequest(prepPlanCache); } else {
requestMsg.setFetchSize(Math.min(requestMsg.getFetchSize(), this.config.getMaxRowsFetchSize())); Request request = null; if ( requestMsg.isPreparedStatement() || requestMsg.isCallableStatement() || requestMsg.getRequestOptions().isContinuous()) { request = new PreparedStatementRequest(prepPlanCache); } else {