Skip to content

Latest commit

 

History

History
43 lines (33 loc) · 1.37 KB

db.select.md

File metadata and controls

43 lines (33 loc) · 1.37 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.
sqlStringTo execute a pure SQL string.