Hi, I'm considering to make my database* ActiveRecord compatible. To this end I have some questions, or would appreciate pointers where to ask: - as the db is not sql, I think writing an ActiveRecord/sql adapter isn't really the way to go. But then what is? - I've seen an old Arel had a memory implementation in ruby. As my db is a memory db (in ruby/C) this may be a way, alas the code I see has _little_ comments. Has anyone attempted such a thing (ie a non-sql implementation in arel) - is there a specific activerecord /arel mailing list ? Thanks for any pointers (and sorry this is somewhat of-topic for most) Torsten *warpdb is a memory object(ish) database for ruby http://github.com/dancinglightning/warpdb It works for basic things, but has yet to see a real project, so you've been warned.
on 2010-10-02 19:15
on 2010-10-02 19:35
On Oct 2, 4:31 pm, dancinglightning <tors...@lightning.nu> wrote: > Hi, > > I'm considering to make my database* ActiveRecord compatible. To this > end I have some questions, or would appreciate pointers where to ask: > Do you really mean ActiveRecord compatible or do you just want to implement the ActiveModel interface ? Fred
on 2010-10-02 21:39
I think that your problem is not non-sql database. Arel is "Relational Algebra for Ruby", so since you use non-relational DB, it's not a good idea to implement any adapters for Arel. But, Rails 3 has changed ActiveRecord's model architect (e.g. added ActiveModel), so you should try to implement some adapter for ActiveRecord, but not for the Arel. (Arel is just a query interface for ActiveRecord for relational databases) On Oct 2, 8:33 pm, Frederick Cheung <frederick.che...@gmail.com>
on 2010-10-03 08:43
Hi, > Do you really mean ActiveRecord compatible or do you just want to > implement the ActiveModel interface ? Yes, I'll implement the ActiveModel interface, but what I'm asking is complete compatibility to an application running against say mysql. I'm quite willing to adapt the db a bit, but I once tried writing an sql interpreter and ran out of fun, so tha's what I'm trying to avoid. All else goes. Torsten