public class ClientLogicImpl extends Object
| Constructor and Description |
|---|
ClientLogicImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
close()
closes the backend libpq connection - must be called when the java connectyion is closed.
|
Object[] |
fetchDataFromQuery(String query)
This method is being invoked from the client logic c++ code
It is used to fetch data from the server regarding the client logic settings - cache manager
|
protected void |
finalize()
Standard java method
|
long |
getHandle()
getter function to get the handler
|
Object[] |
linkClientLogic(String databaseName,
PgConnection jdbcConn)
Link between the Java PgConnection and the PGConn Client logic object
|
Object[] |
prepareQuery(String query,
String statement_name,
int parameter_count)
Prepare a statement on the backend side
|
Object[] |
replaceErrorMessage(String originalMessage)
Replace binary client logic values in an error message back to user input format
For example changes unique constraint error message from:
...
|
Object[] |
replaceStatementParams(String statementName,
String[] paramValues)
replace parameters values in prepared statement - to be called before binding the parameters and executing the statement
|
Object[] |
runClientLogic(String processData,
int dataType)
Replace client logic field value with user input - used when receiving data in a resultset
|
Object[] |
runQueryPostProcess()
run post process on the backend, to free the client logic state machine when a query is done
|
Object[] |
runQueryPreProcess(String originalQuery)
Run the pre query, to replace client logic field values with binary format before sending the query to the database server
|
void |
setHandle(long handle)
setter function to set the handle
|
public Object[] linkClientLogic(String databaseName, PgConnection jdbcConn)
databaseName - the database namejdbcConn - the JDBC connection to be later use to fetch datapublic Object[] runQueryPreProcess(String originalQuery)
originalQuery - the query with potentially client logic values in user formatpublic Object[] runClientLogic(String processData, int dataType)
processData - the data in binary format (hexa)dataType - the oid (modid) of the original field typepublic Object[] runQueryPostProcess()
public Object[] prepareQuery(String query, String statement_name, int parameter_count)
query - the statement query textstatement_name - the name on the the statementparameter_count - number of parameters in the querypublic Object[] replaceStatementParams(String statementName, String[] paramValues)
statementName - the name of the statementparamValues - array of parameters in user formatpublic Object[] replaceErrorMessage(String originalMessage)
originalMessage - the error message received from the serverprotected void close()
public void setHandle(long handle)
handle - public long getHandle()
public Object[] fetchDataFromQuery(String query)
query - the query to incokeCopyright © 2023 openGauss. All rights reserved.