On Nov 21, 2:09 pm, dave lilley <[email protected]> wrote: > Many thanks for the confirmation Jeremy, > > So what is the difference between the way I've done it and MODELS format? > > eg.... > require statements in here > > Class DB > > def Initialize > open DB connection, test for failure > end > > def getallrecs > get a list of all data from a particular table > end > > def save > save data to a particular Table > end > > def find_a_rec(nos) > query table for a record > end > > end > > I mean I have a script (layed out similar to above pesudo code) as a class > that handles all enteraction with the underlaying DB but I pass back a > dataset or act against the DB/Table from within a Method call. > > Is there anything I'd gain from going to a model based approach to datasets? > cheers,
In general, models/ORMs (e.g. Sequel::Model) make it easier to deal with single records. If you are mostly dealing with sets of records and not individual records, then a modeling layer/ORM probably won't be that helpful. Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
