Sha256: ab74315abf82ee2e6000dcd4aadd94d75846b2ac35337d2ed9d38059e1e5f976
Contents?: true
Size: 995 Bytes
Versions: 4
Compression:
Stored size: 995 Bytes
Contents
= DBF A dBase I/O library. == Features * No external dependencies * DB fields are type cast * Date/Time fields are returned as either a Time or Date object. Date will only be used if the date is outside the range for Time. == Limitations * Writing to the db has not been implemented yet == Usage reader = DBF::Reader.new("old_data.dbf") reader.records.each do |record| puts record['name'] puts record['email'] end puts reader.records[4]['name'] puts reader.record(4)['name'] === A note on record vs. records DBF::Reader#records is an in-memory array of all rows in the database. All rows are loaded the first time that the method is called. Subsequent calls retrieve the row from memory. DBF::Reader#record retrieves the requested row from the database each time it is called. Using records is probably faster most of the time. Record is more appropriate for very large databases where you don't want the whole db loaded into memory.
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
dbf-0.4.3 | doc/README |
dbf-0.4.4 | README |
dbf-0.4.5 | README |
dbf-0.4.6 | README |