{"_id":"gdbm","_rev":"25-a03e2427fc2584c2aa92a18dda642259","name":"gdbm","description":"gdbm for node.js","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"author":{"name":"Tokuhiro Matsuno","email":"tokuhirom@gmail.com","url":"http://64p.org/"},"name":"gdbm","description":"gdbm for node.js","version":"1.0.0","repository":{"url":"https://github.com/tokuhirom/node-gdbm"},"scripts":{"test":"make test","preinstall":"node-waf clean || true; node-waf configure build"},"engines":{"node":"~0.6.6"},"dependencies":{},"devDependencies":{},"_npmUser":{"name":"tokuhirom","email":"tokuhirom@gmail.com"},"_id":"gdbm@1.0.0","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"431b7435572b21f90fdc9c786d470507222ad396","tarball":"https://registry.npmjs.org/gdbm/-/gdbm-1.0.0.tgz","integrity":"sha512-UB4NfdIGyay9mqz/evQ/2yqlcD0PR+y4Vk5dq76u/ntLxEN4CZEWAA18lqdd6mE6882HvYb5npmhuwpHI4miKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBQN9ZmK8BcP0hJpnpciWQXCDuFs4lilmdrIjtL9auOFAiEAq61dl+mhOGHziNGHCIdcdVo2i9SOIyzozrhpRQ1Sk8E="}]},"maintainers":[{"name":"tokuhirom","email":"tokuhirom@gmail.com"}]},"1.0.1":{"author":{"name":"Tokuhiro Matsuno","email":"tokuhirom@gmail.com","url":"http://64p.org/"},"name":"gdbm","description":"gdbm for node.js","version":"1.0.1","repository":{"url":"https://github.com/tokuhirom/node-gdbm"},"scripts":{"test":"make test","preinstall":"node-waf clean || true; node-waf configure build"},"engines":{"node":"~0.6.6"},"dependencies":{},"devDependencies":{"nodeunit":">=0.0.1"},"_npmUser":{"name":"tokuhirom","email":"tokuhirom@gmail.com"},"_id":"gdbm@1.0.1","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"4ca40ed6767103361948b69bdcaddc99717c4683","tarball":"https://registry.npmjs.org/gdbm/-/gdbm-1.0.1.tgz","integrity":"sha512-UHXb0HVvnz7bTeVM0g4mP1u2/pmXc874vC2owGm480LR8SuHZ5dzPq9z7nK14tQcJOoLblVKKo7USncS5YW9YQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXHlBpVPyUrIjzI/Z+fNv4Gqur0GtoyQ9Ri0ptqCIO4wIgLWzzih6Wx7DjET1I3716Sn2qIJ0IwLEns3dRoKmtHw4="}]},"maintainers":[{"name":"tokuhirom","email":"tokuhirom@gmail.com"}]},"1.0.2":{"author":{"name":"Tokuhiro Matsuno","email":"tokuhirom@gmail.com","url":"http://64p.org/"},"name":"gdbm","description":"gdbm for node.js","version":"1.0.2","url":"https://github.com/tokuhirom/node-gdbm/","repository":{"type":"git","url":"git://github.com/tokuhirom/node-gdbm.git"},"scripts":{"test":"make test","preinstall":"node-waf clean || true; node-waf configure build"},"engines":{"node":"~0.6.6"},"dependencies":{},"devDependencies":{"nodeunit":">=0.0.1"},"_npmUser":{"name":"tokuhirom","email":"tokuhirom@gmail.com"},"_id":"gdbm@1.0.2","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"fb604c31ba7a8196deb9aa4b692dc0f7ec641985","tarball":"https://registry.npmjs.org/gdbm/-/gdbm-1.0.2.tgz","integrity":"sha512-FWjKg3JkOi7S5iiS3DOigO/NwT2z9DW8/+U4T9up6yPMYHD+KBVkbYLUKkD2TLEM5fYd+DmXCWpOEAb+WAo65g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICKRCu4d58UY8eB2rJcgwYG/Wn89F4EwcjL1x1v/YWggAiEAi0mjuBNhYTcN5gdeRna0/RXvDPohEOn1HyUt7sjNtQk="}]},"maintainers":[{"name":"tokuhirom","email":"tokuhirom@gmail.com"}]},"1.0.3":{"author":{"name":"Tokuhiro Matsuno","email":"tokuhirom@gmail.com","url":"http://64p.org/"},"name":"gdbm","description":"gdbm for node.js","version":"1.0.3","url":"https://github.com/tokuhirom/node-gdbm/","repository":{"type":"git","url":"git://github.com/tokuhirom/node-gdbm.git"},"scripts":{"test":"make test","preinstall":"node-waf clean || true; node-waf configure build"},"engines":{"node":"~0.6.6"},"dependencies":{},"devDependencies":{"nodeunit":">=0.0.1"},"_npmUser":{"name":"tokuhirom","email":"tokuhirom@gmail.com"},"_id":"gdbm@1.0.3","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"cbb14fad71e259ebe6db7590c07f15b9f8cc2f65","tarball":"https://registry.npmjs.org/gdbm/-/gdbm-1.0.3.tgz","integrity":"sha512-qcItdHb7azIOJGtLnhjgj1J0ae4t8R0qdYusqZCODqrn05/K0J1jfnMILNYZQr66Pty9B7wcOA8MJXrrX+KFNA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClltk8iwxwV7z6GXIBYyjxSLOJ24P4k7nvFv7rcMOwOAIhAMMGXys1zq661+NiaQBRpxPqVUnR3shfp+V9q5dSgPNr"}]},"maintainers":[{"name":"tokuhirom","email":"tokuhirom@gmail.com"}]},"1.0.4":{"author":{"name":"Tokuhiro Matsuno","email":"tokuhirom@gmail.com","url":"http://64p.org/"},"name":"gdbm","description":"gdbm for node.js","version":"1.0.4","url":"https://github.com/tokuhirom/node-gdbm/","repository":{"type":"git","url":"git://github.com/tokuhirom/node-gdbm.git"},"scripts":{"test":"make test","preinstall":"node-waf clean || true; node-waf configure build"},"engines":{"node":"~0.6.6"},"dependencies":{},"devDependencies":{"nodeunit":">=0.0.1"},"_npmUser":{"name":"tokuhirom","email":"tokuhirom@gmail.com"},"_id":"gdbm@1.0.4","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"af5965d95c46c288cacea5b18cc16e2adbae2623","tarball":"https://registry.npmjs.org/gdbm/-/gdbm-1.0.4.tgz","integrity":"sha512-jhL3DeQrWcKWj9HdbflkynlF/X7Ox1BxKtw/v0t1RoJ1TXWg5DPs2tcdeF10jBJNerATAMLpDNPamiVsZgn8bQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChhBnTrO0bWtrIf3aEU6meHwNZWiY26XsaIctvC5oxJAIhAKDxaTRRUGqmAA+9Peux5ep7gRSN9+bTWaMXt3o92ppJ"}]},"maintainers":[{"name":"tokuhirom","email":"tokuhirom@gmail.com"}]},"1.0.5":{"author":{"name":"Tokuhiro Matsuno","email":"tokuhirom@gmail.com","url":"http://64p.org/"},"name":"gdbm","description":"gdbm for node.js","version":"1.0.5","url":"https://github.com/tokuhirom/node-gdbm/","repository":{"type":"git","url":"git://github.com/tokuhirom/node-gdbm.git"},"scripts":{"test":"make test","preinstall":"node-waf clean || true; node-waf configure build"},"engines":{"node":"~0.6.6"},"dependencies":{},"devDependencies":{"nodeunit":">=0.0.1"},"_npmUser":{"name":"tokuhirom","email":"tokuhirom@gmail.com"},"_id":"gdbm@1.0.5","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"c03bc3f047cb63d10854f50befb17784daf3f9af","tarball":"https://registry.npmjs.org/gdbm/-/gdbm-1.0.5.tgz","integrity":"sha512-bFqgW/06+kJGEU0COs8bcv0FABCjHUFOJH6+Sb//O0H5y+LWK55stG1o+WyLy/QwYE/aDqSEL0dnkBfwQwHQpg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHDEXd3duC97fXDorJK2cVHp5O/EC5LLz98lE/21Wp3pAiEA07w6zW+z+8yIBs8/RIT2AlOuHL0mCHhD/MPU72EsuSE="}]},"maintainers":[{"name":"tokuhirom","email":"tokuhirom@gmail.com"}]},"1.0.6":{"author":{"name":"Tokuhiro Matsuno","email":"tokuhirom@gmail.com","url":"http://64p.org/"},"name":"gdbm","description":"gdbm for node.js","version":"1.0.6","url":"https://github.com/tokuhirom/node-gdbm/","repository":{"type":"git","url":"git://github.com/tokuhirom/node-gdbm.git"},"scripts":{"test":"make test","preinstall":"node-waf clean || true; node-waf configure build"},"engines":{"node":"~0.6.6"},"dependencies":{},"devDependencies":{"nodeunit":">=0.0.1"},"_npmUser":{"name":"tokuhirom","email":"tokuhirom@gmail.com"},"_id":"gdbm@1.0.6","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"cd332b878247e65b10cebd94887f5681119de304","tarball":"https://registry.npmjs.org/gdbm/-/gdbm-1.0.6.tgz","integrity":"sha512-uM4njLG+9EsUGKIjd3RNzIvFcjV0tU2qYsxWwqvn3ZFhqwJTXirnS2H/OXVsoMTixO6lstBNXsuVwSfxG4+aZQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC94tNenAiDgdnxdAJP0QwPN2Xa2x29kVJVE7euQ9GwogIgGBFbArHLD/uYVXemQDleA/ZmxrAAA92A5FedQDui/t0="}]},"maintainers":[{"name":"tokuhirom","email":"tokuhirom@gmail.com"}]},"1.0.7":{"author":{"name":"Tokuhiro Matsuno","email":"tokuhirom@gmail.com","url":"http://64p.org/"},"name":"gdbm","description":"gdbm for node.js","version":"1.0.7","url":"https://github.com/tokuhirom/node-gdbm/","repository":{"type":"git","url":"git://github.com/tokuhirom/node-gdbm.git"},"main":"./gdbm","scripts":{"test":"make test","preinstall":"node-waf clean || true; node-waf configure build"},"engines":{"node":"~0.6.6"},"dependencies":{},"devDependencies":{"nodeunit":">=0.0.1"},"_npmUser":{"name":"tokuhirom","email":"tokuhirom@gmail.com"},"_id":"gdbm@1.0.7","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.6","_defaultsLoaded":true,"dist":{"shasum":"3f1ce5ec9f4ae426b32e062b0e91fb9dfc5ee881","tarball":"https://registry.npmjs.org/gdbm/-/gdbm-1.0.7.tgz","integrity":"sha512-BANom5dtkoAJTKzWrhVsngOYZPGeTVKnePKao1ByzDumRbR/zi9+b2GF2bkUz50fsDLnGpn4fx4MOlcprdwnvA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHhnJRZ1H0s0KGM1u7zv/qFwEMM5RPLaC4KFSVYI/Kx6AiA7QTnlU6MOSSJiGnYxoF1g56aaiifkqymY9y7fzMlzPA=="}]},"maintainers":[{"name":"tokuhirom","email":"tokuhirom@gmail.com"}]},"1.1.0":{"author":{"name":"Tokuhiro Matsuno","email":"tokuhirom@gmail.com","url":"http://64p.org/"},"name":"gdbm","description":"gdbm for node.js","version":"1.1.0","url":"https://github.com/tokuhirom/node-gdbm/","repository":{"type":"git","url":"git://github.com/tokuhirom/node-gdbm.git"},"main":"./gdbm","scripts":{"test":"make test","install":"node-waf clean ; node-waf configure build"},"engines":{"node":"~0.6.6"},"dependencies":{},"devDependencies":{"nodeunit":">=0.0.1"},"readme":"[![build status](https://secure.travis-ci.org/tokuhirom/node-gdbm.png)](http://travis-ci.org/tokuhirom/node-gdbm)\nGDBM for node.js\n================\n\nSynopsis\n--------\n\n\tvar gdbm = require('gdbm');\n\tvar db = new gdbm.GDBM();\n\tdb.open(\"hoge.db\", 0, gdbm.GDBM_WRCREAT);\n\tdb.store(\"dan\", \"kogai\");\n\tdb.fetch(\"dan\") # => \"kogai\"\n\tdb.close();\n\nDescription\n------------\n\nGDBM is a GNU’s reinterpretation of dbm. You can use it as local KVS.\n\nMethods\n-------\n\n### gdbm.GDBM.prototype.open(filename[, block_size[, flag[, mode]]])\n\nOpen database files.\n\n`block_size`  is the size of a single\ntransfer from disk to memory. This parameter is ignored unless the file\nis  a  new file.  The minimum size is 512.  If it is less than 512, dbm\nwill use the stat block size for the file system.\n\n`flags` can  have one of the following values:\n\n\tgdbm.GDBM_READER: reader\n\tgdbm.GDBM_WRITER: writer\n\tgdbm.GDBM_WRCREAT: writer - if database does not exist create new one\n\tgdbm.GDBM_NEWDB: writer - create new database regardless if one exists\n\nThe `gdbm.GDBM_NOMMAP`  added to `read_write` by bitwise or instructs `gdbm_open`\nto disable the use of mmap(2).\n\nFor the last three (writers of the database) the following may be added added to `read_write` by bitwise or: `GDBM_SYNC`, which causes all database operations to be synchronized to the disk, and `GDBM_NOLOCK`, which prevents the library from performing any locking on the database file. \n\nMode is the file mode (see chmod(2) and open(2) ) if the file is created.\n\n### gdbm.GDBM.prototype.store(key, value[, flags])\n\nKey is the key  data. Value  is  the data to be associated with the key.\nFlag can have one of the following values:\n\n       gdbm.GDBM_INSERT\n              Insert only, generate an error if key exists;\n\n       gdbm.GDBM_REPLACE\n              Replace contents if key exists.\n\nIf a reader calls gdbm.GDBM.prototype.store, the return value will be  -1.  If  called\nwith  `GDBM_INSERT`  and key is in the database, the return value will be\n1.  Otherwise, the return value is 0.\n\nNOTICE: If you store data for a key that is already in the  data  base,\ngdbm   replaces  the  old  data  with  the  new  data  if  called  with\n`GDBM_REPLACE`.  You do not get two data items for the same key  and  you\ndo not get an error from `store`.\n\nNOTICE:  The  size in gdbm is not restricted like in dbm or ndbm.  Your\ndata can be as large as you want.\n\n### var str = gdbm.GDBM.prototype.fetch(key)\n\nFetch the entry from database.\n\nKey is the key data.\n\n### var b = gdbm.GDBM.prototype.exists(key)\n\nKey  is  the  key  data  to search for.\n\nIf the key is found within the database, the return value will be true.\nIf nothing appropiate is found, false is  returned. This  routine  is\nuseful  for  checking for the existence of a record, without performing\nthe memory allocation done by `gdbm_fetch`\n\n### gdbm.GDBM.prototype.delete(key)\n\nKey is the key data.\n\nThe return value is false if the item is not present or the requester is a\nreader.  The return value is true if there was a successful delete.\n\n### gdbm.GDBM.prototype.firstkey()\n\nIt’s possible to loop over every key in the database using this method and the nextkey() method. The traversal is ordered by gdbm‘s internal hash values, and won’t be sorted by the key values. This method returns the starting key.  \n\n### gdbm.GDBM.prototype.nextkey(key)\n\nReturns the key that follows key in the traversal. The following code prints every key in the database db, without having to create a list in memory that contains them all:\n\n    var key = db.firstkey();\n    while (key) {\n        console.log(key);\n        key = db.nextkey(key);\n    }\n\n### gdbm.GDBM.prototype.sync()\n\nWhen the database has been opened in fast mode, this method forces any unwritten data to be written to the disk.\n\n### gdbm.GDBM.prototype.reorganize()\n\nIf you have had a lot of deletions and would like to shrink  the  space\nused by the gdbm file, this routine will reorganize the database.  Gdbm\nwill not shorten the length of a gdbm file except by using this reorga-\nnization.  (Deleted file space will be reused.)\n\nUnless  your database was opened with the GDBM_SYNC flag, gdbm does not\nwait for writes to be flushed to the disk before continuing.  The  fol-\nlowing routine can be used to guarantee that the database is physically\nwritten to the disk file.\n","_id":"gdbm@1.1.0","dist":{"shasum":"1dc336d0da74599df9cc127a00d647069dd5008c","tarball":"https://registry.npmjs.org/gdbm/-/gdbm-1.1.0.tgz","integrity":"sha512-hka2jaY5OmmBWh0Tk43nNu5xWq8heixUhwldPX4iWbPyPaIVt1yDneL9+CdVjcZBpjXtnpO8coGC/ZHyPet5QA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdHcNlMiC07pL13g9GBPSJY2zTHP+QW1K8KrK6dS6YJQIgQOIHAuX7XSa8GnHRI0rSQxuRzw9FF/Udk4BlBqQptUk="}]},"_npmVersion":"1.1.49","_npmUser":{"name":"tokuhirom","email":"tokuhirom@gmail.com"},"maintainers":[{"name":"tokuhirom","email":"tokuhirom@gmail.com"}]},"1.1.1":{"author":{"name":"Tokuhiro Matsuno","email":"tokuhirom@gmail.com","url":"http://64p.org/"},"name":"gdbm","description":"gdbm for node.js","version":"1.1.1","url":"https://github.com/tokuhirom/node-gdbm/","repository":{"type":"git","url":"git://github.com/tokuhirom/node-gdbm.git"},"main":"./gdbm","scripts":{"test":"make test","install":"node-waf clean ; node-waf configure build"},"dependencies":{},"devDependencies":{"nodeunit":">=0.0.1"},"directories":{"test":"test"},"keywords":["gdbm"],"license":"BSD","readme":"[![build status](https://secure.travis-ci.org/tokuhirom/node-gdbm.png)](http://travis-ci.org/tokuhirom/node-gdbm)\nGDBM for node.js\n================\n\nSynopsis\n--------\n\n\tvar gdbm = require('gdbm');\n\tvar db = new gdbm.GDBM();\n\tdb.open(\"hoge.db\", 0, gdbm.GDBM_WRCREAT);\n\tdb.store(\"dan\", \"kogai\");\n\tdb.fetch(\"dan\") # => \"kogai\"\n\tdb.close();\n\nDescription\n------------\n\nGDBM is a GNU’s reinterpretation of dbm. You can use it as local KVS.\n\nMethods\n-------\n\n### gdbm.GDBM.prototype.open(filename[, block_size[, flag[, mode]]])\n\nOpen database files.\n\n`block_size`  is the size of a single\ntransfer from disk to memory. This parameter is ignored unless the file\nis  a  new file.  The minimum size is 512.  If it is less than 512, dbm\nwill use the stat block size for the file system.\n\n`flags` can  have one of the following values:\n\n\tgdbm.GDBM_READER: reader\n\tgdbm.GDBM_WRITER: writer\n\tgdbm.GDBM_WRCREAT: writer - if database does not exist create new one\n\tgdbm.GDBM_NEWDB: writer - create new database regardless if one exists\n\nThe `gdbm.GDBM_NOMMAP`  added to `read_write` by bitwise or instructs `gdbm_open`\nto disable the use of mmap(2).\n\nFor the last three (writers of the database) the following may be added added to `read_write` by bitwise or: `GDBM_SYNC`, which causes all database operations to be synchronized to the disk, and `GDBM_NOLOCK`, which prevents the library from performing any locking on the database file. \n\nMode is the file mode (see chmod(2) and open(2) ) if the file is created.\n\n### gdbm.GDBM.prototype.store(key, value[, flags])\n\nKey is the key  data. Value  is  the data to be associated with the key.\nFlag can have one of the following values:\n\n       gdbm.GDBM_INSERT\n              Insert only, generate an error if key exists;\n\n       gdbm.GDBM_REPLACE\n              Replace contents if key exists.\n\nIf a reader calls gdbm.GDBM.prototype.store, the return value will be  -1.  If  called\nwith  `GDBM_INSERT`  and key is in the database, the return value will be\n1.  Otherwise, the return value is 0.\n\nNOTICE: If you store data for a key that is already in the  data  base,\ngdbm   replaces  the  old  data  with  the  new  data  if  called  with\n`GDBM_REPLACE`.  You do not get two data items for the same key  and  you\ndo not get an error from `store`.\n\nNOTICE:  The  size in gdbm is not restricted like in dbm or ndbm.  Your\ndata can be as large as you want.\n\n### var str = gdbm.GDBM.prototype.fetch(key)\n\nFetch the entry from database.\n\nKey is the key data.\n\n### var b = gdbm.GDBM.prototype.exists(key)\n\nKey  is  the  key  data  to search for.\n\nIf the key is found within the database, the return value will be true.\nIf nothing appropiate is found, false is  returned. This  routine  is\nuseful  for  checking for the existence of a record, without performing\nthe memory allocation done by `gdbm_fetch`\n\n### gdbm.GDBM.prototype.delete(key)\n\nKey is the key data.\n\nThe return value is false if the item is not present or the requester is a\nreader.  The return value is true if there was a successful delete.\n\n### gdbm.GDBM.prototype.firstkey()\n\nIt’s possible to loop over every key in the database using this method and the nextkey() method. The traversal is ordered by gdbm‘s internal hash values, and won’t be sorted by the key values. This method returns the starting key.  \n\n### gdbm.GDBM.prototype.nextkey(key)\n\nReturns the key that follows key in the traversal. The following code prints every key in the database db, without having to create a list in memory that contains them all:\n\n    var key = db.firstkey();\n    while (key) {\n        console.log(key);\n        key = db.nextkey(key);\n    }\n\n### gdbm.GDBM.prototype.sync()\n\nWhen the database has been opened in fast mode, this method forces any unwritten data to be written to the disk.\n\n### gdbm.GDBM.prototype.reorganize()\n\nIf you have had a lot of deletions and would like to shrink  the  space\nused by the gdbm file, this routine will reorganize the database.  Gdbm\nwill not shorten the length of a gdbm file except by using this reorga-\nnization.  (Deleted file space will be reused.)\n\nUnless  your database was opened with the GDBM_SYNC flag, gdbm does not\nwait for writes to be flushed to the disk before continuing.  The  fol-\nlowing routine can be used to guarantee that the database is physically\nwritten to the disk file.\n","_id":"gdbm@1.1.1","dist":{"shasum":"cab1d7dfbdff6ab1d51a5c5faefc7985359f0c0c","tarball":"https://registry.npmjs.org/gdbm/-/gdbm-1.1.1.tgz","integrity":"sha512-4B1wGZta8djSfYp9NdndevNtmmpA3OvS3Fll68S+O+KFj5/V0o3hut7KJzbx/SzLCz9rQ2OtqOqWFnBCSh/h6w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQTNHMIxKeKK2ZBhF39ehPA6jbVQEufmPkxdI/ir5rsAIhAIfmePfov4dJLXFDBrwcZf7QQFXR+dZrhtCfnmS1X4xs"}]},"_npmVersion":"1.1.49","_npmUser":{"name":"tokuhirom","email":"tokuhirom@gmail.com"},"maintainers":[{"name":"tokuhirom","email":"tokuhirom@gmail.com"}]},"1.2.0":{"author":{"name":"Tokuhiro Matsuno","email":"tokuhirom@gmail.com","url":"http://64p.org/"},"name":"gdbm","description":"gdbm for node.js","version":"1.2.0","url":"https://github.com/tokuhirom/node-gdbm/","repository":{"type":"git","url":"git://github.com/tokuhirom/node-gdbm.git"},"main":"index.js","scripts":{"test":"nodeunit test","install":"node-gyp rebuild"},"dependencies":{"bindings":"x.x.x"},"devDependencies":{"nodeunit":">=0.0.1"},"directories":{"test":"test"},"keywords":["gdbm"],"license":"BSD","gypfile":true,"readme":"[![build status](https://secure.travis-ci.org/tokuhirom/node-gdbm.png)](http://travis-ci.org/tokuhirom/node-gdbm)\nGDBM for node.js\n================\n\nSynopsis\n--------\n\n\tvar gdbm = require('gdbm');\n\tvar db = new gdbm.GDBM();\n\tdb.open(\"hoge.db\", 0, gdbm.GDBM_WRCREAT);\n\tdb.store(\"dan\", \"kogai\");\n\tdb.fetch(\"dan\") # => \"kogai\"\n\tdb.close();\n\nDescription\n------------\n\nGDBM is a GNU’s reinterpretation of dbm. You can use it as local KVS.\n\nMethods\n-------\n\n### gdbm.GDBM.prototype.open(filename[, block_size[, flag[, mode]]])\n\nOpen database files.\n\n`block_size`  is the size of a single\ntransfer from disk to memory. This parameter is ignored unless the file\nis  a  new file.  The minimum size is 512.  If it is less than 512, dbm\nwill use the stat block size for the file system.\n\n`flags` can  have one of the following values:\n\n\tgdbm.GDBM_READER: reader\n\tgdbm.GDBM_WRITER: writer\n\tgdbm.GDBM_WRCREAT: writer - if database does not exist create new one\n\tgdbm.GDBM_NEWDB: writer - create new database regardless if one exists\n\nThe `gdbm.GDBM_NOMMAP`  added to `read_write` by bitwise or instructs `gdbm_open`\nto disable the use of mmap(2).\n\nFor the last three (writers of the database) the following may be added added to `read_write` by bitwise or: `GDBM_SYNC`, which causes all database operations to be synchronized to the disk, and `GDBM_NOLOCK`, which prevents the library from performing any locking on the database file. \n\nMode is the file mode (see chmod(2) and open(2) ) if the file is created.\n\n### gdbm.GDBM.prototype.store(key, value[, flags])\n\nKey is the key  data. Value  is  the data to be associated with the key.\nFlag can have one of the following values:\n\n       gdbm.GDBM_INSERT\n              Insert only, generate an error if key exists;\n\n       gdbm.GDBM_REPLACE\n              Replace contents if key exists.\n\nIf a reader calls gdbm.GDBM.prototype.store, the return value will be  -1.  If  called\nwith  `GDBM_INSERT`  and key is in the database, the return value will be\n1.  Otherwise, the return value is 0.\n\nNOTICE: If you store data for a key that is already in the  data  base,\ngdbm   replaces  the  old  data  with  the  new  data  if  called  with\n`GDBM_REPLACE`.  You do not get two data items for the same key  and  you\ndo not get an error from `store`.\n\nNOTICE:  The  size in gdbm is not restricted like in dbm or ndbm.  Your\ndata can be as large as you want.\n\n### var str = gdbm.GDBM.prototype.fetch(key)\n\nFetch the entry from database.\n\nKey is the key data.\n\n### var b = gdbm.GDBM.prototype.exists(key)\n\nKey  is  the  key  data  to search for.\n\nIf the key is found within the database, the return value will be true.\nIf nothing appropiate is found, false is  returned. This  routine  is\nuseful  for  checking for the existence of a record, without performing\nthe memory allocation done by `gdbm_fetch`\n\n### gdbm.GDBM.prototype.delete(key)\n\nKey is the key data.\n\nThe return value is false if the item is not present or the requester is a\nreader.  The return value is true if there was a successful delete.\n\n### gdbm.GDBM.prototype.firstkey()\n\nIt’s possible to loop over every key in the database using this method and the nextkey() method. The traversal is ordered by gdbm‘s internal hash values, and won’t be sorted by the key values. This method returns the starting key.  \n\n### gdbm.GDBM.prototype.nextkey(key)\n\nReturns the key that follows key in the traversal. The following code prints every key in the database db, without having to create a list in memory that contains them all:\n\n    var key = db.firstkey();\n    while (key) {\n        console.log(key);\n        key = db.nextkey(key);\n    }\n\n### gdbm.GDBM.prototype.sync()\n\nWhen the database has been opened in fast mode, this method forces any unwritten data to be written to the disk.\n\n### gdbm.GDBM.prototype.reorganize()\n\nIf you have had a lot of deletions and would like to shrink  the  space\nused by the gdbm file, this routine will reorganize the database.  Gdbm\nwill not shorten the length of a gdbm file except by using this reorga-\nnization.  (Deleted file space will be reused.)\n\nUnless  your database was opened with the GDBM_SYNC flag, gdbm does not\nwait for writes to be flushed to the disk before continuing.  The  fol-\nlowing routine can be used to guarantee that the database is physically\nwritten to the disk file.\n","_id":"gdbm@1.2.0","dist":{"shasum":"96b02c4a39e4b2a08126d5aab138e403b19e4df6","tarball":"https://registry.npmjs.org/gdbm/-/gdbm-1.2.0.tgz","integrity":"sha512-R9WHpAPjOnlteSpE66IS+fEQXTshc9kHi2a+dFazdBERdmd4JjGLoVylqC65lEqgv1i+3ATSv88tZzX9Eq8oug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2Xwwe+2QQtm6CKfsIgOF47op105kMOAVyeYxo8zQsggIgRNw2JYny/e8eEtnPNncCR0jslbD8+R5lm2K+2axejCY="}]},"_npmVersion":"1.1.61","_npmUser":{"name":"tokuhirom","email":"tokuhirom@gmail.com"},"maintainers":[{"name":"tokuhirom","email":"tokuhirom@gmail.com"}]}},"readme":null,"maintainers":[{"name":"tokuhirom","email":"tokuhirom@gmail.com"}],"time":{"modified":"2022-06-18T05:09:16.983Z","created":"2011-12-25T03:32:56.407Z","1.0.0":"2011-12-25T03:32:59.003Z","1.0.1":"2011-12-25T04:05:13.250Z","1.0.2":"2011-12-25T04:12:39.336Z","1.0.3":"2011-12-25T14:25:28.231Z","1.0.4":"2011-12-25T15:00:35.212Z","1.0.5":"2011-12-25T16:10:49.848Z","1.0.6":"2011-12-25T16:26:48.437Z","1.0.7":"2011-12-25T16:48:23.839Z","1.1.0":"2012-09-03T20:58:39.630Z","1.1.1":"2012-09-03T21:08:42.990Z","1.2.0":"2013-10-05T00:36:34.367Z"},"author":{"name":"Tokuhiro Matsuno","email":"tokuhirom@gmail.com","url":"http://64p.org/"},"repository":{"type":"git","url":"git://github.com/tokuhirom/node-gdbm.git"}}