The change function is established to execute INSERT UPDATE or DELETE SQL.
The return is the count of modefied records.
db.change("helloWorld", "DeleteUser", {
"country" : "China"
});
var count = db.change("delete * from table_user where country='China'");
Calling | Returning |
db . change ( groupId , sqlId , params ) | Number |
db . change ( groupId , sqlId , params , jdbcResourceName ) |
db . change ( sql ) |
db . change ( sql , jdbcResourceName ) |
Parameters | Type | Description |
groupId | String | "SubFolder/FileName". SubFolder is relatived from efw.sql.folder. FileName is the name of a SQL xml file. |
sqlId | String | The id of a sql tag in a SQL xml file. |
params | JSON Object |
To send values which is requried by the SQL defined in the SQL xml file.
{"param1":value1,"param2":value2,...}
|
jdbcResourceName | String | To execute SQL in another database resource, but not the default.
|
sql | String | To execute a pure SQL string. |