public abstract class KdbQuery extends Object implements AutoCloseable
Contains base connectivity (wrapping KdbConnection
) and some wrapper functions
around the abstract query(String)
function
(c) 2014 - 2015 Sport Trades Ltd
Modifier and Type | Field and Description |
---|---|
(package private) KdbConnection |
connection
The connection to use to query the kdb process
|
Constructor and Description |
---|
KdbQuery(KdbConnection existingConnection)
Constructs a new query object, re-using the specified connection object.
|
KdbQuery(KdbProcess target)
Constructs a new query object, first opening an connection to the specified process
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the underlying kdb connection
|
abstract Object |
query(String query)
Method to query a kdb process with a string argument only.
|
abstract Object |
query(String query,
KdbDict arguments)
Method to query a kdb process with a function name and a dictionary argument.
|
KdbConnection connection
public KdbQuery(KdbProcess target) throws KdbTargetProcessUnavailableException
target
- The kdb process to connect to, ready for queryingKdbTargetProcessUnavailableException
- If the process is unavailablepublic KdbQuery(KdbConnection existingConnection) throws KdbTargetProcessUnavailableException
existingConnection
- The existing connection object to use.KdbTargetProcessUnavailableException
public void close()
close
in interface AutoCloseable
KdbConnection.disconnect()
public abstract Object query(String query) throws QueryExecutionFailedException
"aFunction[]"
or "aFunctionWithArgs[1;`symbol]
.query
- The string query to executeQueryExecutionFailedException
- If the query fails for any reasonpublic abstract Object query(String query, KdbDict arguments) throws QueryExecutionFailedException
query
- The function to executearguments
- The dictionary of argumentsQueryExecutionFailedException
- If the query fails for any reasonCopyright © 2017. All rights reserved.