public class DynamicSqlUtils extends Object
Constructor and Description |
---|
DynamicSqlUtils() |
Modifier and Type | Method and Description |
---|---|
String |
getDeleteStatement(String tableName,
String schema,
String pKey)
This method creates Data Delete SQL Statement
DELETE from [table name] where [field name] = 'whatever';
|
String |
getInsertStatement(String tableName,
String schema,
List<String> param)
This method creates Data Insertion SQL Statement
INSERT INTO tableName(c1,c2,c3) VALUES(p1,p2,p3)
|
String |
getProcedureInvokeStatement(String proceName) |
String |
getSelectAll(String tableName,
String schema,
String columnNames)
select All SQL Statement
SELECT * FROM [table name];
|
String |
getSelectByKey(String tableName,
String schema,
String pKey,
String columnNames)
This method creates select by key, SQL Statement
SELECT * FROM [table name] WHERE [field name] = "whatever";
|
String |
getUpdateStatement(String tableName,
String schema,
List<String> param2,
String pKey)
This method creates Data Update SQL Statement
UPDATE [table name] SET Select_prev = 'Y',Update_prev = 'Y' where [field
name] = 'user';
|
public String getSelectAll(String tableName, String schema, String columnNames)
tableName
- -table Name of the given tableschema
- the database schemapublic String getSelectByKey(String tableName, String schema, String pKey, String columnNames)
tableName
- -table Name of the given tableschema
- the database schemapKey
- -primary key of tablepublic String getInsertStatement(String tableName, String schema, List<String> param)
param
- -List of parameters valuestableName
- -table Name of the given tableschema
- the database schemapublic String getUpdateStatement(String tableName, String schema, List<String> param2, String pKey)
param2
- -List of parameters valuestableName
- -table Name of the given tableschema
- the database schemapKey
- -primary key of tablepublic String getDeleteStatement(String tableName, String schema, String pKey)
tableName
- -table Name of the given tableschema
- the database schemapKey
- -primary key of tableCopyright © 2019 WSO2. All rights reserved.