@ohos-ports/lmdb 2.8.6-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +580 -0
  3. package/SECURITY.md +12 -0
  4. package/bin/download-prebuilds.js +15 -0
  5. package/binding.gyp +113 -0
  6. package/build/Release/lmdb.node +0 -0
  7. package/caching.js +212 -0
  8. package/dependencies/lmdb/libraries/liblmdb/COPYRIGHT +20 -0
  9. package/dependencies/lmdb/libraries/liblmdb/Doxyfile +1631 -0
  10. package/dependencies/lmdb/libraries/liblmdb/LICENSE +47 -0
  11. package/dependencies/lmdb/libraries/liblmdb/Makefile +136 -0
  12. package/dependencies/lmdb/libraries/liblmdb/chacha8.c +183 -0
  13. package/dependencies/lmdb/libraries/liblmdb/chacha8.h +14 -0
  14. package/dependencies/lmdb/libraries/liblmdb/crypto.c +121 -0
  15. package/dependencies/lmdb/libraries/liblmdb/intro.doc +192 -0
  16. package/dependencies/lmdb/libraries/liblmdb/lmdb.h +1817 -0
  17. package/dependencies/lmdb/libraries/liblmdb/mdb.c +12555 -0
  18. package/dependencies/lmdb/libraries/liblmdb/mdb_copy.1 +74 -0
  19. package/dependencies/lmdb/libraries/liblmdb/mdb_copy.c +106 -0
  20. package/dependencies/lmdb/libraries/liblmdb/mdb_drop.1 +53 -0
  21. package/dependencies/lmdb/libraries/liblmdb/mdb_drop.c +154 -0
  22. package/dependencies/lmdb/libraries/liblmdb/mdb_dump.1 +94 -0
  23. package/dependencies/lmdb/libraries/liblmdb/mdb_dump.c +333 -0
  24. package/dependencies/lmdb/libraries/liblmdb/mdb_load.1 +97 -0
  25. package/dependencies/lmdb/libraries/liblmdb/mdb_load.c +530 -0
  26. package/dependencies/lmdb/libraries/liblmdb/mdb_stat.1 +83 -0
  27. package/dependencies/lmdb/libraries/liblmdb/mdb_stat.c +276 -0
  28. package/dependencies/lmdb/libraries/liblmdb/midl-sparse.c +452 -0
  29. package/dependencies/lmdb/libraries/liblmdb/midl.c +452 -0
  30. package/dependencies/lmdb/libraries/liblmdb/midl.h +208 -0
  31. package/dependencies/lmdb/libraries/liblmdb/module.c +101 -0
  32. package/dependencies/lmdb/libraries/liblmdb/module.h +16 -0
  33. package/dependencies/lmdb/libraries/liblmdb/mtest.c +178 -0
  34. package/dependencies/lmdb/libraries/liblmdb/mtest2.c +124 -0
  35. package/dependencies/lmdb/libraries/liblmdb/mtest3.c +133 -0
  36. package/dependencies/lmdb/libraries/liblmdb/mtest4.c +168 -0
  37. package/dependencies/lmdb/libraries/liblmdb/mtest5.c +135 -0
  38. package/dependencies/lmdb/libraries/liblmdb/mtest6.c +141 -0
  39. package/dependencies/lmdb/libraries/liblmdb/mtest_enc.c +190 -0
  40. package/dependencies/lmdb/libraries/liblmdb/mtest_enc2.c +189 -0
  41. package/dependencies/lmdb/libraries/liblmdb/mtest_remap.c +177 -0
  42. package/dependencies/lmdb/libraries/liblmdb/sample-bdb.txt +73 -0
  43. package/dependencies/lmdb/libraries/liblmdb/sample-mdb.txt +62 -0
  44. package/dependencies/lmdb/libraries/liblmdb/tooltag +27 -0
  45. package/dependencies/lmdb-data-v1/libraries/liblmdb/CHANGES +266 -0
  46. package/dependencies/lmdb-data-v1/libraries/liblmdb/COPYRIGHT +20 -0
  47. package/dependencies/lmdb-data-v1/libraries/liblmdb/Doxyfile +1631 -0
  48. package/dependencies/lmdb-data-v1/libraries/liblmdb/LICENSE +47 -0
  49. package/dependencies/lmdb-data-v1/libraries/liblmdb/intro.doc +192 -0
  50. package/dependencies/lmdb-data-v1/libraries/liblmdb/lmdb.h +1608 -0
  51. package/dependencies/lmdb-data-v1/libraries/liblmdb/mdb.c +10320 -0
  52. package/dependencies/lmdb-data-v1/libraries/liblmdb/mdb_copy.1 +55 -0
  53. package/dependencies/lmdb-data-v1/libraries/liblmdb/mdb_copy.c +82 -0
  54. package/dependencies/lmdb-data-v1/libraries/liblmdb/mdb_dump.1 +75 -0
  55. package/dependencies/lmdb-data-v1/libraries/liblmdb/mdb_dump.c +319 -0
  56. package/dependencies/lmdb-data-v1/libraries/liblmdb/mdb_load.1 +84 -0
  57. package/dependencies/lmdb-data-v1/libraries/liblmdb/mdb_load.c +496 -0
  58. package/dependencies/lmdb-data-v1/libraries/liblmdb/mdb_stat.1 +64 -0
  59. package/dependencies/lmdb-data-v1/libraries/liblmdb/mdb_stat.c +263 -0
  60. package/dependencies/lmdb-data-v1/libraries/liblmdb/midl.c +359 -0
  61. package/dependencies/lmdb-data-v1/libraries/liblmdb/midl.h +186 -0
  62. package/dependencies/lmdb-data-v1/libraries/liblmdb/mtest.c +177 -0
  63. package/dependencies/lmdb-data-v1/libraries/liblmdb/mtest2.c +124 -0
  64. package/dependencies/lmdb-data-v1/libraries/liblmdb/mtest3.c +133 -0
  65. package/dependencies/lmdb-data-v1/libraries/liblmdb/mtest4.c +168 -0
  66. package/dependencies/lmdb-data-v1/libraries/liblmdb/mtest5.c +135 -0
  67. package/dependencies/lmdb-data-v1/libraries/liblmdb/mtest6.c +141 -0
  68. package/dependencies/lmdb-data-v1/libraries/liblmdb/sample-bdb.txt +73 -0
  69. package/dependencies/lmdb-data-v1/libraries/liblmdb/sample-mdb.txt +62 -0
  70. package/dependencies/lmdb-data-v1/libraries/liblmdb/tooltag +22 -0
  71. package/dependencies/lz4/LICENSE +11 -0
  72. package/dependencies/lz4/lib/LICENSE +24 -0
  73. package/dependencies/lz4/lib/Makefile +225 -0
  74. package/dependencies/lz4/lib/README.md +169 -0
  75. package/dependencies/lz4/lib/dll/example/Makefile +63 -0
  76. package/dependencies/lz4/lib/dll/example/README.md +69 -0
  77. package/dependencies/lz4/lib/dll/example/fullbench-dll.sln +25 -0
  78. package/dependencies/lz4/lib/dll/example/fullbench-dll.vcxproj +182 -0
  79. package/dependencies/lz4/lib/dll/liblz4.def +62 -0
  80. package/dependencies/lz4/lib/liblz4-dll.rc.in +35 -0
  81. package/dependencies/lz4/lib/liblz4.pc.in +14 -0
  82. package/dependencies/lz4/lib/lz4.c +2722 -0
  83. package/dependencies/lz4/lib/lz4.h +842 -0
  84. package/dependencies/lz4/lib/lz4file.c +311 -0
  85. package/dependencies/lz4/lib/lz4file.h +93 -0
  86. package/dependencies/lz4/lib/lz4frame.c +2078 -0
  87. package/dependencies/lz4/lib/lz4frame.h +692 -0
  88. package/dependencies/lz4/lib/lz4frame_static.h +47 -0
  89. package/dependencies/lz4/lib/lz4hc.c +1631 -0
  90. package/dependencies/lz4/lib/lz4hc.h +413 -0
  91. package/dependencies/lz4/lib/xxhash.c +1030 -0
  92. package/dependencies/lz4/lib/xxhash.h +328 -0
  93. package/dependencies/v8/v8-fast-api-calls-v16.h +791 -0
  94. package/dependencies/v8/v8-fast-api-calls.h +888 -0
  95. package/dict/dict.txt +1 -0
  96. package/dict/dict2.txt +1 -0
  97. package/dist/index.cjs +2950 -0
  98. package/dist/index.cjs.map +1 -0
  99. package/index.d.cts +420 -0
  100. package/index.d.ts +450 -0
  101. package/index.js +38 -0
  102. package/keys.js +116 -0
  103. package/level.js +27 -0
  104. package/native.js +85 -0
  105. package/node-index.js +32 -0
  106. package/open.js +448 -0
  107. package/package.json +124 -0
  108. package/read.js +833 -0
  109. package/rollup.config.js +12 -0
  110. package/src/compression.cpp +225 -0
  111. package/src/cursor.cpp +395 -0
  112. package/src/dbi.cpp +382 -0
  113. package/src/env.cpp +1030 -0
  114. package/src/lmdb-js.cpp +64 -0
  115. package/src/lmdb-js.h +633 -0
  116. package/src/misc.cpp +593 -0
  117. package/src/ordered-binary.cpp +46 -0
  118. package/src/txn.cpp +210 -0
  119. package/src/v8-functions.cpp +170 -0
  120. package/src/windows.c +35 -0
  121. package/src/writer.cpp +537 -0
  122. package/util/RangeIterable.js +236 -0
  123. package/util/set-optional-deps.cjs +14 -0
  124. package/util/when.js +8 -0
  125. package/write.js +912 -0
