forked from verdnatura/hedera-web
34 lines
466 B
JavaScript
34 lines
466 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() {
|
|
var sql = this.renderPreIdent(this.schema)
|
|
+ this.renderIdent(this.name);
|
|
|
|
if (this.alias)
|
|
sql += ' AS '+ this.renderIdent(this.alias);
|
|
|
|
return sql;
|
|
}
|
|
});
|