[Helma-user] get HopObject datatype
Julian Tree
julian.tree at gmail.com
Mon Aug 14 20:05:30 CEST 2006
any word on this one?
There got to be a way to access META info on a HopObject, such as the
name of the memeber, datatype, length of all the members of a
HopObject.
Right now if I do
var job = new Job();
//I can't loop through jobs because all the members of Job are null.
for(var i in job){
res.debug(job[i]); // won't hit anything
}
There should be a function such as
function getHopObjectMap(hopObjectName)
var jobMap = getHopObject('Job');
req.debut(uneval(jobMap));
// outputs
{
creationtime : { datatype: 'date', not_null: true },
creator : { datatype: 'varchar', length: 20, not_null: true },
job_name : { datatype: 'string', length: 70, not_null: true }
job_desciption : { datatype: 'string', length: 70, not_null: true }
}
It seems like it should be to hard to implement. All the information
is already there. but I don't know Helma's source code well enough.
On 8/8/06, Julian Tree <julian.tree at gmail.com> wrote:
> I know this should be possible, but just don't know how to go about it
>
> How to get the datatype of memebers of a hopobject
>
> lets say the hopobject is setup as below
>
> Company/type.properties
> _db = filepressdb
> _table = company
> _id = company_id
> _idgen = company_company_id_seq
> _name = company_name
> creator = creator
> creationtime = creationtime
> modifier = modifier
> contact_name = contact_name
> company_name = company_name
> email = email
> company_type = company_type
>
>
> Is there anyway to tell whether the
> Company.creationtime is a timestamp,
> Company.email is a varchar,
> Company._id is an integer
>
> That information is from the database, is it recorded in a hash or
> object somewhere when the applciation starts?
>
More information about the Helma-user
mailing list