@@ -0,0 +1,74 @@
1
+ .TH MDB_COPY 1 "2017/07/31" "LMDB 0.9.90"
2
+ .\" Copyright 2012-2021 Howard Chu, Symas Corp. All Rights Reserved.
3
+ .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
4
+ .SH NAME
5
+ mdb_copy \- LMDB environment copy tool
6
+ .SH SYNOPSIS
7
+ .B mdb_copy
8
+ [\c
9
+ .BR \-V ]
10
+ [\c
11
+ .BR \-c ]
12
+ [\c
13
+ .BR \-n ]
14
+ [\c
15
+ .BR \-v ]
16
+ [\c
17
+ .BI \-m \ module
18
+ [\c
19
+ .BI \-w \ password\fR]]
20
+ .B srcpath
21
+ [\c
22
+ .BR dstpath ]
23
+ .SH DESCRIPTION
24
+ The
25
+ .B mdb_copy
26
+ utility copies an LMDB environment. The environment can
27
+ be copied regardless of whether it is currently in use.
28
+ No lockfile is created, since it gets recreated at need.
29
+
30
+ If
31
+ .I dstpath
32
+ is specified it must be the path of an empty directory
33
+ for storing the backup. Otherwise, the backup will be
34
+ written to stdout.
35
+
36
+ .SH OPTIONS
37
+ .TP
38
+ .BR \-V
39
+ Write the library version number to the standard output, and exit.
40
+ .TP
41
+ .BR \-c
42
+ Compact while copying. Only current data pages will be copied; freed
43
+ or unused pages will be omitted from the copy. This option will
44
+ slow down the backup process as it is more CPU-intensive.
45
+ Currently it fails if the environment has suffered a page leak.
46
+ .TP
47
+ .BR \-n
48
+ Open LDMB environment(s) which do not use subdirectories.
49
+ .TP
50
+ .BR \-v
51
+ Use the previous environment state instead of the latest state.
52
+ This may be useful if the latest state has been corrupted.
53
+ .TP
54
+ .BI \-m \ module
55
+ Load the specified dynamic module to utilize cryptographic functions.
56
+ This is required to operate on environments that have been configured
57
+ with page-level checksums or encryption.
58
+ .TP
59
+ .BI \-w \ password
60
+ Specify the password for an encrypted environment. This is only
61
+ used if a cryptography module has been loaded.
62
+
63
+ .SH DIAGNOSTICS
64
+ Exit status is zero if no errors occur.
65
+ Errors result in a non-zero exit status and
66
+ a diagnostic message being written to standard error.
67
+ .SH CAVEATS
68
+ This utility can trigger significant file size growth if run
69
+ in parallel with write transactions, because pages which they
70
+ free during copying cannot be reused until the copy is done.
71
+ .SH "SEE ALSO"
72
+ .BR mdb_stat (1)
73
+ .SH AUTHOR
74
+ Howard Chu of Symas Corporation <http://www.symas.com>
@@ -0,0 +1,106 @@
1
+ /* mdb_copy.c - memory-mapped database backup tool */
2
+ /*
3
+ * Copyright 2012-2021 Howard Chu, Symas Corp.
4
+ * All rights reserved.
5
+ *
6
+ * Redistribution and use in source and binary forms, with or without
7
+ * modification, are permitted only as authorized by the OpenLDAP
8
+ * Public License.
9
+ *
10
+ * A copy of this license is available in the file LICENSE in the
11
+ * top-level directory of the distribution or, alternatively, at
12
+ * <http://www.OpenLDAP.org/license.html>.
13
+ */
14
+ #ifdef _WIN32
15
+ #include <windows.h>
16
+ #define MDB_STDOUT GetStdHandle(STD_OUTPUT_HANDLE)
17
+ #else
18
+ #define MDB_STDOUT 1
19
+ #endif
20
+ #include <stdio.h>
21
+ #include <stdlib.h>
22
+ #include <signal.h>
23
+ #include "lmdb.h"
24
+ #include "module.h"
25
+
26
+ static void
27
+ sighandle(int sig)
28
+ {
29
+ }
30
+
31
+ int main(int argc,char * argv[])
32
+ {
33
+ int rc;
34
+ MDB_env *env;
35
+ const char *progname = argv[0], *act;
36
+ unsigned flags = MDB_RDONLY;
37
+ unsigned cpflags = 0;
38
+ char *module = NULL, *password = NULL;
39
+ void *mlm = NULL;
40
+ char *errmsg;
41
+
42
+ for (; argc > 1 && argv[1][0] == '-'; argc--, argv++) {
43
+ if (argv[1][1] == 'n' && argv[1][2] == '\0')
44
+ flags |= MDB_NOSUBDIR;
45
+ else if (argv[1][1] == 'v' && argv[1][2] == '\0')
46
+ flags |= MDB_PREVSNAPSHOT;
47
+ else if (argv[1][1] == 'c' && argv[1][2] == '\0')
48
+ cpflags |= MDB_CP_COMPACT;
49
+ else if (argv[1][1] == 'V' && argv[1][2] == '\0') {
50
+ printf("%s\n", MDB_VERSION_STRING);
51
+ exit(0);
52
+ } else if (argv[1][1] == 'm' && argv[1][2] == '\0') {
53
+ module = argv[2];
54
+ argc--;
55
+ argv++;
56
+ } else if (argv[1][1] == 'w' && argv[1][2] == '\0') {
57
+ password = argv[2];
58
+ argc--;
59
+ argv++;
60
+ } else
61
+ argc = 0;
62
+ }
63
+
64
+ if (argc<2 || argc>3) {
65
+ fprintf(stderr, "usage: %s [-V] [-c] [-n] [-v] [-m module [-w password]] srcpath [dstpath]\n", progname);
66
+ exit(EXIT_FAILURE);
67
+ }
68
+
69
+
70
+ #ifdef SIGPIPE
71
+ signal(SIGPIPE, sighandle);
72
+ #endif
73
+ #ifdef SIGHUP
74
+ signal(SIGHUP, sighandle);
75
+ #endif
76
+ signal(SIGINT, sighandle);
77
+ signal(SIGTERM, sighandle);
78
+
79
+ act = "opening environment";
80
+ rc = mdb_env_create(&env);
81
+ if (rc == MDB_SUCCESS) {
82
+ if (module) {
83
+ mlm = mlm_setup(env, module, password, &errmsg);
84
+ if (!mlm) {
85
+ fprintf(stderr, "Failed to load crypto module: %s\n", errmsg);
86
+ exit(EXIT_FAILURE);
87
+ }
88
+ }
89
+ rc = mdb_env_open(env, argv[1], flags, 0600);
90
+ }
91
+ if (rc == MDB_SUCCESS) {
92
+ act = "copying";
93
+ if (argc == 2)
94
+ rc = mdb_env_copyfd2(env, MDB_STDOUT, cpflags);
95
+ else
96
+ rc = mdb_env_copy2(env, argv[2], cpflags);
97
+ }
98
+ if (rc)
99
+ fprintf(stderr, "%s: %s failed, error %d (%s)\n",
100
+ progname, act, rc, mdb_strerror(rc));
101
+ mdb_env_close(env);
102
+ if (mlm)
103
+ mlm_unload(mlm);
104
+
105
+ return rc ? EXIT_FAILURE : EXIT_SUCCESS;
106
+ }
@@ -0,0 +1,53 @@
1
+ .TH MDB_DROP 1 "2017/11/19" "LMDB 0.9.90"
2
+ .\" Copyright 2014-2021 Howard Chu, Symas Corp. All Rights Reserved.
3
+ .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
4
+ .SH NAME
5
+ mdb_drop \- LMDB database delete tool
6
+ .SH SYNOPSIS
7
+ .B mdb_drop
8
+ [\c
9
+ .BR \-V ]
10
+ [\c
11
+ .BR \-n ]
12
+ [\c
13
+ .BR \-d ]
14
+ [\c
15
+ .BI \-m \ module
16
+ [\c
17
+ .BI \-w \ password\fR]]
18
+ [\c
19
+ .BI \-s \ subdb\fR]
20
+ .BR \ envpath
21
+ .SH DESCRIPTION
22
+ The
23
+ .B mdb_drop
24
+ utility empties or deletes a database in the specified
25
+ environment.
26
+ .SH OPTIONS
27
+ .TP
28
+ .BR \-V
29
+ Write the library version number to the standard output, and exit.
30
+ .TP
31
+ .BR \-n
32
+ Operate on an LMDB database which does not use subdirectories.
33
+ .TP
34
+ .BR \-d
35
+ Delete the specified database, don't just empty it.
36
+ .TP
37
+ .BI \-m \ module
38
+ Load the specified dynamic module to utilize cryptographic functions.
39
+ This is required to operate on environments that have been configured
40
+ with page-level checksums or encryption.
41
+ .TP
42
+ .BI \-w \ password
43
+ Specify the password for an encrypted environment. This is only
44
+ used if a cryptography module has been loaded.
45
+ .TP
46
+ .BR \-s \ subdb
47
+ Operate on a specific subdatabase. If no database is specified, only the main database is dropped.
48
+ .SH DIAGNOSTICS
49
+ Exit status is zero if no errors occur.
50
+ Errors result in a non-zero exit status and
51
+ a diagnostic message being written to standard error.
52
+ .SH AUTHOR
53
+ Howard Chu of Symas Corporation <http://www.symas.com>
@@ -0,0 +1,154 @@
1
+ /* mdb_drop.c - memory-mapped database delete tool */
2
+ /*
3
+ * Copyright 2016-2021 Howard Chu, Symas Corp.
4
+ * All rights reserved.
5
+ *
6
+ * Redistribution and use in source and binary forms, with or without
7
+ * modification, are permitted only as authorized by the OpenLDAP
8
+ * Public License.
9
+ *
10
+ * A copy of this license is available in the file LICENSE in the
11
+ * top-level directory of the distribution or, alternatively, at
12
+ * <http://www.OpenLDAP.org/license.html>.
13
+ */
14
+ #include <stdio.h>
15
+ #include <errno.h>
16
+ #include <stdlib.h>
17
+ #include <string.h>
18
+ #include <ctype.h>
19
+ #include <unistd.h>
20
+ #include <signal.h>
21
+ #include "lmdb.h"
22
+ #include "module.h"
23
+
24
+ static volatile sig_atomic_t gotsig;
25
+
26
+ static void dumpsig( int sig )
27
+ {
28
+ gotsig=1;
29
+ }
30
+
31
+ static void usage(char *prog)
32
+ {
33
+ fprintf(stderr, "usage: %s [-V] [-n] [-d] [-m module [-w password]] [-s subdb] dbpath\n", prog);
34
+ exit(EXIT_FAILURE);
35
+ }
36
+
37
+ int main(int argc, char *argv[])
38
+ {
39
+ int i, rc;
40
+ MDB_env *env;
41
+ MDB_txn *txn;
42
+ MDB_dbi dbi;
43
+ char *prog = argv[0];
44
+ char *envname;
45
+ char *subname = NULL;
46
+ int envflags = 0, delete = 0;
47
+ char *module = NULL, *password = NULL;
48
+ void *mlm = NULL;
49
+ char *errmsg;
50
+
51
+ if (argc < 2) {
52
+ usage(prog);
53
+ }
54
+
55
+ /* -d: delete the db, don't just empty it
56
+ * -s: drop the named subDB
57
+ * -n: use NOSUBDIR flag on env_open
58
+ * -V: print version and exit
59
+ * (default) empty the main DB
60
+ */
61
+ while ((i = getopt(argc, argv, "dm:ns:w:V")) != EOF) {
62
+ switch(i) {
63
+ case 'V':
64
+ printf("%s\n", MDB_VERSION_STRING);
65
+ exit(0);
66
+ break;
67
+ case 'd':
68
+ delete = 1;
69
+ break;
70
+ case 'n':
71
+ envflags |= MDB_NOSUBDIR;
72
+ break;
73
+ case 's':
74
+ subname = optarg;
75
+ break;
76
+ case 'm':
77
+ module = optarg;
78
+ break;
79
+ case 'w':
80
+ password = optarg;
81
+ break;
82
+ default:
83
+ usage(prog);
84
+ }
85
+ }
86
+
87
+ if (optind != argc - 1)
88
+ usage(prog);
89
+
90
+ #ifdef SIGPIPE
91
+ signal(SIGPIPE, dumpsig);
92
+ #endif
93
+ #ifdef SIGHUP
94
+ signal(SIGHUP, dumpsig);
95
+ #endif
96
+ signal(SIGINT, dumpsig);
97
+ signal(SIGTERM, dumpsig);
98
+
99
+ envname = argv[optind];
100
+ rc = mdb_env_create(&env);
101
+ if (rc) {
102
+ fprintf(stderr, "mdb_env_create failed, error %d %s\n", rc, mdb_strerror(rc));
103
+ return EXIT_FAILURE;
104
+ }
105
+ if (module) {
106
+ mlm = mlm_setup(env, module, password, &errmsg);
107
+ if (!mlm) {
108
+ fprintf(stderr, "Failed to load crypto module: %s\n", errmsg);
109
+ goto env_close;
110
+ }
111
+ }
112
+
113
+ mdb_env_set_maxdbs(env, 2);
114
+
115
+ rc = mdb_env_open(env, envname, envflags, 0664);
116
+ if (rc) {
117
+ fprintf(stderr, "mdb_env_open failed, error %d %s\n", rc, mdb_strerror(rc));
118
+ goto env_close;
119
+ }
120
+
121
+ rc = mdb_txn_begin(env, NULL, 0, &txn);
122
+ if (rc) {
123
+ fprintf(stderr, "mdb_txn_begin failed, error %d %s\n", rc, mdb_strerror(rc));
124
+ goto env_close;
125
+ }
126
+
127
+ rc = mdb_open(txn, subname, 0, &dbi);
128
+ if (rc) {
129
+ fprintf(stderr, "mdb_open failed, error %d %s\n", rc, mdb_strerror(rc));
130
+ goto txn_abort;
131
+ }
132
+
133
+ rc = mdb_drop(txn, dbi, delete);
134
+ if (rc) {
135
+ fprintf(stderr, "mdb_drop failed, error %d %s\n", rc, mdb_strerror(rc));
136
+ goto txn_abort;
137
+ }
138
+ rc = mdb_txn_commit(txn);
139
+ if (rc) {
140
+ fprintf(stderr, "mdb_txn_commit failed, error %d %s\n", rc, mdb_strerror(rc));
141
+ goto txn_abort;
142
+ }
143
+ txn = NULL;
144
+
145
+ txn_abort:
146
+ if (txn)
147
+ mdb_txn_abort(txn);
148
+ env_close:
149
+ mdb_env_close(env);
150
+ if (mlm)
151
+ mlm_unload(mlm);
152
+
153
+ return rc ? EXIT_FAILURE : EXIT_SUCCESS;
154
+ }
@@ -0,0 +1,94 @@
1
+ .TH MDB_DUMP 1 "2017/07/31" "LMDB 0.9.90"
2
+ .\" Copyright 2014-2021 Howard Chu, Symas Corp. All Rights Reserved.
3
+ .\" Copying restrictions apply. See COPYRIGHT/LICENSE.
4
+ .SH NAME
5
+ mdb_dump \- LMDB environment export tool
6
+ .SH SYNOPSIS
7
+ .B mdb_dump
8
+ [\c
9
+ .BR \-V ]
10
+ [\c
11
+ .BI \-f \ file\fR]
12
+ [\c
13
+ .BR \-l ]
14
+ [\c
15
+ .BR \-n ]
16
+ [\c
17
+ .BR \-v ]
18
+ [\c
19
+ .BR \-p ]
20
+ [\c
21
+ .BI \-m \ module
22
+ [\c
23
+ .BI \-w \ password\fR]]
24
+ [\c
25
+ .BR \-a \ |
26
+ .BI \-s \ subdb\fR]
27
+ .BR \ envpath
28
+ .SH DESCRIPTION
29
+ The
30
+ .B mdb_dump
31
+ utility reads a database and writes its contents to the
32
+ standard output using a portable flat-text format
33
+ understood by the
34
+ .BR mdb_load (1)
35
+ utility.
36
+ .SH OPTIONS
37
+ .TP
38
+ .BR \-V
39
+ Write the library version number to the standard output, and exit.
40
+ .TP
41
+ .BR \-f \ file
42
+ Write to the specified file instead of to the standard output.
43
+ .TP
44
+ .BR \-l
45
+ List the databases stored in the environment. Just the
46
+ names will be listed, no data will be output.
47
+ .TP
48
+ .BR \-n
49
+ Dump an LMDB database which does not use subdirectories.
50
+ .TP
51
+ .BR \-v
52
+ Use the previous environment state instead of the latest state.
53
+ This may be useful if the latest state has been corrupted.
54
+ .TP
55
+ .BR \-p
56
+ If characters in either the key or data items are printing characters (as
57
+ defined by isprint(3)), output them directly. This option permits users to
58
+ use standard text editors and tools to modify the contents of databases.
59
+
60
+ Note: different systems may have different notions about what characters
61
+ are considered printing characters, and databases dumped in this manner may
62
+ be less portable to external systems.
63
+ .TP
64
+ .BI \-m \ module
65
+ Load the specified dynamic module to utilize cryptographic functions.
66
+ This is required to operate on environments that have been configured
67
+ with page-level checksums or encryption.
68
+ .TP
69
+ .BI \-w \ password
70
+ Specify the password for an encrypted environment. This is only
71
+ used if a cryptography module has been loaded.
72
+ .TP
73
+ .BR \-a
74
+ Dump all of the subdatabases in the environment.
75
+ .TP
76
+ .BR \-s \ subdb
77
+ Dump a specific subdatabase. If no database is specified, only the main database is dumped.
78
+ .SH DIAGNOSTICS
79
+ Exit status is zero if no errors occur.
80
+ Errors result in a non-zero exit status and
81
+ a diagnostic message being written to standard error.
82
+
83
+ Dumping and reloading databases that use user-defined comparison functions
84
+ will result in new databases that use the default comparison functions.
85
+ \fBIn this case it is quite likely that the reloaded database will be
86
+ damaged beyond repair permitting neither record storage nor retrieval.\fP
87
+
88
+ The only available workaround is to modify the source for the
89
+ .BR mdb_load (1)
90
+ utility to load the database using the correct comparison functions.
91
+ .SH "SEE ALSO"
92
+ .BR mdb_load (1)
93
+ .SH AUTHOR
94
+ Howard Chu of Symas Corporation <http://www.symas.com>