rn-leveldb 3.11.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.
- package/LICENSE +21 -0
- package/README.md +92 -0
- package/android/.project +34 -0
- package/android/.settings/org.eclipse.buildship.core.prefs +13 -0
- package/android/CMakeLists.txt +69 -0
- package/android/build.gradle +125 -0
- package/android/cpp-adapter.cpp +19 -0
- package/android/gradle.properties +6 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/com/reactnativeleveldb/LeveldbModule.java +57 -0
- package/android/src/main/java/com/reactnativeleveldb/LeveldbPackage.java +28 -0
- package/cpp/leveldb/.appveyor.yml +36 -0
- package/cpp/leveldb/.clang-format +18 -0
- package/cpp/leveldb/.travis.yml +88 -0
- package/cpp/leveldb/AUTHORS +12 -0
- package/cpp/leveldb/CMakeLists.txt +495 -0
- package/cpp/leveldb/CONTRIBUTING.md +36 -0
- package/cpp/leveldb/LICENSE +27 -0
- package/cpp/leveldb/NEWS +17 -0
- package/cpp/leveldb/README.md +231 -0
- package/cpp/leveldb/TODO +14 -0
- package/cpp/leveldb/benchmarks/db_bench.cc +990 -0
- package/cpp/leveldb/benchmarks/db_bench_sqlite3.cc +726 -0
- package/cpp/leveldb/benchmarks/db_bench_tree_db.cc +531 -0
- package/cpp/leveldb/cmake/leveldbConfig.cmake.in +9 -0
- package/cpp/leveldb/db/autocompact_test.cc +115 -0
- package/cpp/leveldb/db/builder.cc +82 -0
- package/cpp/leveldb/db/builder.h +30 -0
- package/cpp/leveldb/db/c.cc +562 -0
- package/cpp/leveldb/db/c_test.c +384 -0
- package/cpp/leveldb/db/corruption_test.cc +367 -0
- package/cpp/leveldb/db/db_impl.cc +1554 -0
- package/cpp/leveldb/db/db_impl.h +217 -0
- package/cpp/leveldb/db/db_iter.cc +318 -0
- package/cpp/leveldb/db/db_iter.h +26 -0
- package/cpp/leveldb/db/db_test.cc +2305 -0
- package/cpp/leveldb/db/dbformat.cc +136 -0
- package/cpp/leveldb/db/dbformat.h +224 -0
- package/cpp/leveldb/db/dbformat_test.cc +133 -0
- package/cpp/leveldb/db/dumpfile.cc +232 -0
- package/cpp/leveldb/db/fault_injection_test.cc +555 -0
- package/cpp/leveldb/db/filename.cc +141 -0
- package/cpp/leveldb/db/filename.h +83 -0
- package/cpp/leveldb/db/filename_test.cc +132 -0
- package/cpp/leveldb/db/leveldbutil.cc +64 -0
- package/cpp/leveldb/db/log_format.h +35 -0
- package/cpp/leveldb/db/log_reader.cc +274 -0
- package/cpp/leveldb/db/log_reader.h +112 -0
- package/cpp/leveldb/db/log_test.cc +563 -0
- package/cpp/leveldb/db/log_writer.cc +111 -0
- package/cpp/leveldb/db/log_writer.h +54 -0
- package/cpp/leveldb/db/memtable.cc +137 -0
- package/cpp/leveldb/db/memtable.h +87 -0
- package/cpp/leveldb/db/recovery_test.cc +339 -0
- package/cpp/leveldb/db/repair.cc +451 -0
- package/cpp/leveldb/db/skiplist.h +382 -0
- package/cpp/leveldb/db/skiplist_test.cc +373 -0
- package/cpp/leveldb/db/snapshot.h +95 -0
- package/cpp/leveldb/db/table_cache.cc +120 -0
- package/cpp/leveldb/db/table_cache.h +57 -0
- package/cpp/leveldb/db/version_edit.cc +257 -0
- package/cpp/leveldb/db/version_edit.h +106 -0
- package/cpp/leveldb/db/version_edit_test.cc +46 -0
- package/cpp/leveldb/db/version_set.cc +1562 -0
- package/cpp/leveldb/db/version_set.h +393 -0
- package/cpp/leveldb/db/version_set_test.cc +336 -0
- package/cpp/leveldb/db/write_batch.cc +150 -0
- package/cpp/leveldb/db/write_batch_internal.h +45 -0
- package/cpp/leveldb/db/write_batch_test.cc +137 -0
- package/cpp/leveldb/doc/benchmark.html +459 -0
- package/cpp/leveldb/doc/impl.md +172 -0
- package/cpp/leveldb/doc/index.md +523 -0
- package/cpp/leveldb/doc/log_format.md +75 -0
- package/cpp/leveldb/doc/table_format.md +107 -0
- package/cpp/leveldb/helpers/memenv/memenv.cc +390 -0
- package/cpp/leveldb/helpers/memenv/memenv.h +22 -0
- package/cpp/leveldb/helpers/memenv/memenv_test.cc +264 -0
- package/cpp/leveldb/include/leveldb/c.h +270 -0
- package/cpp/leveldb/include/leveldb/cache.h +111 -0
- package/cpp/leveldb/include/leveldb/comparator.h +64 -0
- package/cpp/leveldb/include/leveldb/db.h +167 -0
- package/cpp/leveldb/include/leveldb/dumpfile.h +28 -0
- package/cpp/leveldb/include/leveldb/env.h +417 -0
- package/cpp/leveldb/include/leveldb/export.h +33 -0
- package/cpp/leveldb/include/leveldb/filter_policy.h +72 -0
- package/cpp/leveldb/include/leveldb/iterator.h +112 -0
- package/cpp/leveldb/include/leveldb/options.h +187 -0
- package/cpp/leveldb/include/leveldb/slice.h +114 -0
- package/cpp/leveldb/include/leveldb/status.h +122 -0
- package/cpp/leveldb/include/leveldb/table.h +84 -0
- package/cpp/leveldb/include/leveldb/table_builder.h +93 -0
- package/cpp/leveldb/include/leveldb/write_batch.h +83 -0
- package/cpp/leveldb/issues/issue178_test.cc +90 -0
- package/cpp/leveldb/issues/issue200_test.cc +59 -0
- package/cpp/leveldb/issues/issue320_test.cc +131 -0
- package/cpp/leveldb/port/README.md +10 -0
- package/cpp/leveldb/port/port.h +19 -0
- package/cpp/leveldb/port/port_config.h.in +33 -0
- package/cpp/leveldb/port/port_example.h +100 -0
- package/cpp/leveldb/port/port_stdcxx.h +151 -0
- package/cpp/leveldb/port/thread_annotations.h +108 -0
- package/cpp/leveldb/table/block.cc +267 -0
- package/cpp/leveldb/table/block.h +44 -0
- package/cpp/leveldb/table/block_builder.cc +107 -0
- package/cpp/leveldb/table/block_builder.h +54 -0
- package/cpp/leveldb/table/filter_block.cc +106 -0
- package/cpp/leveldb/table/filter_block.h +68 -0
- package/cpp/leveldb/table/filter_block_test.cc +127 -0
- package/cpp/leveldb/table/format.cc +141 -0
- package/cpp/leveldb/table/format.h +99 -0
- package/cpp/leveldb/table/iterator.cc +76 -0
- package/cpp/leveldb/table/iterator_wrapper.h +92 -0
- package/cpp/leveldb/table/merger.cc +191 -0
- package/cpp/leveldb/table/merger.h +26 -0
- package/cpp/leveldb/table/table.cc +271 -0
- package/cpp/leveldb/table/table_builder.cc +265 -0
- package/cpp/leveldb/table/table_test.cc +834 -0
- package/cpp/leveldb/table/two_level_iterator.cc +171 -0
- package/cpp/leveldb/table/two_level_iterator.h +31 -0
- package/cpp/leveldb/third_party/benchmark/.clang-format +5 -0
- package/cpp/leveldb/third_party/benchmark/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
- package/cpp/leveldb/third_party/benchmark/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/cpp/leveldb/third_party/benchmark/.github/workflows/build-and-test.yml +38 -0
- package/cpp/leveldb/third_party/benchmark/.github/workflows/pylint.yml +26 -0
- package/cpp/leveldb/third_party/benchmark/.github/workflows/test_bindings.yml +24 -0
- package/cpp/leveldb/third_party/benchmark/.travis-libcxx-setup.sh +28 -0
- package/cpp/leveldb/third_party/benchmark/.travis.yml +231 -0
- package/cpp/leveldb/third_party/benchmark/.ycm_extra_conf.py +115 -0
- package/cpp/leveldb/third_party/benchmark/AUTHORS +58 -0
- package/cpp/leveldb/third_party/benchmark/BUILD.bazel +44 -0
- package/cpp/leveldb/third_party/benchmark/CMakeLists.txt +287 -0
- package/cpp/leveldb/third_party/benchmark/CONTRIBUTING.md +58 -0
- package/cpp/leveldb/third_party/benchmark/CONTRIBUTORS +83 -0
- package/cpp/leveldb/third_party/benchmark/LICENSE +202 -0
- package/cpp/leveldb/third_party/benchmark/README.md +1323 -0
- package/cpp/leveldb/third_party/benchmark/WORKSPACE +51 -0
- package/cpp/leveldb/third_party/benchmark/_config.yml +1 -0
- package/cpp/leveldb/third_party/benchmark/appveyor.yml +50 -0
- package/cpp/leveldb/third_party/benchmark/bindings/python/BUILD +3 -0
- package/cpp/leveldb/third_party/benchmark/bindings/python/build_defs.bzl +25 -0
- package/cpp/leveldb/third_party/benchmark/bindings/python/google_benchmark/BUILD +38 -0
- package/cpp/leveldb/third_party/benchmark/bindings/python/google_benchmark/__init__.py +156 -0
- package/cpp/leveldb/third_party/benchmark/bindings/python/google_benchmark/benchmark.cc +180 -0
- package/cpp/leveldb/third_party/benchmark/bindings/python/google_benchmark/example.py +136 -0
- package/cpp/leveldb/third_party/benchmark/bindings/python/pybind11.BUILD +20 -0
- package/cpp/leveldb/third_party/benchmark/bindings/python/python_headers.BUILD +6 -0
- package/cpp/leveldb/third_party/benchmark/bindings/python/requirements.txt +2 -0
- package/cpp/leveldb/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake +74 -0
- package/cpp/leveldb/third_party/benchmark/cmake/CXXFeatureCheck.cmake +69 -0
- package/cpp/leveldb/third_party/benchmark/cmake/Config.cmake.in +1 -0
- package/cpp/leveldb/third_party/benchmark/cmake/GetGitVersion.cmake +54 -0
- package/cpp/leveldb/third_party/benchmark/cmake/GoogleTest.cmake +41 -0
- package/cpp/leveldb/third_party/benchmark/cmake/GoogleTest.cmake.in +58 -0
- package/cpp/leveldb/third_party/benchmark/cmake/benchmark.pc.in +12 -0
- package/cpp/leveldb/third_party/benchmark/cmake/gnu_posix_regex.cpp +12 -0
- package/cpp/leveldb/third_party/benchmark/cmake/llvm-toolchain.cmake +8 -0
- package/cpp/leveldb/third_party/benchmark/cmake/posix_regex.cpp +14 -0
- package/cpp/leveldb/third_party/benchmark/cmake/split_list.cmake +3 -0
- package/cpp/leveldb/third_party/benchmark/cmake/std_regex.cpp +10 -0
- package/cpp/leveldb/third_party/benchmark/cmake/steady_clock.cpp +7 -0
- package/cpp/leveldb/third_party/benchmark/cmake/thread_safety_attributes.cpp +4 -0
- package/cpp/leveldb/third_party/benchmark/conan/CMakeLists.txt +7 -0
- package/cpp/leveldb/third_party/benchmark/conan/test_package/CMakeLists.txt +10 -0
- package/cpp/leveldb/third_party/benchmark/conan/test_package/conanfile.py +19 -0
- package/cpp/leveldb/third_party/benchmark/conan/test_package/test_package.cpp +18 -0
- package/cpp/leveldb/third_party/benchmark/conanfile.py +79 -0
- package/cpp/leveldb/third_party/benchmark/dependencies.md +18 -0
- package/cpp/leveldb/third_party/benchmark/docs/AssemblyTests.md +147 -0
- package/cpp/leveldb/third_party/benchmark/docs/_config.yml +1 -0
- package/cpp/leveldb/third_party/benchmark/docs/releasing.md +16 -0
- package/cpp/leveldb/third_party/benchmark/docs/tools.md +203 -0
- package/cpp/leveldb/third_party/benchmark/include/benchmark/benchmark.h +1604 -0
- package/cpp/leveldb/third_party/benchmark/requirements.txt +2 -0
- package/cpp/leveldb/third_party/benchmark/setup.py +140 -0
- package/cpp/leveldb/third_party/benchmark/src/CMakeLists.txt +114 -0
- package/cpp/leveldb/third_party/benchmark/src/arraysize.h +33 -0
- package/cpp/leveldb/third_party/benchmark/src/benchmark.cc +499 -0
- package/cpp/leveldb/third_party/benchmark/src/benchmark_api_internal.cc +15 -0
- package/cpp/leveldb/third_party/benchmark/src/benchmark_api_internal.h +53 -0
- package/cpp/leveldb/third_party/benchmark/src/benchmark_main.cc +17 -0
- package/cpp/leveldb/third_party/benchmark/src/benchmark_name.cc +58 -0
- package/cpp/leveldb/third_party/benchmark/src/benchmark_register.cc +515 -0
- package/cpp/leveldb/third_party/benchmark/src/benchmark_register.h +108 -0
- package/cpp/leveldb/third_party/benchmark/src/benchmark_runner.cc +362 -0
- package/cpp/leveldb/third_party/benchmark/src/benchmark_runner.h +51 -0
- package/cpp/leveldb/third_party/benchmark/src/check.h +82 -0
- package/cpp/leveldb/third_party/benchmark/src/colorprint.cc +188 -0
- package/cpp/leveldb/third_party/benchmark/src/colorprint.h +33 -0
- package/cpp/leveldb/third_party/benchmark/src/commandlineflags.cc +228 -0
- package/cpp/leveldb/third_party/benchmark/src/commandlineflags.h +103 -0
- package/cpp/leveldb/third_party/benchmark/src/complexity.cc +238 -0
- package/cpp/leveldb/third_party/benchmark/src/complexity.h +55 -0
- package/cpp/leveldb/third_party/benchmark/src/console_reporter.cc +177 -0
- package/cpp/leveldb/third_party/benchmark/src/counter.cc +80 -0
- package/cpp/leveldb/third_party/benchmark/src/counter.h +32 -0
- package/cpp/leveldb/third_party/benchmark/src/csv_reporter.cc +154 -0
- package/cpp/leveldb/third_party/benchmark/src/cycleclock.h +211 -0
- package/cpp/leveldb/third_party/benchmark/src/internal_macros.h +102 -0
- package/cpp/leveldb/third_party/benchmark/src/json_reporter.cc +255 -0
- package/cpp/leveldb/third_party/benchmark/src/log.h +74 -0
- package/cpp/leveldb/third_party/benchmark/src/mutex.h +155 -0
- package/cpp/leveldb/third_party/benchmark/src/re.h +158 -0
- package/cpp/leveldb/third_party/benchmark/src/reporter.cc +105 -0
- package/cpp/leveldb/third_party/benchmark/src/sleep.cc +67 -0
- package/cpp/leveldb/third_party/benchmark/src/sleep.h +15 -0
- package/cpp/leveldb/third_party/benchmark/src/statistics.cc +193 -0
- package/cpp/leveldb/third_party/benchmark/src/statistics.h +37 -0
- package/cpp/leveldb/third_party/benchmark/src/string_util.cc +255 -0
- package/cpp/leveldb/third_party/benchmark/src/string_util.h +59 -0
- package/cpp/leveldb/third_party/benchmark/src/sysinfo.cc +716 -0
- package/cpp/leveldb/third_party/benchmark/src/thread_manager.h +64 -0
- package/cpp/leveldb/third_party/benchmark/src/thread_timer.h +86 -0
- package/cpp/leveldb/third_party/benchmark/src/timers.cc +245 -0
- package/cpp/leveldb/third_party/benchmark/src/timers.h +48 -0
- package/cpp/leveldb/third_party/benchmark/test/AssemblyTests.cmake +46 -0
- package/cpp/leveldb/third_party/benchmark/test/BUILD +73 -0
- package/cpp/leveldb/third_party/benchmark/test/CMakeLists.txt +263 -0
- package/cpp/leveldb/third_party/benchmark/test/args_product_test.cc +77 -0
- package/cpp/leveldb/third_party/benchmark/test/basic_test.cc +136 -0
- package/cpp/leveldb/third_party/benchmark/test/benchmark_gtest.cc +134 -0
- package/cpp/leveldb/third_party/benchmark/test/benchmark_name_gtest.cc +74 -0
- package/cpp/leveldb/third_party/benchmark/test/benchmark_test.cc +245 -0
- package/cpp/leveldb/third_party/benchmark/test/clobber_memory_assembly_test.cc +64 -0
- package/cpp/leveldb/third_party/benchmark/test/commandlineflags_gtest.cc +201 -0
- package/cpp/leveldb/third_party/benchmark/test/complexity_test.cc +213 -0
- package/cpp/leveldb/third_party/benchmark/test/cxx03_test.cc +63 -0
- package/cpp/leveldb/third_party/benchmark/test/diagnostics_test.cc +80 -0
- package/cpp/leveldb/third_party/benchmark/test/display_aggregates_only_test.cc +43 -0
- package/cpp/leveldb/third_party/benchmark/test/donotoptimize_assembly_test.cc +163 -0
- package/cpp/leveldb/third_party/benchmark/test/donotoptimize_test.cc +52 -0
- package/cpp/leveldb/third_party/benchmark/test/filter_test.cc +104 -0
- package/cpp/leveldb/third_party/benchmark/test/fixture_test.cc +51 -0
- package/cpp/leveldb/third_party/benchmark/test/internal_threading_test.cc +184 -0
- package/cpp/leveldb/third_party/benchmark/test/link_main_test.cc +8 -0
- package/cpp/leveldb/third_party/benchmark/test/map_test.cc +57 -0
- package/cpp/leveldb/third_party/benchmark/test/memory_manager_test.cc +44 -0
- package/cpp/leveldb/third_party/benchmark/test/multiple_ranges_test.cc +96 -0
- package/cpp/leveldb/third_party/benchmark/test/options_test.cc +75 -0
- package/cpp/leveldb/third_party/benchmark/test/output_test.h +213 -0
- package/cpp/leveldb/third_party/benchmark/test/output_test_helper.cc +515 -0
- package/cpp/leveldb/third_party/benchmark/test/register_benchmark_test.cc +184 -0
- package/cpp/leveldb/third_party/benchmark/test/report_aggregates_only_test.cc +39 -0
- package/cpp/leveldb/third_party/benchmark/test/reporter_output_test.cc +747 -0
- package/cpp/leveldb/third_party/benchmark/test/skip_with_error_test.cc +195 -0
- package/cpp/leveldb/third_party/benchmark/test/state_assembly_test.cc +68 -0
- package/cpp/leveldb/third_party/benchmark/test/statistics_gtest.cc +28 -0
- package/cpp/leveldb/third_party/benchmark/test/string_util_gtest.cc +153 -0
- package/cpp/leveldb/third_party/benchmark/test/templated_fixture_test.cc +28 -0
- package/cpp/leveldb/third_party/benchmark/test/user_counters_tabular_test.cc +285 -0
- package/cpp/leveldb/third_party/benchmark/test/user_counters_test.cc +531 -0
- package/cpp/leveldb/third_party/benchmark/test/user_counters_thousands_test.cc +173 -0
- package/cpp/leveldb/third_party/benchmark/tools/BUILD.bazel +19 -0
- package/cpp/leveldb/third_party/benchmark/tools/compare.py +429 -0
- package/cpp/leveldb/third_party/benchmark/tools/gbench/Inputs/test1_run1.json +119 -0
- package/cpp/leveldb/third_party/benchmark/tools/gbench/Inputs/test1_run2.json +119 -0
- package/cpp/leveldb/third_party/benchmark/tools/gbench/Inputs/test2_run.json +81 -0
- package/cpp/leveldb/third_party/benchmark/tools/gbench/Inputs/test3_run0.json +65 -0
- package/cpp/leveldb/third_party/benchmark/tools/gbench/Inputs/test3_run1.json +65 -0
- package/cpp/leveldb/third_party/benchmark/tools/gbench/__init__.py +8 -0
- package/cpp/leveldb/third_party/benchmark/tools/gbench/report.py +903 -0
- package/cpp/leveldb/third_party/benchmark/tools/gbench/util.py +163 -0
- package/cpp/leveldb/third_party/benchmark/tools/requirements.txt +1 -0
- package/cpp/leveldb/third_party/benchmark/tools/strip_asm.py +151 -0
- package/cpp/leveldb/third_party/googletest/.clang-format +4 -0
- package/cpp/leveldb/third_party/googletest/.travis.yml +73 -0
- package/cpp/leveldb/third_party/googletest/BUILD.bazel +179 -0
- package/cpp/leveldb/third_party/googletest/CMakeLists.txt +36 -0
- package/cpp/leveldb/third_party/googletest/CONTRIBUTING.md +142 -0
- package/cpp/leveldb/third_party/googletest/LICENSE +28 -0
- package/cpp/leveldb/third_party/googletest/README.md +132 -0
- package/cpp/leveldb/third_party/googletest/WORKSPACE +23 -0
- package/cpp/leveldb/third_party/googletest/appveyor.yml +154 -0
- package/cpp/leveldb/third_party/googletest/ci/build-linux-bazel.sh +37 -0
- package/cpp/leveldb/third_party/googletest/ci/build-platformio.sh +2 -0
- package/cpp/leveldb/third_party/googletest/ci/env-linux.sh +41 -0
- package/cpp/leveldb/third_party/googletest/ci/env-osx.sh +47 -0
- package/cpp/leveldb/third_party/googletest/ci/get-nprocessors.sh +48 -0
- package/cpp/leveldb/third_party/googletest/ci/install-linux.sh +49 -0
- package/cpp/leveldb/third_party/googletest/ci/install-osx.sh +40 -0
- package/cpp/leveldb/third_party/googletest/ci/install-platformio.sh +5 -0
- package/cpp/leveldb/third_party/googletest/ci/log-config.sh +51 -0
- package/cpp/leveldb/third_party/googletest/ci/travis.sh +44 -0
- package/cpp/leveldb/third_party/googletest/googlemock/CMakeLists.txt +233 -0
- package/cpp/leveldb/third_party/googletest/googlemock/CONTRIBUTORS +40 -0
- package/cpp/leveldb/third_party/googletest/googlemock/LICENSE +28 -0
- package/cpp/leveldb/third_party/googletest/googlemock/README.md +44 -0
- package/cpp/leveldb/third_party/googletest/googlemock/cmake/gmock.pc.in +10 -0
- package/cpp/leveldb/third_party/googletest/googlemock/cmake/gmock_main.pc.in +10 -0
- package/cpp/leveldb/third_party/googletest/googlemock/docs/cheat_sheet.md +770 -0
- package/cpp/leveldb/third_party/googletest/googlemock/docs/cook_book.md +4270 -0
- package/cpp/leveldb/third_party/googletest/googlemock/docs/for_dummies.md +700 -0
- package/cpp/leveldb/third_party/googletest/googlemock/docs/gmock_faq.md +396 -0
- package/cpp/leveldb/third_party/googletest/googlemock/docs/pump_manual.md +187 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-actions.h +1193 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-cardinalities.h +157 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-function-mocker.h +276 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-generated-actions.h +1884 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-generated-actions.h.pump +627 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h +752 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +227 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-generated-matchers.h +1097 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-generated-matchers.h.pump +346 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-matchers.h +4591 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-more-actions.h +162 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-more-matchers.h +92 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-nice-strict.h +215 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock-spec-builders.h +1985 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/gmock.h +101 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/internal/custom/README.md +16 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +10 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +12 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-matchers.h +36 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-port.h +39 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h +472 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/internal/gmock-port.h +87 -0
- package/cpp/leveldb/third_party/googletest/googlemock/include/gmock/internal/gmock-pp.h +271 -0
- package/cpp/leveldb/third_party/googletest/googlemock/scripts/README.md +5 -0
- package/cpp/leveldb/third_party/googletest/googlemock/scripts/fuse_gmock_files.py +240 -0
- package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/LICENSE +203 -0
- package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/README +34 -0
- package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/README.cppclean +115 -0
- package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/cpp/__init__.py +0 -0
- package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/cpp/ast.py +1761 -0
- package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/cpp/gmock_class.py +248 -0
- package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/cpp/gmock_class_test.py +540 -0
- package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/cpp/keywords.py +56 -0
- package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/cpp/tokenize.py +284 -0
- package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/cpp/utils.py +37 -0
- package/cpp/leveldb/third_party/googletest/googlemock/scripts/generator/gmock_gen.py +30 -0
- package/cpp/leveldb/third_party/googletest/googlemock/scripts/pump.py +856 -0
- package/cpp/leveldb/third_party/googletest/googlemock/src/gmock-all.cc +46 -0
- package/cpp/leveldb/third_party/googletest/googlemock/src/gmock-cardinalities.cc +155 -0
- package/cpp/leveldb/third_party/googletest/googlemock/src/gmock-internal-utils.cc +200 -0
- package/cpp/leveldb/third_party/googletest/googlemock/src/gmock-matchers.cc +462 -0
- package/cpp/leveldb/third_party/googletest/googlemock/src/gmock-spec-builders.cc +892 -0
- package/cpp/leveldb/third_party/googletest/googlemock/src/gmock.cc +213 -0
- package/cpp/leveldb/third_party/googletest/googlemock/src/gmock_main.cc +72 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/BUILD.bazel +110 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-actions_test.cc +1507 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-cardinalities_test.cc +429 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-function-mocker_nc.cc +16 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-function-mocker_nc_test.py +43 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-function-mocker_test.cc +696 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-generated-actions_test.cc +1064 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-generated-function-mockers_test.cc +659 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-generated-matchers_test.cc +1323 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-internal-utils_test.cc +732 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-matchers_test.cc +6913 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-more-actions_test.cc +698 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-nice-strict_test.cc +500 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-port_test.cc +42 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-pp-string_test.cc +206 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-pp_test.cc +83 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock-spec-builders_test.cc +2775 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_all_test.cc +49 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_ex_test.cc +80 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_leak_test.py +104 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_leak_test_.cc +99 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_link2_test.cc +39 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_link_test.cc +39 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_link_test.h +690 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_output_test.py +183 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_output_test_.cc +309 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_output_test_golden.txt +317 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_stress_test.cc +240 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_test.cc +181 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/gmock_test_utils.py +108 -0
- package/cpp/leveldb/third_party/googletest/googlemock/test/pump_test.py +182 -0
- package/cpp/leveldb/third_party/googletest/googletest/CMakeLists.txt +329 -0
- package/cpp/leveldb/third_party/googletest/googletest/CONTRIBUTORS +38 -0
- package/cpp/leveldb/third_party/googletest/googletest/LICENSE +28 -0
- package/cpp/leveldb/third_party/googletest/googletest/README.md +244 -0
- package/cpp/leveldb/third_party/googletest/googletest/cmake/Config.cmake.in +9 -0
- package/cpp/leveldb/third_party/googletest/googletest/cmake/gtest.pc.in +9 -0
- package/cpp/leveldb/third_party/googletest/googletest/cmake/gtest_main.pc.in +10 -0
- package/cpp/leveldb/third_party/googletest/googletest/cmake/internal_utils.cmake +358 -0
- package/cpp/leveldb/third_party/googletest/googletest/cmake/libgtest.la.in +21 -0
- package/cpp/leveldb/third_party/googletest/googletest/docs/advanced.md +2567 -0
- package/cpp/leveldb/third_party/googletest/googletest/docs/faq.md +753 -0
- package/cpp/leveldb/third_party/googletest/googletest/docs/pkgconfig.md +219 -0
- package/cpp/leveldb/third_party/googletest/googletest/docs/primer.md +579 -0
- package/cpp/leveldb/third_party/googletest/googletest/docs/samples.md +22 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest-death-test.h +343 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest-matchers.h +750 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest-message.h +219 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest-param-test.h +514 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest-printers.h +928 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest-spi.h +238 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest-test-part.h +184 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest-typed-test.h +337 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest.h +2477 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest_pred_impl.h +359 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/gtest_prod.h +61 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/custom/README.md +56 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/custom/gtest-port.h +37 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/custom/gtest-printers.h +42 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/custom/gtest.h +37 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h +304 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/gtest-filepath.h +211 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/gtest-internal.h +1411 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/gtest-param-util.h +880 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/gtest-port-arch.h +111 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/gtest-port.h +2227 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/gtest-string.h +171 -0
- package/cpp/leveldb/third_party/googletest/googletest/include/gtest/internal/gtest-type-util.h +183 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/prime_tables.h +126 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/sample1.cc +66 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/sample1.h +41 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/sample10_unittest.cc +139 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/sample1_unittest.cc +151 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/sample2.cc +54 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/sample2.h +81 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/sample2_unittest.cc +107 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/sample3-inl.h +172 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/sample3_unittest.cc +149 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/sample4.cc +54 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/sample4.h +53 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/sample4_unittest.cc +53 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/sample5_unittest.cc +196 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/sample6_unittest.cc +224 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/sample7_unittest.cc +117 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/sample8_unittest.cc +154 -0
- package/cpp/leveldb/third_party/googletest/googletest/samples/sample9_unittest.cc +156 -0
- package/cpp/leveldb/third_party/googletest/googletest/scripts/README.md +5 -0
- package/cpp/leveldb/third_party/googletest/googletest/scripts/common.py +83 -0
- package/cpp/leveldb/third_party/googletest/googletest/scripts/fuse_gtest_files.py +253 -0
- package/cpp/leveldb/third_party/googletest/googletest/scripts/gen_gtest_pred_impl.py +734 -0
- package/cpp/leveldb/third_party/googletest/googletest/scripts/gtest-config.in +274 -0
- package/cpp/leveldb/third_party/googletest/googletest/scripts/release_docs.py +158 -0
- package/cpp/leveldb/third_party/googletest/googletest/scripts/run_with_path.py +32 -0
- package/cpp/leveldb/third_party/googletest/googletest/scripts/upload.py +1402 -0
- package/cpp/leveldb/third_party/googletest/googletest/scripts/upload_gtest.py +78 -0
- package/cpp/leveldb/third_party/googletest/googletest/src/gtest-all.cc +48 -0
- package/cpp/leveldb/third_party/googletest/googletest/src/gtest-death-test.cc +1653 -0
- package/cpp/leveldb/third_party/googletest/googletest/src/gtest-filepath.cc +382 -0
- package/cpp/leveldb/third_party/googletest/googletest/src/gtest-internal-inl.h +1211 -0
- package/cpp/leveldb/third_party/googletest/googletest/src/gtest-matchers.cc +97 -0
- package/cpp/leveldb/third_party/googletest/googletest/src/gtest-port.cc +1399 -0
- package/cpp/leveldb/third_party/googletest/googletest/src/gtest-printers.cc +442 -0
- package/cpp/leveldb/third_party/googletest/googletest/src/gtest-test-part.cc +108 -0
- package/cpp/leveldb/third_party/googletest/googletest/src/gtest-typed-test.cc +118 -0
- package/cpp/leveldb/third_party/googletest/googletest/src/gtest.cc +6180 -0
- package/cpp/leveldb/third_party/googletest/googletest/src/gtest_main.cc +54 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/BUILD.bazel +529 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-break-on-failure-unittest.py +208 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-break-on-failure-unittest_.cc +86 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-catch-exceptions-test.py +236 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-catch-exceptions-test_.cc +293 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-color-test.py +127 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-color-test_.cc +62 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-death-test-test.cc +1516 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-death-test_ex_test.cc +92 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-env-var-test.py +117 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-env-var-test_.cc +122 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-filepath-test.cc +649 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-filter-unittest.py +639 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-filter-unittest_.cc +137 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-json-outfiles-test.py +191 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-json-output-unittest.py +778 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-list-tests-unittest.py +205 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-list-tests-unittest_.cc +156 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-listener-test.cc +518 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-message-test.cc +158 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-options-test.cc +216 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-output-test-golden-lin.txt +1137 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-output-test.py +346 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-output-test_.cc +1149 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-param-test-invalid-name1-test.py +63 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-param-test-invalid-name1-test_.cc +50 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-param-test-invalid-name2-test.py +62 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-param-test-invalid-name2-test_.cc +55 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-param-test-test.cc +1086 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-param-test-test.h +51 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-param-test2-test.cc +61 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-port-test.cc +1272 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-printers-test.cc +1619 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-shuffle-test.py +323 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-shuffle-test_.cc +101 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-test-part-test.cc +230 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-test2_test.cc +61 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-throw-on-failure-test.py +168 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-throw-on-failure-test_.cc +71 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-uninitialized-test.py +67 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/googletest-uninitialized-test_.cc +42 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest-typed-test2_test.cc +44 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest-typed-test_test.cc +462 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest-typed-test_test.h +65 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest-unittest-api_test.cc +341 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_all_test.cc +46 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_assert_by_exception_test.cc +116 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_environment_test.cc +188 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_help_test.py +170 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_help_test_.cc +45 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_json_test_utils.py +60 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_list_output_unittest.py +141 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_list_output_unittest_.cc +51 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_main_unittest.cc +44 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_no_test_unittest.cc +54 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_pred_impl_unittest.cc +2427 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_premature_exit_test.cc +126 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_prod_test.cc +56 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_repeat_test.cc +233 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_skip_check_output_test.py +59 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_skip_environment_check_output_test.py +54 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_skip_in_environment_setup_test.cc +49 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_skip_test.cc +55 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_sole_header_test.cc +56 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_stress_test.cc +248 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_test_macro_stack_footprint_test.cc +89 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_test_utils.py +314 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_testbridge_test.py +63 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_testbridge_test_.cc +43 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_throw_on_failure_ex_test.cc +90 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_unittest.cc +7496 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_xml_outfile1_test_.cc +43 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_xml_outfile2_test_.cc +43 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_xml_outfiles_test.py +135 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_xml_output_unittest.py +389 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_xml_output_unittest_.cc +188 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/gtest_xml_test_utils.py +196 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/production.cc +35 -0
- package/cpp/leveldb/third_party/googletest/googletest/test/production.h +54 -0
- package/cpp/leveldb/third_party/googletest/library.json +66 -0
- package/cpp/leveldb/third_party/googletest/platformio.ini +47 -0
- package/cpp/leveldb/util/arena.cc +66 -0
- package/cpp/leveldb/util/arena.h +71 -0
- package/cpp/leveldb/util/arena_test.cc +66 -0
- package/cpp/leveldb/util/bloom.cc +92 -0
- package/cpp/leveldb/util/bloom_test.cc +159 -0
- package/cpp/leveldb/util/cache.cc +401 -0
- package/cpp/leveldb/util/cache_test.cc +229 -0
- package/cpp/leveldb/util/coding.cc +166 -0
- package/cpp/leveldb/util/coding.h +122 -0
- package/cpp/leveldb/util/coding_test.cc +198 -0
- package/cpp/leveldb/util/comparator.cc +75 -0
- package/cpp/leveldb/util/crc32c.cc +380 -0
- package/cpp/leveldb/util/crc32c.h +43 -0
- package/cpp/leveldb/util/crc32c_test.cc +61 -0
- package/cpp/leveldb/util/env.cc +108 -0
- package/cpp/leveldb/util/env_posix.cc +893 -0
- package/cpp/leveldb/util/env_posix_test.cc +353 -0
- package/cpp/leveldb/util/env_posix_test_helper.h +28 -0
- package/cpp/leveldb/util/env_test.cc +240 -0
- package/cpp/leveldb/util/env_windows.cc +796 -0
- package/cpp/leveldb/util/env_windows_test.cc +65 -0
- package/cpp/leveldb/util/env_windows_test_helper.h +25 -0
- package/cpp/leveldb/util/filter_policy.cc +11 -0
- package/cpp/leveldb/util/hash.cc +55 -0
- package/cpp/leveldb/util/hash.h +19 -0
- package/cpp/leveldb/util/hash_test.cc +46 -0
- package/cpp/leveldb/util/histogram.cc +272 -0
- package/cpp/leveldb/util/histogram.h +44 -0
- package/cpp/leveldb/util/logging.cc +82 -0
- package/cpp/leveldb/util/logging.h +44 -0
- package/cpp/leveldb/util/logging_test.cc +145 -0
- package/cpp/leveldb/util/mutexlock.h +39 -0
- package/cpp/leveldb/util/no_destructor.h +46 -0
- package/cpp/leveldb/util/no_destructor_test.cc +49 -0
- package/cpp/leveldb/util/options.cc +14 -0
- package/cpp/leveldb/util/posix_logger.h +130 -0
- package/cpp/leveldb/util/random.h +63 -0
- package/cpp/leveldb/util/status.cc +77 -0
- package/cpp/leveldb/util/status_test.cc +44 -0
- package/cpp/leveldb/util/testutil.cc +51 -0
- package/cpp/leveldb/util/testutil.h +82 -0
- package/cpp/leveldb/util/windows_logger.h +124 -0
- package/cpp/react-native-leveldb.cpp +694 -0
- package/cpp/react-native-leveldb.h +4 -0
- package/ios/Leveldb.h +9 -0
- package/ios/Leveldb.mm +35 -0
- package/ios/Leveldb.xcodeproj/project.pbxproj +288 -0
- package/lib/commonjs/fake.js +181 -0
- package/lib/commonjs/fake.js.map +1 -0
- package/lib/commonjs/fake.test.js +30 -0
- package/lib/commonjs/fake.test.js.map +1 -0
- package/lib/commonjs/index.js +172 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/module/fake.js +171 -0
- package/lib/module/fake.js.map +1 -0
- package/lib/module/fake.test.js +30 -0
- package/lib/module/fake.test.js.map +1 -0
- package/lib/module/index.js +165 -0
- package/lib/module/index.js.map +1 -0
- package/lib/typescript/fake.d.ts +34 -0
- package/lib/typescript/fake.d.ts.map +1 -0
- package/lib/typescript/fake.test.d.ts +2 -0
- package/lib/typescript/fake.test.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +72 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/package.json +157 -0
- package/rn-leveldb.podspec +30 -0
- package/src/fake.test.ts +37 -0
- package/src/fake.ts +203 -0
- package/src/index.ts +291 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file. See the AUTHORS file for names of contributors.
|
|
4
|
+
|
|
5
|
+
#ifndef STORAGE_LEVELDB_INCLUDE_OPTIONS_H_
|
|
6
|
+
#define STORAGE_LEVELDB_INCLUDE_OPTIONS_H_
|
|
7
|
+
|
|
8
|
+
#include <cstddef>
|
|
9
|
+
|
|
10
|
+
#include "leveldb/export.h"
|
|
11
|
+
|
|
12
|
+
namespace leveldb {
|
|
13
|
+
|
|
14
|
+
class Cache;
|
|
15
|
+
class Comparator;
|
|
16
|
+
class Env;
|
|
17
|
+
class FilterPolicy;
|
|
18
|
+
class Logger;
|
|
19
|
+
class Snapshot;
|
|
20
|
+
|
|
21
|
+
// DB contents are stored in a set of blocks, each of which holds a
|
|
22
|
+
// sequence of key,value pairs. Each block may be compressed before
|
|
23
|
+
// being stored in a file. The following enum describes which
|
|
24
|
+
// compression method (if any) is used to compress a block.
|
|
25
|
+
enum CompressionType {
|
|
26
|
+
// NOTE: do not change the values of existing entries, as these are
|
|
27
|
+
// part of the persistent format on disk.
|
|
28
|
+
kNoCompression = 0x0,
|
|
29
|
+
kSnappyCompression = 0x1
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// Options to control the behavior of a database (passed to DB::Open)
|
|
33
|
+
struct LEVELDB_EXPORT Options {
|
|
34
|
+
// Create an Options object with default values for all fields.
|
|
35
|
+
Options();
|
|
36
|
+
|
|
37
|
+
// -------------------
|
|
38
|
+
// Parameters that affect behavior
|
|
39
|
+
|
|
40
|
+
// Comparator used to define the order of keys in the table.
|
|
41
|
+
// Default: a comparator that uses lexicographic byte-wise ordering
|
|
42
|
+
//
|
|
43
|
+
// REQUIRES: The client must ensure that the comparator supplied
|
|
44
|
+
// here has the same name and orders keys *exactly* the same as the
|
|
45
|
+
// comparator provided to previous open calls on the same DB.
|
|
46
|
+
const Comparator* comparator;
|
|
47
|
+
|
|
48
|
+
// If true, the database will be created if it is missing.
|
|
49
|
+
bool create_if_missing = false;
|
|
50
|
+
|
|
51
|
+
// If true, an error is raised if the database already exists.
|
|
52
|
+
bool error_if_exists = false;
|
|
53
|
+
|
|
54
|
+
// If true, the implementation will do aggressive checking of the
|
|
55
|
+
// data it is processing and will stop early if it detects any
|
|
56
|
+
// errors. This may have unforeseen ramifications: for example, a
|
|
57
|
+
// corruption of one DB entry may cause a large number of entries to
|
|
58
|
+
// become unreadable or for the entire DB to become unopenable.
|
|
59
|
+
bool paranoid_checks = false;
|
|
60
|
+
|
|
61
|
+
// Use the specified object to interact with the environment,
|
|
62
|
+
// e.g. to read/write files, schedule background work, etc.
|
|
63
|
+
// Default: Env::Default()
|
|
64
|
+
Env* env;
|
|
65
|
+
|
|
66
|
+
// Any internal progress/error information generated by the db will
|
|
67
|
+
// be written to info_log if it is non-null, or to a file stored
|
|
68
|
+
// in the same directory as the DB contents if info_log is null.
|
|
69
|
+
Logger* info_log = nullptr;
|
|
70
|
+
|
|
71
|
+
// -------------------
|
|
72
|
+
// Parameters that affect performance
|
|
73
|
+
|
|
74
|
+
// Amount of data to build up in memory (backed by an unsorted log
|
|
75
|
+
// on disk) before converting to a sorted on-disk file.
|
|
76
|
+
//
|
|
77
|
+
// Larger values increase performance, especially during bulk loads.
|
|
78
|
+
// Up to two write buffers may be held in memory at the same time,
|
|
79
|
+
// so you may wish to adjust this parameter to control memory usage.
|
|
80
|
+
// Also, a larger write buffer will result in a longer recovery time
|
|
81
|
+
// the next time the database is opened.
|
|
82
|
+
size_t write_buffer_size = 4 * 1024 * 1024;
|
|
83
|
+
|
|
84
|
+
// Number of open files that can be used by the DB. You may need to
|
|
85
|
+
// increase this if your database has a large working set (budget
|
|
86
|
+
// one open file per 2MB of working set).
|
|
87
|
+
int max_open_files = 1000;
|
|
88
|
+
|
|
89
|
+
// Control over blocks (user data is stored in a set of blocks, and
|
|
90
|
+
// a block is the unit of reading from disk).
|
|
91
|
+
|
|
92
|
+
// If non-null, use the specified cache for blocks.
|
|
93
|
+
// If null, leveldb will automatically create and use an 8MB internal cache.
|
|
94
|
+
Cache* block_cache = nullptr;
|
|
95
|
+
|
|
96
|
+
// Approximate size of user data packed per block. Note that the
|
|
97
|
+
// block size specified here corresponds to uncompressed data. The
|
|
98
|
+
// actual size of the unit read from disk may be smaller if
|
|
99
|
+
// compression is enabled. This parameter can be changed dynamically.
|
|
100
|
+
size_t block_size = 4 * 1024;
|
|
101
|
+
|
|
102
|
+
// Number of keys between restart points for delta encoding of keys.
|
|
103
|
+
// This parameter can be changed dynamically. Most clients should
|
|
104
|
+
// leave this parameter alone.
|
|
105
|
+
int block_restart_interval = 16;
|
|
106
|
+
|
|
107
|
+
// Leveldb will write up to this amount of bytes to a file before
|
|
108
|
+
// switching to a new one.
|
|
109
|
+
// Most clients should leave this parameter alone. However if your
|
|
110
|
+
// filesystem is more efficient with larger files, you could
|
|
111
|
+
// consider increasing the value. The downside will be longer
|
|
112
|
+
// compactions and hence longer latency/performance hiccups.
|
|
113
|
+
// Another reason to increase this parameter might be when you are
|
|
114
|
+
// initially populating a large database.
|
|
115
|
+
size_t max_file_size = 2 * 1024 * 1024;
|
|
116
|
+
|
|
117
|
+
// Compress blocks using the specified compression algorithm. This
|
|
118
|
+
// parameter can be changed dynamically.
|
|
119
|
+
//
|
|
120
|
+
// Default: kSnappyCompression, which gives lightweight but fast
|
|
121
|
+
// compression.
|
|
122
|
+
//
|
|
123
|
+
// Typical speeds of kSnappyCompression on an Intel(R) Core(TM)2 2.4GHz:
|
|
124
|
+
// ~200-500MB/s compression
|
|
125
|
+
// ~400-800MB/s decompression
|
|
126
|
+
// Note that these speeds are significantly faster than most
|
|
127
|
+
// persistent storage speeds, and therefore it is typically never
|
|
128
|
+
// worth switching to kNoCompression. Even if the input data is
|
|
129
|
+
// incompressible, the kSnappyCompression implementation will
|
|
130
|
+
// efficiently detect that and will switch to uncompressed mode.
|
|
131
|
+
CompressionType compression = kSnappyCompression;
|
|
132
|
+
|
|
133
|
+
// EXPERIMENTAL: If true, append to existing MANIFEST and log files
|
|
134
|
+
// when a database is opened. This can significantly speed up open.
|
|
135
|
+
//
|
|
136
|
+
// Default: currently false, but may become true later.
|
|
137
|
+
bool reuse_logs = false;
|
|
138
|
+
|
|
139
|
+
// If non-null, use the specified filter policy to reduce disk reads.
|
|
140
|
+
// Many applications will benefit from passing the result of
|
|
141
|
+
// NewBloomFilterPolicy() here.
|
|
142
|
+
const FilterPolicy* filter_policy = nullptr;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
// Options that control read operations
|
|
146
|
+
struct LEVELDB_EXPORT ReadOptions {
|
|
147
|
+
ReadOptions() = default;
|
|
148
|
+
|
|
149
|
+
// If true, all data read from underlying storage will be
|
|
150
|
+
// verified against corresponding checksums.
|
|
151
|
+
bool verify_checksums = false;
|
|
152
|
+
|
|
153
|
+
// Should the data read for this iteration be cached in memory?
|
|
154
|
+
// Callers may wish to set this field to false for bulk scans.
|
|
155
|
+
bool fill_cache = true;
|
|
156
|
+
|
|
157
|
+
// If "snapshot" is non-null, read as of the supplied snapshot
|
|
158
|
+
// (which must belong to the DB that is being read and which must
|
|
159
|
+
// not have been released). If "snapshot" is null, use an implicit
|
|
160
|
+
// snapshot of the state at the beginning of this read operation.
|
|
161
|
+
const Snapshot* snapshot = nullptr;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
// Options that control write operations
|
|
165
|
+
struct LEVELDB_EXPORT WriteOptions {
|
|
166
|
+
WriteOptions() = default;
|
|
167
|
+
|
|
168
|
+
// If true, the write will be flushed from the operating system
|
|
169
|
+
// buffer cache (by calling WritableFile::Sync()) before the write
|
|
170
|
+
// is considered complete. If this flag is true, writes will be
|
|
171
|
+
// slower.
|
|
172
|
+
//
|
|
173
|
+
// If this flag is false, and the machine crashes, some recent
|
|
174
|
+
// writes may be lost. Note that if it is just the process that
|
|
175
|
+
// crashes (i.e., the machine does not reboot), no writes will be
|
|
176
|
+
// lost even if sync==false.
|
|
177
|
+
//
|
|
178
|
+
// In other words, a DB write with sync==false has similar
|
|
179
|
+
// crash semantics as the "write()" system call. A DB write
|
|
180
|
+
// with sync==true has similar crash semantics to a "write()"
|
|
181
|
+
// system call followed by "fsync()".
|
|
182
|
+
bool sync = false;
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
} // namespace leveldb
|
|
186
|
+
|
|
187
|
+
#endif // STORAGE_LEVELDB_INCLUDE_OPTIONS_H_
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file. See the AUTHORS file for names of contributors.
|
|
4
|
+
//
|
|
5
|
+
// Slice is a simple structure containing a pointer into some external
|
|
6
|
+
// storage and a size. The user of a Slice must ensure that the slice
|
|
7
|
+
// is not used after the corresponding external storage has been
|
|
8
|
+
// deallocated.
|
|
9
|
+
//
|
|
10
|
+
// Multiple threads can invoke const methods on a Slice without
|
|
11
|
+
// external synchronization, but if any of the threads may call a
|
|
12
|
+
// non-const method, all threads accessing the same Slice must use
|
|
13
|
+
// external synchronization.
|
|
14
|
+
|
|
15
|
+
#ifndef STORAGE_LEVELDB_INCLUDE_SLICE_H_
|
|
16
|
+
#define STORAGE_LEVELDB_INCLUDE_SLICE_H_
|
|
17
|
+
|
|
18
|
+
#include <cassert>
|
|
19
|
+
#include <cstddef>
|
|
20
|
+
#include <cstring>
|
|
21
|
+
#include <string>
|
|
22
|
+
|
|
23
|
+
#include "leveldb/export.h"
|
|
24
|
+
|
|
25
|
+
namespace leveldb {
|
|
26
|
+
|
|
27
|
+
class LEVELDB_EXPORT Slice {
|
|
28
|
+
public:
|
|
29
|
+
// Create an empty slice.
|
|
30
|
+
Slice() : data_(""), size_(0) {}
|
|
31
|
+
|
|
32
|
+
// Create a slice that refers to d[0,n-1].
|
|
33
|
+
Slice(const char* d, size_t n) : data_(d), size_(n) {}
|
|
34
|
+
|
|
35
|
+
// Create a slice that refers to the contents of "s"
|
|
36
|
+
Slice(const std::string& s) : data_(s.data()), size_(s.size()) {}
|
|
37
|
+
|
|
38
|
+
// Create a slice that refers to s[0,strlen(s)-1]
|
|
39
|
+
Slice(const char* s) : data_(s), size_(strlen(s)) {}
|
|
40
|
+
|
|
41
|
+
// Intentionally copyable.
|
|
42
|
+
Slice(const Slice&) = default;
|
|
43
|
+
Slice& operator=(const Slice&) = default;
|
|
44
|
+
|
|
45
|
+
// Return a pointer to the beginning of the referenced data
|
|
46
|
+
const char* data() const { return data_; }
|
|
47
|
+
|
|
48
|
+
// Return the length (in bytes) of the referenced data
|
|
49
|
+
size_t size() const { return size_; }
|
|
50
|
+
|
|
51
|
+
// Return true iff the length of the referenced data is zero
|
|
52
|
+
bool empty() const { return size_ == 0; }
|
|
53
|
+
|
|
54
|
+
// Return the ith byte in the referenced data.
|
|
55
|
+
// REQUIRES: n < size()
|
|
56
|
+
char operator[](size_t n) const {
|
|
57
|
+
assert(n < size());
|
|
58
|
+
return data_[n];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Change this slice to refer to an empty array
|
|
62
|
+
void clear() {
|
|
63
|
+
data_ = "";
|
|
64
|
+
size_ = 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Drop the first "n" bytes from this slice.
|
|
68
|
+
void remove_prefix(size_t n) {
|
|
69
|
+
assert(n <= size());
|
|
70
|
+
data_ += n;
|
|
71
|
+
size_ -= n;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Return a string that contains the copy of the referenced data.
|
|
75
|
+
std::string ToString() const { return std::string(data_, size_); }
|
|
76
|
+
|
|
77
|
+
// Three-way comparison. Returns value:
|
|
78
|
+
// < 0 iff "*this" < "b",
|
|
79
|
+
// == 0 iff "*this" == "b",
|
|
80
|
+
// > 0 iff "*this" > "b"
|
|
81
|
+
int compare(const Slice& b) const;
|
|
82
|
+
|
|
83
|
+
// Return true iff "x" is a prefix of "*this"
|
|
84
|
+
bool starts_with(const Slice& x) const {
|
|
85
|
+
return ((size_ >= x.size_) && (memcmp(data_, x.data_, x.size_) == 0));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
private:
|
|
89
|
+
const char* data_;
|
|
90
|
+
size_t size_;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
inline bool operator==(const Slice& x, const Slice& y) {
|
|
94
|
+
return ((x.size() == y.size()) &&
|
|
95
|
+
(memcmp(x.data(), y.data(), x.size()) == 0));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
inline bool operator!=(const Slice& x, const Slice& y) { return !(x == y); }
|
|
99
|
+
|
|
100
|
+
inline int Slice::compare(const Slice& b) const {
|
|
101
|
+
const size_t min_len = (size_ < b.size_) ? size_ : b.size_;
|
|
102
|
+
int r = memcmp(data_, b.data_, min_len);
|
|
103
|
+
if (r == 0) {
|
|
104
|
+
if (size_ < b.size_)
|
|
105
|
+
r = -1;
|
|
106
|
+
else if (size_ > b.size_)
|
|
107
|
+
r = +1;
|
|
108
|
+
}
|
|
109
|
+
return r;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
} // namespace leveldb
|
|
113
|
+
|
|
114
|
+
#endif // STORAGE_LEVELDB_INCLUDE_SLICE_H_
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file. See the AUTHORS file for names of contributors.
|
|
4
|
+
//
|
|
5
|
+
// A Status encapsulates the result of an operation. It may indicate success,
|
|
6
|
+
// or it may indicate an error with an associated error message.
|
|
7
|
+
//
|
|
8
|
+
// Multiple threads can invoke const methods on a Status without
|
|
9
|
+
// external synchronization, but if any of the threads may call a
|
|
10
|
+
// non-const method, all threads accessing the same Status must use
|
|
11
|
+
// external synchronization.
|
|
12
|
+
|
|
13
|
+
#ifndef STORAGE_LEVELDB_INCLUDE_STATUS_H_
|
|
14
|
+
#define STORAGE_LEVELDB_INCLUDE_STATUS_H_
|
|
15
|
+
|
|
16
|
+
#include <algorithm>
|
|
17
|
+
#include <string>
|
|
18
|
+
|
|
19
|
+
#include "leveldb/export.h"
|
|
20
|
+
#include "leveldb/slice.h"
|
|
21
|
+
|
|
22
|
+
namespace leveldb {
|
|
23
|
+
|
|
24
|
+
class LEVELDB_EXPORT Status {
|
|
25
|
+
public:
|
|
26
|
+
// Create a success status.
|
|
27
|
+
Status() noexcept : state_(nullptr) {}
|
|
28
|
+
~Status() { delete[] state_; }
|
|
29
|
+
|
|
30
|
+
Status(const Status& rhs);
|
|
31
|
+
Status& operator=(const Status& rhs);
|
|
32
|
+
|
|
33
|
+
Status(Status&& rhs) noexcept : state_(rhs.state_) { rhs.state_ = nullptr; }
|
|
34
|
+
Status& operator=(Status&& rhs) noexcept;
|
|
35
|
+
|
|
36
|
+
// Return a success status.
|
|
37
|
+
static Status OK() { return Status(); }
|
|
38
|
+
|
|
39
|
+
// Return error status of an appropriate type.
|
|
40
|
+
static Status NotFound(const Slice& msg, const Slice& msg2 = Slice()) {
|
|
41
|
+
return Status(kNotFound, msg, msg2);
|
|
42
|
+
}
|
|
43
|
+
static Status Corruption(const Slice& msg, const Slice& msg2 = Slice()) {
|
|
44
|
+
return Status(kCorruption, msg, msg2);
|
|
45
|
+
}
|
|
46
|
+
static Status NotSupported(const Slice& msg, const Slice& msg2 = Slice()) {
|
|
47
|
+
return Status(kNotSupported, msg, msg2);
|
|
48
|
+
}
|
|
49
|
+
static Status InvalidArgument(const Slice& msg, const Slice& msg2 = Slice()) {
|
|
50
|
+
return Status(kInvalidArgument, msg, msg2);
|
|
51
|
+
}
|
|
52
|
+
static Status IOError(const Slice& msg, const Slice& msg2 = Slice()) {
|
|
53
|
+
return Status(kIOError, msg, msg2);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Returns true iff the status indicates success.
|
|
57
|
+
bool ok() const { return (state_ == nullptr); }
|
|
58
|
+
|
|
59
|
+
// Returns true iff the status indicates a NotFound error.
|
|
60
|
+
bool IsNotFound() const { return code() == kNotFound; }
|
|
61
|
+
|
|
62
|
+
// Returns true iff the status indicates a Corruption error.
|
|
63
|
+
bool IsCorruption() const { return code() == kCorruption; }
|
|
64
|
+
|
|
65
|
+
// Returns true iff the status indicates an IOError.
|
|
66
|
+
bool IsIOError() const { return code() == kIOError; }
|
|
67
|
+
|
|
68
|
+
// Returns true iff the status indicates a NotSupportedError.
|
|
69
|
+
bool IsNotSupportedError() const { return code() == kNotSupported; }
|
|
70
|
+
|
|
71
|
+
// Returns true iff the status indicates an InvalidArgument.
|
|
72
|
+
bool IsInvalidArgument() const { return code() == kInvalidArgument; }
|
|
73
|
+
|
|
74
|
+
// Return a string representation of this status suitable for printing.
|
|
75
|
+
// Returns the string "OK" for success.
|
|
76
|
+
std::string ToString() const;
|
|
77
|
+
|
|
78
|
+
private:
|
|
79
|
+
enum Code {
|
|
80
|
+
kOk = 0,
|
|
81
|
+
kNotFound = 1,
|
|
82
|
+
kCorruption = 2,
|
|
83
|
+
kNotSupported = 3,
|
|
84
|
+
kInvalidArgument = 4,
|
|
85
|
+
kIOError = 5
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
Code code() const {
|
|
89
|
+
return (state_ == nullptr) ? kOk : static_cast<Code>(state_[4]);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
Status(Code code, const Slice& msg, const Slice& msg2);
|
|
93
|
+
static const char* CopyState(const char* s);
|
|
94
|
+
|
|
95
|
+
// OK status has a null state_. Otherwise, state_ is a new[] array
|
|
96
|
+
// of the following form:
|
|
97
|
+
// state_[0..3] == length of message
|
|
98
|
+
// state_[4] == code
|
|
99
|
+
// state_[5..] == message
|
|
100
|
+
const char* state_;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
inline Status::Status(const Status& rhs) {
|
|
104
|
+
state_ = (rhs.state_ == nullptr) ? nullptr : CopyState(rhs.state_);
|
|
105
|
+
}
|
|
106
|
+
inline Status& Status::operator=(const Status& rhs) {
|
|
107
|
+
// The following condition catches both aliasing (when this == &rhs),
|
|
108
|
+
// and the common case where both rhs and *this are ok.
|
|
109
|
+
if (state_ != rhs.state_) {
|
|
110
|
+
delete[] state_;
|
|
111
|
+
state_ = (rhs.state_ == nullptr) ? nullptr : CopyState(rhs.state_);
|
|
112
|
+
}
|
|
113
|
+
return *this;
|
|
114
|
+
}
|
|
115
|
+
inline Status& Status::operator=(Status&& rhs) noexcept {
|
|
116
|
+
std::swap(state_, rhs.state_);
|
|
117
|
+
return *this;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
} // namespace leveldb
|
|
121
|
+
|
|
122
|
+
#endif // STORAGE_LEVELDB_INCLUDE_STATUS_H_
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file. See the AUTHORS file for names of contributors.
|
|
4
|
+
|
|
5
|
+
#ifndef STORAGE_LEVELDB_INCLUDE_TABLE_H_
|
|
6
|
+
#define STORAGE_LEVELDB_INCLUDE_TABLE_H_
|
|
7
|
+
|
|
8
|
+
#include <cstdint>
|
|
9
|
+
|
|
10
|
+
#include "leveldb/export.h"
|
|
11
|
+
#include "leveldb/iterator.h"
|
|
12
|
+
|
|
13
|
+
namespace leveldb {
|
|
14
|
+
|
|
15
|
+
class Block;
|
|
16
|
+
class BlockHandle;
|
|
17
|
+
class Footer;
|
|
18
|
+
struct Options;
|
|
19
|
+
class RandomAccessFile;
|
|
20
|
+
struct ReadOptions;
|
|
21
|
+
class TableCache;
|
|
22
|
+
|
|
23
|
+
// A Table is a sorted map from strings to strings. Tables are
|
|
24
|
+
// immutable and persistent. A Table may be safely accessed from
|
|
25
|
+
// multiple threads without external synchronization.
|
|
26
|
+
class LEVELDB_EXPORT Table {
|
|
27
|
+
public:
|
|
28
|
+
// Attempt to open the table that is stored in bytes [0..file_size)
|
|
29
|
+
// of "file", and read the metadata entries necessary to allow
|
|
30
|
+
// retrieving data from the table.
|
|
31
|
+
//
|
|
32
|
+
// If successful, returns ok and sets "*table" to the newly opened
|
|
33
|
+
// table. The client should delete "*table" when no longer needed.
|
|
34
|
+
// If there was an error while initializing the table, sets "*table"
|
|
35
|
+
// to nullptr and returns a non-ok status. Does not take ownership of
|
|
36
|
+
// "*source", but the client must ensure that "source" remains live
|
|
37
|
+
// for the duration of the returned table's lifetime.
|
|
38
|
+
//
|
|
39
|
+
// *file must remain live while this Table is in use.
|
|
40
|
+
static Status Open(const Options& options, RandomAccessFile* file,
|
|
41
|
+
uint64_t file_size, Table** table);
|
|
42
|
+
|
|
43
|
+
Table(const Table&) = delete;
|
|
44
|
+
Table& operator=(const Table&) = delete;
|
|
45
|
+
|
|
46
|
+
~Table();
|
|
47
|
+
|
|
48
|
+
// Returns a new iterator over the table contents.
|
|
49
|
+
// The result of NewIterator() is initially invalid (caller must
|
|
50
|
+
// call one of the Seek methods on the iterator before using it).
|
|
51
|
+
Iterator* NewIterator(const ReadOptions&) const;
|
|
52
|
+
|
|
53
|
+
// Given a key, return an approximate byte offset in the file where
|
|
54
|
+
// the data for that key begins (or would begin if the key were
|
|
55
|
+
// present in the file). The returned value is in terms of file
|
|
56
|
+
// bytes, and so includes effects like compression of the underlying data.
|
|
57
|
+
// E.g., the approximate offset of the last key in the table will
|
|
58
|
+
// be close to the file length.
|
|
59
|
+
uint64_t ApproximateOffsetOf(const Slice& key) const;
|
|
60
|
+
|
|
61
|
+
private:
|
|
62
|
+
friend class TableCache;
|
|
63
|
+
struct Rep;
|
|
64
|
+
|
|
65
|
+
static Iterator* BlockReader(void*, const ReadOptions&, const Slice&);
|
|
66
|
+
|
|
67
|
+
explicit Table(Rep* rep) : rep_(rep) {}
|
|
68
|
+
|
|
69
|
+
// Calls (*handle_result)(arg, ...) with the entry found after a call
|
|
70
|
+
// to Seek(key). May not make such a call if filter policy says
|
|
71
|
+
// that key is not present.
|
|
72
|
+
Status InternalGet(const ReadOptions&, const Slice& key, void* arg,
|
|
73
|
+
void (*handle_result)(void* arg, const Slice& k,
|
|
74
|
+
const Slice& v));
|
|
75
|
+
|
|
76
|
+
void ReadMeta(const Footer& footer);
|
|
77
|
+
void ReadFilter(const Slice& filter_handle_value);
|
|
78
|
+
|
|
79
|
+
Rep* const rep_;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
} // namespace leveldb
|
|
83
|
+
|
|
84
|
+
#endif // STORAGE_LEVELDB_INCLUDE_TABLE_H_
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file. See the AUTHORS file for names of contributors.
|
|
4
|
+
//
|
|
5
|
+
// TableBuilder provides the interface used to build a Table
|
|
6
|
+
// (an immutable and sorted map from keys to values).
|
|
7
|
+
//
|
|
8
|
+
// Multiple threads can invoke const methods on a TableBuilder without
|
|
9
|
+
// external synchronization, but if any of the threads may call a
|
|
10
|
+
// non-const method, all threads accessing the same TableBuilder must use
|
|
11
|
+
// external synchronization.
|
|
12
|
+
|
|
13
|
+
#ifndef STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_
|
|
14
|
+
#define STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_
|
|
15
|
+
|
|
16
|
+
#include <cstdint>
|
|
17
|
+
|
|
18
|
+
#include "leveldb/export.h"
|
|
19
|
+
#include "leveldb/options.h"
|
|
20
|
+
#include "leveldb/status.h"
|
|
21
|
+
|
|
22
|
+
namespace leveldb {
|
|
23
|
+
|
|
24
|
+
class BlockBuilder;
|
|
25
|
+
class BlockHandle;
|
|
26
|
+
class WritableFile;
|
|
27
|
+
|
|
28
|
+
class LEVELDB_EXPORT TableBuilder {
|
|
29
|
+
public:
|
|
30
|
+
// Create a builder that will store the contents of the table it is
|
|
31
|
+
// building in *file. Does not close the file. It is up to the
|
|
32
|
+
// caller to close the file after calling Finish().
|
|
33
|
+
TableBuilder(const Options& options, WritableFile* file);
|
|
34
|
+
|
|
35
|
+
TableBuilder(const TableBuilder&) = delete;
|
|
36
|
+
TableBuilder& operator=(const TableBuilder&) = delete;
|
|
37
|
+
|
|
38
|
+
// REQUIRES: Either Finish() or Abandon() has been called.
|
|
39
|
+
~TableBuilder();
|
|
40
|
+
|
|
41
|
+
// Change the options used by this builder. Note: only some of the
|
|
42
|
+
// option fields can be changed after construction. If a field is
|
|
43
|
+
// not allowed to change dynamically and its value in the structure
|
|
44
|
+
// passed to the constructor is different from its value in the
|
|
45
|
+
// structure passed to this method, this method will return an error
|
|
46
|
+
// without changing any fields.
|
|
47
|
+
Status ChangeOptions(const Options& options);
|
|
48
|
+
|
|
49
|
+
// Add key,value to the table being constructed.
|
|
50
|
+
// REQUIRES: key is after any previously added key according to comparator.
|
|
51
|
+
// REQUIRES: Finish(), Abandon() have not been called
|
|
52
|
+
void Add(const Slice& key, const Slice& value);
|
|
53
|
+
|
|
54
|
+
// Advanced operation: flush any buffered key/value pairs to file.
|
|
55
|
+
// Can be used to ensure that two adjacent entries never live in
|
|
56
|
+
// the same data block. Most clients should not need to use this method.
|
|
57
|
+
// REQUIRES: Finish(), Abandon() have not been called
|
|
58
|
+
void Flush();
|
|
59
|
+
|
|
60
|
+
// Return non-ok iff some error has been detected.
|
|
61
|
+
Status status() const;
|
|
62
|
+
|
|
63
|
+
// Finish building the table. Stops using the file passed to the
|
|
64
|
+
// constructor after this function returns.
|
|
65
|
+
// REQUIRES: Finish(), Abandon() have not been called
|
|
66
|
+
Status Finish();
|
|
67
|
+
|
|
68
|
+
// Indicate that the contents of this builder should be abandoned. Stops
|
|
69
|
+
// using the file passed to the constructor after this function returns.
|
|
70
|
+
// If the caller is not going to call Finish(), it must call Abandon()
|
|
71
|
+
// before destroying this builder.
|
|
72
|
+
// REQUIRES: Finish(), Abandon() have not been called
|
|
73
|
+
void Abandon();
|
|
74
|
+
|
|
75
|
+
// Number of calls to Add() so far.
|
|
76
|
+
uint64_t NumEntries() const;
|
|
77
|
+
|
|
78
|
+
// Size of the file generated so far. If invoked after a successful
|
|
79
|
+
// Finish() call, returns the size of the final generated file.
|
|
80
|
+
uint64_t FileSize() const;
|
|
81
|
+
|
|
82
|
+
private:
|
|
83
|
+
bool ok() const { return status().ok(); }
|
|
84
|
+
void WriteBlock(BlockBuilder* block, BlockHandle* handle);
|
|
85
|
+
void WriteRawBlock(const Slice& data, CompressionType, BlockHandle* handle);
|
|
86
|
+
|
|
87
|
+
struct Rep;
|
|
88
|
+
Rep* rep_;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
} // namespace leveldb
|
|
92
|
+
|
|
93
|
+
#endif // STORAGE_LEVELDB_INCLUDE_TABLE_BUILDER_H_
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file. See the AUTHORS file for names of contributors.
|
|
4
|
+
//
|
|
5
|
+
// WriteBatch holds a collection of updates to apply atomically to a DB.
|
|
6
|
+
//
|
|
7
|
+
// The updates are applied in the order in which they are added
|
|
8
|
+
// to the WriteBatch. For example, the value of "key" will be "v3"
|
|
9
|
+
// after the following batch is written:
|
|
10
|
+
//
|
|
11
|
+
// batch.Put("key", "v1");
|
|
12
|
+
// batch.Delete("key");
|
|
13
|
+
// batch.Put("key", "v2");
|
|
14
|
+
// batch.Put("key", "v3");
|
|
15
|
+
//
|
|
16
|
+
// Multiple threads can invoke const methods on a WriteBatch without
|
|
17
|
+
// external synchronization, but if any of the threads may call a
|
|
18
|
+
// non-const method, all threads accessing the same WriteBatch must use
|
|
19
|
+
// external synchronization.
|
|
20
|
+
|
|
21
|
+
#ifndef STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_
|
|
22
|
+
#define STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_
|
|
23
|
+
|
|
24
|
+
#include <string>
|
|
25
|
+
|
|
26
|
+
#include "leveldb/export.h"
|
|
27
|
+
#include "leveldb/status.h"
|
|
28
|
+
|
|
29
|
+
namespace leveldb {
|
|
30
|
+
|
|
31
|
+
class Slice;
|
|
32
|
+
|
|
33
|
+
class LEVELDB_EXPORT WriteBatch {
|
|
34
|
+
public:
|
|
35
|
+
class LEVELDB_EXPORT Handler {
|
|
36
|
+
public:
|
|
37
|
+
virtual ~Handler();
|
|
38
|
+
virtual void Put(const Slice& key, const Slice& value) = 0;
|
|
39
|
+
virtual void Delete(const Slice& key) = 0;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
WriteBatch();
|
|
43
|
+
|
|
44
|
+
// Intentionally copyable.
|
|
45
|
+
WriteBatch(const WriteBatch&) = default;
|
|
46
|
+
WriteBatch& operator=(const WriteBatch&) = default;
|
|
47
|
+
|
|
48
|
+
~WriteBatch();
|
|
49
|
+
|
|
50
|
+
// Store the mapping "key->value" in the database.
|
|
51
|
+
void Put(const Slice& key, const Slice& value);
|
|
52
|
+
|
|
53
|
+
// If the database contains a mapping for "key", erase it. Else do nothing.
|
|
54
|
+
void Delete(const Slice& key);
|
|
55
|
+
|
|
56
|
+
// Clear all updates buffered in this batch.
|
|
57
|
+
void Clear();
|
|
58
|
+
|
|
59
|
+
// The size of the database changes caused by this batch.
|
|
60
|
+
//
|
|
61
|
+
// This number is tied to implementation details, and may change across
|
|
62
|
+
// releases. It is intended for LevelDB usage metrics.
|
|
63
|
+
size_t ApproximateSize() const;
|
|
64
|
+
|
|
65
|
+
// Copies the operations in "source" to this batch.
|
|
66
|
+
//
|
|
67
|
+
// This runs in O(source size) time. However, the constant factor is better
|
|
68
|
+
// than calling Iterate() over the source batch with a Handler that replicates
|
|
69
|
+
// the operations into this batch.
|
|
70
|
+
void Append(const WriteBatch& source);
|
|
71
|
+
|
|
72
|
+
// Support for iterating over the contents of a batch.
|
|
73
|
+
Status Iterate(Handler* handler) const;
|
|
74
|
+
|
|
75
|
+
private:
|
|
76
|
+
friend class WriteBatchInternal;
|
|
77
|
+
|
|
78
|
+
std::string rep_; // See comment in write_batch.cc for the format of rep_
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
} // namespace leveldb
|
|
82
|
+
|
|
83
|
+
#endif // STORAGE_LEVELDB_INCLUDE_WRITE_BATCH_H_
|