0
1
Fork 0
hedera-web-mindshore/js/sql/field.js

33 lines
450 B
JavaScript

var Expr = require ('./expr');
/**
* The equivalent of a SQL field.
*
* @param {string} taget The name of the owner table
*/
module.exports = new Class
({
Extends: Expr
,Tag: 'sql-field'
,Properties:
{
name:
{
type: String
,value: null
},
target:
{
type: String
,value: null
}
}
,render: function (batch)
{
var sql = (this.target) ? '`' + this.target + '`.' : '';
return sql + '`' + this.name + '`';
}
});