0
1
Fork 0
hedera-web-mindshore/package/usr/share/hedera-web/js/sql/delete.js

21 lines
319 B
JavaScript
Executable File

/**
* The equivalent of a SQL delete.
**/
Sql.Delete = new Class
({
Extends: Sql.Stmt
,render: function (batch)
{
var sql = 'DELETE FROM ' + this.renderTarget (batch);
if (this.where)
sql += ' WHERE ' + this.where.render (batch);
sql += ' LIMIT 1'; // Only for security.
return sql;
}
});