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

Latest commit

 

History

History
39 lines (32 loc) · 1.4 KB

db.select.md

File metadata and controls

39 lines (32 loc) · 1.4 KB

db.select

The select function is established to execute SELECT SQL. Its return is an instance of the Record class.

Sample

	var record1 = db.select("helloWorld", "selectUser", {
		"country" : "China"
	}).sort("years", "asc");
	var record2 = db
			.select("select * from table_user where country='China' order years asc");

API

CallingReturning
db . select ( groupId , sqlId , params )Record
db . select ( groupId , sqlId , params , jdbcResourceName )
db . select ( sql )
db . select ( 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.