public class ClientLogic extends Object
| Constructor and Description |
|---|
ClientLogic() |
| Modifier and Type | Method and Description |
|---|---|
String |
clientLogicMessage(String originalMessage)
Applies client logic to extract client logic data inside error messages into user input
|
void |
close()
Closes the connection to the database
|
protected void |
finalize()
if finalize called make sure the connectiion is cloased
|
String |
getStatementName() |
boolean |
isActive() |
static boolean |
isClientLogicField(int dataType)
Check if oid of returned type is a client logic field
|
void |
linkClientLogic(String databaseName,
PgConnection jdbcConn)
Link the client logic JNI & C side to the PgConnection instance
|
String |
prepareQuery(String query,
String statement_name)
prepare a query
|
List<String> |
replaceStatementParams(String statementName,
List<String> paramValues)
Replaces client logic parameter values in a prepared statement
|
String |
runClientLogic(String data2Process,
int dataType)
Runs client logic on fields to get back the user format
|
void |
runQueryPostProcess()
Runs the post query function - executed after the query has completed
|
String |
runQueryPreProcess(String originalQuery)
Runs the pre-process function of the client logic
to change the client logic fields from the user input to the client logic format
|
public void close()
protected void finalize()
public void linkClientLogic(String databaseName, PgConnection jdbcConn) throws ClientLogicException
databaseName - database namejdbcConn - the JDBC connection object to be used to select cache data withClientLogicExceptionpublic String runQueryPreProcess(String originalQuery) throws ClientLogicException
originalQuery - query to modify with user inputClientLogicExceptionpublic void runQueryPostProcess()
throws ClientLogicException
ClientLogicExceptionpublic String runClientLogic(String data2Process, int dataType) throws ClientLogicException
data2Process - the client logic datadataType - the OID of the user dataClientLogicExceptionpublic boolean isActive()
public static boolean isClientLogicField(int dataType)
dataType - oid of data typepublic String prepareQuery(String query, String statement_name) throws ClientLogicException
query - the query SQLstatement_name - the statement nameClientLogicExceptionpublic List<String> replaceStatementParams(String statementName, List<String> paramValues) throws ClientLogicException
statementName - the name of the statement - the one used in the prepareQuery methodparamValues - the list of current valuesClientLogicExceptionpublic String getStatementName()
Copyright © 2023 openGauss. All rights reserved.