hedera-web/js/sql/holder.js

42 lines
577 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 != null)
{
if (!(object instanceof SqlObject))
{
var sqlValue = new Value ();
sqlValue.value = object;
return sqlValue.render ();
}
else
return object.render (params);
}
}
return '#'+ this.id;
}
});