2016-09-26 09:28:47 +00:00
|
|
|
|
|
|
|
var Dml = require ('./dml');
|
|
|
|
|
2015-01-23 13:09:30 +00:00
|
|
|
/**
|
|
|
|
* The equivalent of a SQL insert.
|
2022-05-26 06:08:31 +00:00
|
|
|
*/
|
2016-09-26 09:28:47 +00:00
|
|
|
module.exports = new Class
|
2015-01-23 13:09:30 +00:00
|
|
|
({
|
2016-09-26 09:28:47 +00:00
|
|
|
Extends: Dml
|
2015-01-23 13:09:30 +00:00
|
|
|
|
2022-05-30 01:30:33 +00:00
|
|
|
,render: function (params)
|
2015-01-23 13:09:30 +00:00
|
|
|
{
|
2022-05-30 01:30:33 +00:00
|
|
|
return 'INSERT INTO'
|
|
|
|
+ this.renderTarget (params)
|
|
|
|
+ ' ('
|
|
|
|
+ this.renderListWs (this.field, params, ', ')
|
|
|
|
+ ') VALUES ('
|
|
|
|
+ this.renderListWs (this.expr, params, ', ')
|
|
|
|
+ ')';
|
2015-01-23 13:09:30 +00:00
|
|
|
}
|
|
|
|
})
|