public class ExecutorImpl extends Object implements Executor
SqlGateway
and execute statements.Constructor and Description |
---|
ExecutorImpl(DefaultContext defaultContext,
InetSocketAddress gatewayAddress,
String sessionId) |
ExecutorImpl(DefaultContext defaultContext,
InetSocketAddress gatewayAddress,
String sessionId,
RowFormat rowFormat) |
ExecutorImpl(DefaultContext defaultContext,
URL gatewayUrl,
String sessionId) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the
Executor and process all exceptions. |
List<String> |
completeStatement(String statement,
int position)
Returns a list of completion hints for the given statement at the given position.
|
void |
configureSession(String statement)
Configures session with statement.
|
StatementResult |
executeStatement(String statement)
Execute statement.
|
ReadableConfig |
getSessionConfig()
Get the configuration of the session.
|
Map<String,String> |
getSessionConfigMap()
Get the map configuration of the session.
|
SessionHandle |
getSessionHandle() |
public ExecutorImpl(DefaultContext defaultContext, InetSocketAddress gatewayAddress, String sessionId)
public ExecutorImpl(DefaultContext defaultContext, InetSocketAddress gatewayAddress, String sessionId, RowFormat rowFormat)
public ExecutorImpl(DefaultContext defaultContext, URL gatewayUrl, String sessionId)
public void configureSession(String statement)
Executor
configureSession
in interface Executor
statement
- to initialize the sessionpublic ReadableConfig getSessionConfig()
Executor
getSessionConfig
in interface Executor
public Map<String,String> getSessionConfigMap()
Executor
getSessionConfigMap
in interface Executor
public StatementResult executeStatement(String statement)
Executor
executeStatement
in interface Executor
statement
- to executepublic List<String> completeStatement(String statement, int position)
Executor
completeStatement
in interface Executor
statement
- Partial or slightly incorrect SQL statementposition
- cursor positionpublic void close()
Executor
Executor
and process all exceptions.@VisibleForTesting public SessionHandle getSessionHandle()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.