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

42 lines
583 B
JavaScript

var SqlObject = require ('./object');
var Value = require ('./value');
/**
* A holder for another object.
*/
module.exports = new Class
({
Extends: SqlObject
,Properties:
{
id:
{
type: String
,value: null
}
}
,render: function (params)
{
if (params)
{
var object = params[this.id];
if (object !== undefined)
{
if (!(object instanceof SqlObject))
{
var sqlValue = new Value ();
sqlValue.value = object;
return sqlValue.render ();
}
else
return object.render (params);
}
}
return '#'+ this.id;
}
});