Hi,
I have a PostgreSQL table-returning function:
e.g. matched_devices(device_id uuid, tolerance integer, num_matches
integer);
I would like to use the dataset of the results from calling this in a
Sequel::Model, e.g.
class MatchedDevices < Sequel::Model
def is_faulty?
self[:faulty]
end
end
I can get a dataset using
MatchedDevices.from{matched_devices('f165fd3b-9dfd-422a-9a73-9aea9c981fef',
10, 0)}, and I can use the results of the recordset within the model as
hash values (per is_faulty?).
Ideally I would like to have each value accessible as a regular
property/method, as one would get if this model were backed by a regular
table.
If anyone can help me, that would be awesome.
Cheers
Steve
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.