On 26 Mai, 15:24, Andrzej <ndrwr...@googlemail.com> wrote: > I'd love to see a persistent "table" type together with some common > primitives (select, join, union) and optimization capabilities. > Currently a "set of maps" does something like that but I have no idea > how to, for example, add an "index" to some particular field and use > it in other operations.
Got something around, this is my 3rd or 4th attempt to provide a relational datastructure for clojure. I've often found myself in situations, where I needed some kind of table and look up rows by more than one key, hashmaps don't fit that well. http://gist.github.com/415538 - basically is a hashmap which pretends being a set, and lets you access all 'rows'. Indexes (sorted, hash- map ...), except the primary one, are optional but will of course speed up lookup operations. I have not bothered about persistence yet, maybe in the future, there will be some interface to hook into the clojure STM, or Cells will be become available. Erik -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en