Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

Latest commit

 

History

History
36 lines (31 loc) · 1.35 KB

db.change.md

File metadata and controls

36 lines (31 loc) · 1.35 KB

db.change

The change function is established to execute UPDATE or DELETE SQL. The return is the count of modefied records.

Sample

	db.change("helloWorld", "DeleteUser", {
		"country" : "China"
	});
	var count = db.change("delete * from table_user where country='China'");

API

CallingReturning
db . change ( groupId , sqlId , params )Number
db . change ( groupId , sqlId , params , jdbcResourceName )
db . change ( sql )
db . change ( sql , jdbcResourceName )
ParametersTypeDescription
groupIdString"SubFolder/FileName". SubFolder is relatived from efw.sql.folder. FileName is the name of a SQL xml file.
sqlIdStringThe id of a sql tag in a SQL xml file.
paramsJSON Object To send values which is requried by the SQL defined in the SQL xml file.
{"param1":value1,"param2":value2,...}
jdbcResourceNameStringTo execute SQL in another database resource, but not the default.
For efw-4iAP, it is shared database id.
sqlStringTo execute a pure SQL string.