From: Nicholas Van Weerdenburg Date: 2005-01-06T13:20:40+09:00 Subject: Re: Ruby Data Structure Query Abstractions/Patterns On Thu, 6 Jan 2005 10:10:26 +0900, Sam Roberts wrote: > Quoteing vanweerd@gmail.com, on Thu, Jan 06, 2005 at 03:26:22AM +0900: > > Hi all, > > > > I've written a small ruby application that uses YAML and the > > associated hash/array Ruby structure. > > > I am now looking to do some query-like actions on the basic ruby data > > structure. I'm wondering if there are any packages of > > query-abstractions that make sense for Ruby in a generalized sort-of > > way. E.g. XPath and XQuery for XML, SQL for RDMS, etc. > > This is why you might want to consider XML... then you can just USE > XPath. > > Sam > This is looking like the most reasonable choice at the moment- though not the most fun, so I may continue with a Ruby solution for now. Thanks, Nick > > > > Currently I've written my structure-parsing code with a few of my > > cases, and I'm starting to refactor with blocks and lambdas in order > > to keep duplication low and offer an easily configurable higher-level > > of abstraction. Now the code is starting to pressure me to create a > > simple query language. Maybe I should go to a ruby db or sqlite, but I > > expect I ultimately only need the most basic functionality. > > > > Any suggestions or recommendations? > > > > Thanks, > > Nick > > -- > > Nicholas Van Weerdenburg > > > > -- Nicholas Van Weerdenburg