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

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;
}
});