diff options
author | Nic Ferier <nic@ferrier.me.uk> | 2013-01-08 18:56:26 +0000 |
---|---|---|
committer | Nic Ferier <nic@ferrier.me.uk> | 2013-01-08 18:56:26 +0000 |
commit | 820b7a546424c300098b698c516e86d776b38715 (patch) | |
tree | 50ad71a94c309882da669d24f519f971bf028d62 | |
parent | f7f0b2276412c0025de278abc94b521b34b60f45 (diff) |
added db-copy to copy one db to the other.
-rw-r--r-- | db.el | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -116,6 +116,19 @@ The query is as specified by `kvquery->func'. This is `db-map' with an identity function." (db-map 'kvidentity db query)) + +;;; Generic utility functions + +(defun db-copy (src-db dest-db) + "Copy the data from SRC-DB into DEST-DB." + (db-map (lambda (key value) + ;;(unless (db-get key dest-db) + (progn + (db-put key value dest-db))) src-db)) + + +;;; Hash implementation + (defun db-hash (reference) "Make a db-hash database. |