Hi all!
Here comes yet another way to map Ruby-Objects to a Relational Database:
ODBA is an unintrusive Object Cache system. It adresses the crosscutting
concern of object storage by disconnecting and serializing objects into
storage. All disconnected connections are replaced by instances of
ODBA::Stub, thus enabling transparent object-loading.
ODBA supports:
* transparent loading of connected objects
* index-vectors
* transactions
* transparently fetches Hash-Elements without loading the entire Hash
An Example:
include 'odba'
#connect default storage manager to a relational database
ODBA.storage.dbi = ODBA::ConnectionPool.new('DBI::pg::database', 'user', 'pw')
class Counter
include ODBA::Persistable
def initialize
@pos = 0
end
def up
@pos += 1
self.odba_store
@pos
end
def down
@pos -= 1
self.odba_store
@pos
end
end
Thanks in advance for any feedback that comes my way!
Cheers
Hannes
···
--
Mit freundlichen Grüssen / best regards
Hannes Wyss
Konzeption & Entwicklung
pub 1024D/60312B5F 2003-10-09 Hannes Wyss <hwyss@ywesee.com>
Key fingerprint = 82D1 90C7 3F3D 93DC F715 4F8B 987A 628E 6031 2B5F
+41 43 540 05 49
www.ywesee.com > intellectual capital connected > www.oddb.org