Re: Of Default Values and Ordered Views
Alex Sauer-Budge <[email protected]>
| Newsgroups | gmane.comp.db.metakit |
|---|---|
| Message-ID | <[email protected]> |
--- Alex Sauer-Budge <[email protected]> wrote: > Question 3: Is there a way to directly maintain a > view in order? If not, how can I store the ordered > view (so I don't need to recreate it every time) > and will it be a resource hog? It seems the answer to my question is that creating a new view using: c4_View = db.GetAs("data[obs:I,objs[id:I,val:D]]").Ordered(); and c4_ViewProp pSubView("val"); c4_View subView = pSubView(row).Ordered(); and adding rows as normal does indeed result in the underlying view being ordered in storage. Is this correct? When I later reopen my database for read-only access, do I need to again create the ordered identity view in order to benefit from the faster find, or is this stored in the file along with the view? I think the answer is no, it is not stored and I must recreate the ordered identity view. If this is so, then if I use Search instead of Find will it use the faster search method even if it isn't an Ordered view (that is, I didn't say .Ordered())? The reason I am concerned is that my subviews are randomly accessed and I don't want to repeatedly and unecessarily create ordered identity views whenever they are queried. Metakit is really quite beautiful, thanks for sharing it! Thanks! Alex __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/ _____________________________________________ Metakit mailing list - [email protected] http://www.equi4.com/mailman/listinfo/metakit