forked from verdnatura/hedera-web
40 lines
490 B
JavaScript
40 lines
490 B
JavaScript
|
|
var Target = require ('./target');
|
|
|
|
/**
|
|
* Represents a database table.
|
|
*/
|
|
module.exports = new Class
|
|
({
|
|
Extends: Target
|
|
,Properties:
|
|
{
|
|
name:
|
|
{
|
|
type: String
|
|
,value: null
|
|
},
|
|
alias:
|
|
{
|
|
type: String
|
|
,value: null
|
|
},
|
|
schema:
|
|
{
|
|
type: String
|
|
,value: null
|
|
}
|
|
}
|
|
|
|
,render: function ()
|
|
{
|
|
var sql = this.renderPreIdent (this.schema)
|
|
+ this.renderIdent (this.name);
|
|
|
|
if (this.alias)
|
|
sql += ' AS '+ this.renderIdent (this.alias);
|
|
|
|
return sql;
|
|
}
|
|
});
|