forked from verdnatura/hedera-web
30 lines
417 B
JavaScript
30 lines
417 B
JavaScript
/**
|
|
* The equivalent of a SQL field.
|
|
*
|
|
* @param {string} taget The name of the owner table
|
|
**/
|
|
Sql.Field = new Class
|
|
({
|
|
Extends: Sql.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 + '`';
|
|
}
|
|
});
|