Sunday, August 19, 2007

Ruby Database .... close ruby CDB

I've always want a plain simple ruby database. I've been searching for a lightweight solution to this "desire" I won't even call it a need.

I tried ruby-cdb
http://raa.ruby-lang.org/project/cdb/

basically its a ruby wrapper for access to the "constant Database"
-fast reads
-big data
-good writes

I currently have an error when I try to run it, but I think it was a permissions problem on my linux machine.

undefined method `create' for CDB:Class

Any ideas?

Example Code:

require 'cdb'

CDB.create('cdb', 'tmp', 0600) do |data|
data['eins'] = 'ichi'
data['zwei'] = 'ni'
data['drei'] = 'san'
data['vier'] = 'yon'
end

print CDB.dump('cdb'), "\n"


CDB.update('cdb', 'tmp') do |read, write|
write['one'] = read['eins']
write['two'] = read['zwei']
write['three'] = read['drei']
write['four'] = read['vier']
end

1 comment:

Anonymous said...

Material is faraway from the workpiece by a sequence of quickly recurring current discharges between two electrodes, separated by a dielectric fluid and topic to an electrical voltage. One of the electrodes recognized as} the tool electrode, or simply the "tool" or "electrode," while the other recognized as} the workpiece electrode, or "workpiece". Since any specific part might require the use of of} a number of} totally different tools – precision machining drills, saws, and so on. – modern machines typically mix quantity of} tools right into a single "cell".