/** * Construct a new context. */ public CommandContext(String connectionID, String userName, Serializable commandPayload, String vdbName, Object vdbVersion, boolean collectNodeStatistics) { setConnectionID(connectionID); setUserName(userName); setCommandPayload(commandPayload); setVdbName(vdbName); setVdbVersion(vdbVersion.toString()); setCollectNodeStatistics(collectNodeStatistics); }
/** * Construct a new context. */ public CommandContext(String connectionID, String userName, Serializable commandPayload, String vdbName, Object vdbVersion, boolean collectNodeStatistics) { setConnectionID(connectionID); setUserName(userName); setCommandPayload(commandPayload); setVdbName(vdbName); setVdbVersion(vdbVersion.toString()); setCollectNodeStatistics(collectNodeStatistics); }
/** * Construct a new context. */ public CommandContext(String connectionID, String userName, Serializable commandPayload, String vdbName, Object vdbVersion, boolean collectNodeStatistics) { setConnectionID(connectionID); setUserName(userName); setCommandPayload(commandPayload); setVdbName(vdbName); setVdbVersion(vdbVersion.toString()); setCollectNodeStatistics(collectNodeStatistics); }
public ExecutionContextImpl(String vdbName, Object vdbVersion, Serializable executionPayload, String originalConnectionID, String connectorName, long requestId, String partId, String execCount) { commandContext = new CommandContext(); commandContext.setVdbName(vdbName); commandContext.setVdbVersion(vdbVersion.toString()); commandContext.setCommandPayload(executionPayload); commandContext.setConnectionID(originalConnectionID); commandContext.setRequestId(new RequestID(originalConnectionID, requestId)); this.connectorName = connectorName; this.partID = partId; this.executeCount = execCount; }
public ExecutionContextImpl(String vdbName, Object vdbVersion, Serializable executionPayload, String originalConnectionID, String connectorName, long requestId, String partId, String execCount) { commandContext = new CommandContext(); commandContext.setVdbName(vdbName); commandContext.setVdbVersion(vdbVersion.toString()); commandContext.setCommandPayload(executionPayload); commandContext.setConnectionID(originalConnectionID); commandContext.setRequestId(new RequestID(originalConnectionID, requestId)); this.connectorName = connectorName; this.partID = partId; this.executeCount = execCount; }
public ExecutionContextImpl(String vdbName, Object vdbVersion, Serializable executionPayload, String originalConnectionID, String connectorName, long requestId, String partId, String execCount) { commandContext = new CommandContext(); commandContext.setVdbName(vdbName); commandContext.setVdbVersion(vdbVersion.toString()); commandContext.setCommandPayload(executionPayload); commandContext.setConnectionID(originalConnectionID); commandContext.setRequestId(new RequestID(originalConnectionID, requestId)); this.connectorName = connectorName; this.partID = partId; this.executeCount = execCount; }
@Test public void testRewriteExec() throws Exception { Command command = QueryParser.getQueryParser().parseCommand("exec pm1.sq2(session_id())"); //$NON-NLS-1$ QueryResolver.resolveCommand(command, RealMetadataFactory.example1Cached()); CommandContext context = new CommandContext(); context.setConnectionID("1"); Command rewriteCommand = QueryRewriter.rewrite(command, RealMetadataFactory.example1Cached(), context); assertEquals("EXEC pm1.sq2('1')", rewriteCommand.toString()); //$NON-NLS-1$ }