hedera-web/js/sql/field.js

32 lines
447 B
JavaScript
Raw Normal View History

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