Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby21
/
share
/
ri
/
2.1.0
/
system
/
GDBM
/
//opt/alt/ruby21/share/ri/2.1.0/system/GDBM/cdesc-GDBM.ri
U:RDoc::NormalClass[iI" GDBM:ET@I"Object;To:RDoc::Markup::Document:@parts[o;;[S:RDoc::Markup::Heading: leveli: textI"Summary;To:RDoc::Markup::BlankLine o:RDoc::Markup::Paragraph;[I"ORuby extension for GNU dbm (gdbm) -- a simple database engine for storing ;TI"key-value pairs on disk.;T@S; ; i;I"Description;T@o; ;[I"QGNU dbm is a library for simple databases. A database is a file that stores ;TI"Rkey-value pairs. Gdbm allows the user to store, retrieve, and delete data by ;TI"Okey. It furthermore allows a non-sorted traversal of all key-value pairs. ;TI"HA gdbm database thus provides the same functionality as a hash. As ;TI"Pwith objects of the Hash class, elements can be accessed with <tt>[]</tt>. ;TI"QFurthermore, GDBM mixes in the Enumerable module, thus providing convenient ;TI"0methods such as #find, #collect, #map, etc.;T@o; ;[ I"PA process is allowed to open several different databases at the same time. ;TI"QA process can open a database as a "reader" or a "writer". Whereas a reader ;TI"Phas only read-access to the database, a writer has read- and write-access. ;TI"RA database can be accessed either by any number of readers or by exactly one ;TI"writer at the same time.;T@S; ; i;I" Examples;T@o:RDoc::Markup::List: @type:NUMBER:@items[o:RDoc::Markup::ListItem:@label0;[o; ;[I"COpening/creating a database, and filling it with some entries:;T@o:RDoc::Markup::Verbatim;[I"require 'gdbm' ;TI" ;TI"&gdbm = GDBM.new("fruitstore.db") ;TI"gdbm["ananas"] = "3" ;TI"gdbm["banana"] = "8" ;TI" gdbm["cranberry"] = "4909" ;TI"gdbm.close ;T:@format0o;;0;[o; ;[I"Reading out a database:;T@o;;[I"require 'gdbm' ;TI" ;TI"&gdbm = GDBM.new("fruitstore.db") ;TI"$gdbm.each_pair do |key, value| ;TI"" print "#{key}: #{value}\n" ;TI" end ;TI"gdbm.close ;T;0o; ;[I" produces;T@o;;[I"banana: 8 ;TI"ananas: 3 ;TI"cranberry: 4909 ;T;0S; ; i;I" Links;T@o;;:BULLET;[o;;0;[o; ;[I"&http://www.gnu.org/software/gdbm/;T: @fileI"ext/gdbm/gdbm.c;T:0@omit_headings_from_table_of_contents_below0;0;0[ [ U:RDoc::Constant[i I"READER;TI"GDBM::READER;T00o;;[o; ;[I"open database as a reader;T@;@W;0@W@cRDoc::NormalClass0U;[i I"WRITER;TI"GDBM::WRITER;T00o;;[o; ;[I"open database as a writer;T@;@W;0@W@@c0U;[i I"WRCREAT;TI"GDBM::WRCREAT;T00o;;[o; ;[I"Popen database as a writer; if the database does not exist, create a new one;T@;@W;0@W@@c0U;[i I" NEWDB;TI"GDBM::NEWDB;T00o;;[o; ;[I"Aopen database as a writer; overwrite any existing databases ;T@;@W;0@W@@c0U;[i I" FAST;TI"GDBM::FAST;T00o;;[o; ;[I"Cflag for #new and #open. this flag is obsolete for gdbm >= 1.8;T@;@W;0@W@@c0U;[i I" SYNC;TI"GDBM::SYNC;T00o;;[o; ;[I"2flag for #new and #open. only for gdbm >= 1.8;T@;@W;0@W@@c0U;[i I"NOLOCK;TI"GDBM::NOLOCK;T00o;;[o; ;[I"flag for #new and #open;T@;@W;0@W@@c0U;[i I"VERSION;TI"GDBM::VERSION;T00o;;[o; ;[I" version of the gdbm library;T@;@W;0@W@@c0[[I"Enumerable;To;;[ ;@W;0I"ext/gdbm/gdbm.c;T[[I" class;T[[:public[[I"new;T@�[I" open;T@�[:protected[ [:private[ [I" instance;T[[;[-[I"[];T@�[I"[]=;T@�[I"cachesize=;T@�[I" clear;T@�[I" close;T@�[I"closed?;T@�[I"delete;T@�[I"delete_if;T@�[I" each;T@�[I" each_key;T@�[I"each_pair;T@�[I"each_value;T@�[I"empty?;T@�[I"fastmode=;T@�[I" fetch;T@�[I" has_key?;T@�[I"has_value?;T@�[I" include?;T@�[I"invert;T@�[I"key;T@�[I" key?;T@�[I" keys;T@�[I"length;T@�[I"member?;T@�[I"reject;T@�[I"reject!;T@�[I"reorganize;T@�[I"replace;T@�[I"select;T@�[I" shift;T@�[I" size;T@�[I" store;T@�[I" sync;T@�[I"syncmode=;T@�[I" to_a;T@�[I"to_hash;T@�[I"update;T@�[I"value?;T@�[I"values;T@�[I"values_at;T@�[;[ [;[ [ [U:RDoc::Context::Section[i 0o;;[ ;0;0[@W@WcRDoc::TopLevel