Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

ruby on rails - Writing an ActiveRecord adapter

I'd like to write my own ActiveRecord adapter for the HBase database since none currently exist. However, I've been searching for a while online and can't find any good resources on how to write an ActiveRecord adapter. How would you go about doing this, or are there any links you can recommend?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I think the easiest thing to do is go to the source.

The rails trunk has adapters for mysql, postgres and sqlite, which you could base your adapter on. abstract_adapter.rb is pretty short and fairly straight forward to implement.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...