hedera-web/js/sql/table.js

40 lines
490 B
JavaScript
Raw Normal View History

2016-09-26 09:28:47 +00:00
var Target = require ('./target');
/**
2016-09-26 09:28:47 +00:00
* Represents a database table.
2016-12-20 09:32:17 +00:00
*/
2016-09-26 09:28:47 +00:00
module.exports = new Class
({
2016-09-26 09:28:47 +00:00
Extends: Target
,Properties:
{
name:
{
type: String
,value: null
},
2017-11-13 16:36:30 +00:00
alias:
{
type: String
,value: null
},
schema:
{
type: String
,value: null
}
}
2017-11-13 16:36:30 +00:00
,render: function ()
{
2017-11-16 14:53:20 +00:00
var sql = this.renderPreIdent (this.schema)
+ this.renderIdent (this.name);
2017-11-13 16:36:30 +00:00
if (this.alias)
2017-11-16 14:53:20 +00:00
sql += ' AS '+ this.renderIdent (this.alias);
2017-11-13 16:36:30 +00:00
return sql;
}
});