Forum: Ruby on Rails General Arel, ActiveRecord Adapter question ?

C07c83e255a7cc2e085f68fb4803e328?d=identicon&s=25 dancinglightning (Guest)
on 2010-10-02 19:15
(Received via mailing list)
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.
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2010-10-02 19:35
(Received via mailing list)
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
10590694a8679b43c794a29475534f73?d=identicon&s=25 yurokle (Guest)
on 2010-10-02 21:39
(Received via mailing list)
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>
C07c83e255a7cc2e085f68fb4803e328?d=identicon&s=25 dancinglightning (Guest)
on 2010-10-03 08:43
(Received via mailing list)
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
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.