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,417 @@
|
|
|
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
|
+
// An Env is an interface used by the leveldb implementation to access
|
|
6
|
+
// operating system functionality like the filesystem etc. Callers
|
|
7
|
+
// may wish to provide a custom Env object when opening a database to
|
|
8
|
+
// get fine gain control; e.g., to rate limit file system operations.
|
|
9
|
+
//
|
|
10
|
+
// All Env implementations are safe for concurrent access from
|
|
11
|
+
// multiple threads without any external synchronization.
|
|
12
|
+
|
|
13
|
+
#ifndef STORAGE_LEVELDB_INCLUDE_ENV_H_
|
|
14
|
+
#define STORAGE_LEVELDB_INCLUDE_ENV_H_
|
|
15
|
+
|
|
16
|
+
#include <cstdarg>
|
|
17
|
+
#include <cstdint>
|
|
18
|
+
#include <string>
|
|
19
|
+
#include <vector>
|
|
20
|
+
|
|
21
|
+
#include "leveldb/export.h"
|
|
22
|
+
#include "leveldb/status.h"
|
|
23
|
+
|
|
24
|
+
// This workaround can be removed when leveldb::Env::DeleteFile is removed.
|
|
25
|
+
#if defined(_WIN32)
|
|
26
|
+
// On Windows, the method name DeleteFile (below) introduces the risk of
|
|
27
|
+
// triggering undefined behavior by exposing the compiler to different
|
|
28
|
+
// declarations of the Env class in different translation units.
|
|
29
|
+
//
|
|
30
|
+
// This is because <windows.h>, a fairly popular header file for Windows
|
|
31
|
+
// applications, defines a DeleteFile macro. So, files that include the Windows
|
|
32
|
+
// header before this header will contain an altered Env declaration.
|
|
33
|
+
//
|
|
34
|
+
// This workaround ensures that the compiler sees the same Env declaration,
|
|
35
|
+
// independently of whether <windows.h> was included.
|
|
36
|
+
#if defined(DeleteFile)
|
|
37
|
+
#undef DeleteFile
|
|
38
|
+
#define LEVELDB_DELETEFILE_UNDEFINED
|
|
39
|
+
#endif // defined(DeleteFile)
|
|
40
|
+
#endif // defined(_WIN32)
|
|
41
|
+
|
|
42
|
+
namespace leveldb {
|
|
43
|
+
|
|
44
|
+
class FileLock;
|
|
45
|
+
class Logger;
|
|
46
|
+
class RandomAccessFile;
|
|
47
|
+
class SequentialFile;
|
|
48
|
+
class Slice;
|
|
49
|
+
class WritableFile;
|
|
50
|
+
|
|
51
|
+
class LEVELDB_EXPORT Env {
|
|
52
|
+
public:
|
|
53
|
+
Env();
|
|
54
|
+
|
|
55
|
+
Env(const Env&) = delete;
|
|
56
|
+
Env& operator=(const Env&) = delete;
|
|
57
|
+
|
|
58
|
+
virtual ~Env();
|
|
59
|
+
|
|
60
|
+
// Return a default environment suitable for the current operating
|
|
61
|
+
// system. Sophisticated users may wish to provide their own Env
|
|
62
|
+
// implementation instead of relying on this default environment.
|
|
63
|
+
//
|
|
64
|
+
// The result of Default() belongs to leveldb and must never be deleted.
|
|
65
|
+
static Env* Default();
|
|
66
|
+
|
|
67
|
+
// Create an object that sequentially reads the file with the specified name.
|
|
68
|
+
// On success, stores a pointer to the new file in *result and returns OK.
|
|
69
|
+
// On failure stores nullptr in *result and returns non-OK. If the file does
|
|
70
|
+
// not exist, returns a non-OK status. Implementations should return a
|
|
71
|
+
// NotFound status when the file does not exist.
|
|
72
|
+
//
|
|
73
|
+
// The returned file will only be accessed by one thread at a time.
|
|
74
|
+
virtual Status NewSequentialFile(const std::string& fname,
|
|
75
|
+
SequentialFile** result) = 0;
|
|
76
|
+
|
|
77
|
+
// Create an object supporting random-access reads from the file with the
|
|
78
|
+
// specified name. On success, stores a pointer to the new file in
|
|
79
|
+
// *result and returns OK. On failure stores nullptr in *result and
|
|
80
|
+
// returns non-OK. If the file does not exist, returns a non-OK
|
|
81
|
+
// status. Implementations should return a NotFound status when the file does
|
|
82
|
+
// not exist.
|
|
83
|
+
//
|
|
84
|
+
// The returned file may be concurrently accessed by multiple threads.
|
|
85
|
+
virtual Status NewRandomAccessFile(const std::string& fname,
|
|
86
|
+
RandomAccessFile** result) = 0;
|
|
87
|
+
|
|
88
|
+
// Create an object that writes to a new file with the specified
|
|
89
|
+
// name. Deletes any existing file with the same name and creates a
|
|
90
|
+
// new file. On success, stores a pointer to the new file in
|
|
91
|
+
// *result and returns OK. On failure stores nullptr in *result and
|
|
92
|
+
// returns non-OK.
|
|
93
|
+
//
|
|
94
|
+
// The returned file will only be accessed by one thread at a time.
|
|
95
|
+
virtual Status NewWritableFile(const std::string& fname,
|
|
96
|
+
WritableFile** result) = 0;
|
|
97
|
+
|
|
98
|
+
// Create an object that either appends to an existing file, or
|
|
99
|
+
// writes to a new file (if the file does not exist to begin with).
|
|
100
|
+
// On success, stores a pointer to the new file in *result and
|
|
101
|
+
// returns OK. On failure stores nullptr in *result and returns
|
|
102
|
+
// non-OK.
|
|
103
|
+
//
|
|
104
|
+
// The returned file will only be accessed by one thread at a time.
|
|
105
|
+
//
|
|
106
|
+
// May return an IsNotSupportedError error if this Env does
|
|
107
|
+
// not allow appending to an existing file. Users of Env (including
|
|
108
|
+
// the leveldb implementation) must be prepared to deal with
|
|
109
|
+
// an Env that does not support appending.
|
|
110
|
+
virtual Status NewAppendableFile(const std::string& fname,
|
|
111
|
+
WritableFile** result);
|
|
112
|
+
|
|
113
|
+
// Returns true iff the named file exists.
|
|
114
|
+
virtual bool FileExists(const std::string& fname) = 0;
|
|
115
|
+
|
|
116
|
+
// Store in *result the names of the children of the specified directory.
|
|
117
|
+
// The names are relative to "dir".
|
|
118
|
+
// Original contents of *results are dropped.
|
|
119
|
+
virtual Status GetChildren(const std::string& dir,
|
|
120
|
+
std::vector<std::string>* result) = 0;
|
|
121
|
+
// Delete the named file.
|
|
122
|
+
//
|
|
123
|
+
// The default implementation calls DeleteFile, to support legacy Env
|
|
124
|
+
// implementations. Updated Env implementations must override RemoveFile and
|
|
125
|
+
// ignore the existence of DeleteFile. Updated code calling into the Env API
|
|
126
|
+
// must call RemoveFile instead of DeleteFile.
|
|
127
|
+
//
|
|
128
|
+
// A future release will remove DeleteDir and the default implementation of
|
|
129
|
+
// RemoveDir.
|
|
130
|
+
virtual Status RemoveFile(const std::string& fname);
|
|
131
|
+
|
|
132
|
+
// DEPRECATED: Modern Env implementations should override RemoveFile instead.
|
|
133
|
+
//
|
|
134
|
+
// The default implementation calls RemoveFile, to support legacy Env user
|
|
135
|
+
// code that calls this method on modern Env implementations. Modern Env user
|
|
136
|
+
// code should call RemoveFile.
|
|
137
|
+
//
|
|
138
|
+
// A future release will remove this method.
|
|
139
|
+
virtual Status DeleteFile(const std::string& fname);
|
|
140
|
+
|
|
141
|
+
// Create the specified directory.
|
|
142
|
+
virtual Status CreateDir(const std::string& dirname) = 0;
|
|
143
|
+
|
|
144
|
+
// Delete the specified directory.
|
|
145
|
+
//
|
|
146
|
+
// The default implementation calls DeleteDir, to support legacy Env
|
|
147
|
+
// implementations. Updated Env implementations must override RemoveDir and
|
|
148
|
+
// ignore the existence of DeleteDir. Modern code calling into the Env API
|
|
149
|
+
// must call RemoveDir instead of DeleteDir.
|
|
150
|
+
//
|
|
151
|
+
// A future release will remove DeleteDir and the default implementation of
|
|
152
|
+
// RemoveDir.
|
|
153
|
+
virtual Status RemoveDir(const std::string& dirname);
|
|
154
|
+
|
|
155
|
+
// DEPRECATED: Modern Env implementations should override RemoveDir instead.
|
|
156
|
+
//
|
|
157
|
+
// The default implementation calls RemoveDir, to support legacy Env user
|
|
158
|
+
// code that calls this method on modern Env implementations. Modern Env user
|
|
159
|
+
// code should call RemoveDir.
|
|
160
|
+
//
|
|
161
|
+
// A future release will remove this method.
|
|
162
|
+
virtual Status DeleteDir(const std::string& dirname);
|
|
163
|
+
|
|
164
|
+
// Store the size of fname in *file_size.
|
|
165
|
+
virtual Status GetFileSize(const std::string& fname, uint64_t* file_size) = 0;
|
|
166
|
+
|
|
167
|
+
// Rename file src to target.
|
|
168
|
+
virtual Status RenameFile(const std::string& src,
|
|
169
|
+
const std::string& target) = 0;
|
|
170
|
+
|
|
171
|
+
// Lock the specified file. Used to prevent concurrent access to
|
|
172
|
+
// the same db by multiple processes. On failure, stores nullptr in
|
|
173
|
+
// *lock and returns non-OK.
|
|
174
|
+
//
|
|
175
|
+
// On success, stores a pointer to the object that represents the
|
|
176
|
+
// acquired lock in *lock and returns OK. The caller should call
|
|
177
|
+
// UnlockFile(*lock) to release the lock. If the process exits,
|
|
178
|
+
// the lock will be automatically released.
|
|
179
|
+
//
|
|
180
|
+
// If somebody else already holds the lock, finishes immediately
|
|
181
|
+
// with a failure. I.e., this call does not wait for existing locks
|
|
182
|
+
// to go away.
|
|
183
|
+
//
|
|
184
|
+
// May create the named file if it does not already exist.
|
|
185
|
+
virtual Status LockFile(const std::string& fname, FileLock** lock) = 0;
|
|
186
|
+
|
|
187
|
+
// Release the lock acquired by a previous successful call to LockFile.
|
|
188
|
+
// REQUIRES: lock was returned by a successful LockFile() call
|
|
189
|
+
// REQUIRES: lock has not already been unlocked.
|
|
190
|
+
virtual Status UnlockFile(FileLock* lock) = 0;
|
|
191
|
+
|
|
192
|
+
// Arrange to run "(*function)(arg)" once in a background thread.
|
|
193
|
+
//
|
|
194
|
+
// "function" may run in an unspecified thread. Multiple functions
|
|
195
|
+
// added to the same Env may run concurrently in different threads.
|
|
196
|
+
// I.e., the caller may not assume that background work items are
|
|
197
|
+
// serialized.
|
|
198
|
+
virtual void Schedule(void (*function)(void* arg), void* arg) = 0;
|
|
199
|
+
|
|
200
|
+
// Start a new thread, invoking "function(arg)" within the new thread.
|
|
201
|
+
// When "function(arg)" returns, the thread will be destroyed.
|
|
202
|
+
virtual void StartThread(void (*function)(void* arg), void* arg) = 0;
|
|
203
|
+
|
|
204
|
+
// *path is set to a temporary directory that can be used for testing. It may
|
|
205
|
+
// or may not have just been created. The directory may or may not differ
|
|
206
|
+
// between runs of the same process, but subsequent calls will return the
|
|
207
|
+
// same directory.
|
|
208
|
+
virtual Status GetTestDirectory(std::string* path) = 0;
|
|
209
|
+
|
|
210
|
+
// Create and return a log file for storing informational messages.
|
|
211
|
+
virtual Status NewLogger(const std::string& fname, Logger** result) = 0;
|
|
212
|
+
|
|
213
|
+
// Returns the number of micro-seconds since some fixed point in time. Only
|
|
214
|
+
// useful for computing deltas of time.
|
|
215
|
+
virtual uint64_t NowMicros() = 0;
|
|
216
|
+
|
|
217
|
+
// Sleep/delay the thread for the prescribed number of micro-seconds.
|
|
218
|
+
virtual void SleepForMicroseconds(int micros) = 0;
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
// A file abstraction for reading sequentially through a file
|
|
222
|
+
class LEVELDB_EXPORT SequentialFile {
|
|
223
|
+
public:
|
|
224
|
+
SequentialFile() = default;
|
|
225
|
+
|
|
226
|
+
SequentialFile(const SequentialFile&) = delete;
|
|
227
|
+
SequentialFile& operator=(const SequentialFile&) = delete;
|
|
228
|
+
|
|
229
|
+
virtual ~SequentialFile();
|
|
230
|
+
|
|
231
|
+
// Read up to "n" bytes from the file. "scratch[0..n-1]" may be
|
|
232
|
+
// written by this routine. Sets "*result" to the data that was
|
|
233
|
+
// read (including if fewer than "n" bytes were successfully read).
|
|
234
|
+
// May set "*result" to point at data in "scratch[0..n-1]", so
|
|
235
|
+
// "scratch[0..n-1]" must be live when "*result" is used.
|
|
236
|
+
// If an error was encountered, returns a non-OK status.
|
|
237
|
+
//
|
|
238
|
+
// REQUIRES: External synchronization
|
|
239
|
+
virtual Status Read(size_t n, Slice* result, char* scratch) = 0;
|
|
240
|
+
|
|
241
|
+
// Skip "n" bytes from the file. This is guaranteed to be no
|
|
242
|
+
// slower that reading the same data, but may be faster.
|
|
243
|
+
//
|
|
244
|
+
// If end of file is reached, skipping will stop at the end of the
|
|
245
|
+
// file, and Skip will return OK.
|
|
246
|
+
//
|
|
247
|
+
// REQUIRES: External synchronization
|
|
248
|
+
virtual Status Skip(uint64_t n) = 0;
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
// A file abstraction for randomly reading the contents of a file.
|
|
252
|
+
class LEVELDB_EXPORT RandomAccessFile {
|
|
253
|
+
public:
|
|
254
|
+
RandomAccessFile() = default;
|
|
255
|
+
|
|
256
|
+
RandomAccessFile(const RandomAccessFile&) = delete;
|
|
257
|
+
RandomAccessFile& operator=(const RandomAccessFile&) = delete;
|
|
258
|
+
|
|
259
|
+
virtual ~RandomAccessFile();
|
|
260
|
+
|
|
261
|
+
// Read up to "n" bytes from the file starting at "offset".
|
|
262
|
+
// "scratch[0..n-1]" may be written by this routine. Sets "*result"
|
|
263
|
+
// to the data that was read (including if fewer than "n" bytes were
|
|
264
|
+
// successfully read). May set "*result" to point at data in
|
|
265
|
+
// "scratch[0..n-1]", so "scratch[0..n-1]" must be live when
|
|
266
|
+
// "*result" is used. If an error was encountered, returns a non-OK
|
|
267
|
+
// status.
|
|
268
|
+
//
|
|
269
|
+
// Safe for concurrent use by multiple threads.
|
|
270
|
+
virtual Status Read(uint64_t offset, size_t n, Slice* result,
|
|
271
|
+
char* scratch) const = 0;
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
// A file abstraction for sequential writing. The implementation
|
|
275
|
+
// must provide buffering since callers may append small fragments
|
|
276
|
+
// at a time to the file.
|
|
277
|
+
class LEVELDB_EXPORT WritableFile {
|
|
278
|
+
public:
|
|
279
|
+
WritableFile() = default;
|
|
280
|
+
|
|
281
|
+
WritableFile(const WritableFile&) = delete;
|
|
282
|
+
WritableFile& operator=(const WritableFile&) = delete;
|
|
283
|
+
|
|
284
|
+
virtual ~WritableFile();
|
|
285
|
+
|
|
286
|
+
virtual Status Append(const Slice& data) = 0;
|
|
287
|
+
virtual Status Close() = 0;
|
|
288
|
+
virtual Status Flush() = 0;
|
|
289
|
+
virtual Status Sync() = 0;
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
// An interface for writing log messages.
|
|
293
|
+
class LEVELDB_EXPORT Logger {
|
|
294
|
+
public:
|
|
295
|
+
Logger() = default;
|
|
296
|
+
|
|
297
|
+
Logger(const Logger&) = delete;
|
|
298
|
+
Logger& operator=(const Logger&) = delete;
|
|
299
|
+
|
|
300
|
+
virtual ~Logger();
|
|
301
|
+
|
|
302
|
+
// Write an entry to the log file with the specified format.
|
|
303
|
+
virtual void Logv(const char* format, std::va_list ap) = 0;
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
// Identifies a locked file.
|
|
307
|
+
class LEVELDB_EXPORT FileLock {
|
|
308
|
+
public:
|
|
309
|
+
FileLock() = default;
|
|
310
|
+
|
|
311
|
+
FileLock(const FileLock&) = delete;
|
|
312
|
+
FileLock& operator=(const FileLock&) = delete;
|
|
313
|
+
|
|
314
|
+
virtual ~FileLock();
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
// Log the specified data to *info_log if info_log is non-null.
|
|
318
|
+
void Log(Logger* info_log, const char* format, ...)
|
|
319
|
+
#if defined(__GNUC__) || defined(__clang__)
|
|
320
|
+
__attribute__((__format__(__printf__, 2, 3)))
|
|
321
|
+
#endif
|
|
322
|
+
;
|
|
323
|
+
|
|
324
|
+
// A utility routine: write "data" to the named file.
|
|
325
|
+
LEVELDB_EXPORT Status WriteStringToFile(Env* env, const Slice& data,
|
|
326
|
+
const std::string& fname);
|
|
327
|
+
|
|
328
|
+
// A utility routine: read contents of named file into *data
|
|
329
|
+
LEVELDB_EXPORT Status ReadFileToString(Env* env, const std::string& fname,
|
|
330
|
+
std::string* data);
|
|
331
|
+
|
|
332
|
+
// An implementation of Env that forwards all calls to another Env.
|
|
333
|
+
// May be useful to clients who wish to override just part of the
|
|
334
|
+
// functionality of another Env.
|
|
335
|
+
class LEVELDB_EXPORT EnvWrapper : public Env {
|
|
336
|
+
public:
|
|
337
|
+
// Initialize an EnvWrapper that delegates all calls to *t.
|
|
338
|
+
explicit EnvWrapper(Env* t) : target_(t) {}
|
|
339
|
+
virtual ~EnvWrapper();
|
|
340
|
+
|
|
341
|
+
// Return the target to which this Env forwards all calls.
|
|
342
|
+
Env* target() const { return target_; }
|
|
343
|
+
|
|
344
|
+
// The following text is boilerplate that forwards all methods to target().
|
|
345
|
+
Status NewSequentialFile(const std::string& f, SequentialFile** r) override {
|
|
346
|
+
return target_->NewSequentialFile(f, r);
|
|
347
|
+
}
|
|
348
|
+
Status NewRandomAccessFile(const std::string& f,
|
|
349
|
+
RandomAccessFile** r) override {
|
|
350
|
+
return target_->NewRandomAccessFile(f, r);
|
|
351
|
+
}
|
|
352
|
+
Status NewWritableFile(const std::string& f, WritableFile** r) override {
|
|
353
|
+
return target_->NewWritableFile(f, r);
|
|
354
|
+
}
|
|
355
|
+
Status NewAppendableFile(const std::string& f, WritableFile** r) override {
|
|
356
|
+
return target_->NewAppendableFile(f, r);
|
|
357
|
+
}
|
|
358
|
+
bool FileExists(const std::string& f) override {
|
|
359
|
+
return target_->FileExists(f);
|
|
360
|
+
}
|
|
361
|
+
Status GetChildren(const std::string& dir,
|
|
362
|
+
std::vector<std::string>* r) override {
|
|
363
|
+
return target_->GetChildren(dir, r);
|
|
364
|
+
}
|
|
365
|
+
Status RemoveFile(const std::string& f) override {
|
|
366
|
+
return target_->RemoveFile(f);
|
|
367
|
+
}
|
|
368
|
+
Status CreateDir(const std::string& d) override {
|
|
369
|
+
return target_->CreateDir(d);
|
|
370
|
+
}
|
|
371
|
+
Status RemoveDir(const std::string& d) override {
|
|
372
|
+
return target_->RemoveDir(d);
|
|
373
|
+
}
|
|
374
|
+
Status GetFileSize(const std::string& f, uint64_t* s) override {
|
|
375
|
+
return target_->GetFileSize(f, s);
|
|
376
|
+
}
|
|
377
|
+
Status RenameFile(const std::string& s, const std::string& t) override {
|
|
378
|
+
return target_->RenameFile(s, t);
|
|
379
|
+
}
|
|
380
|
+
Status LockFile(const std::string& f, FileLock** l) override {
|
|
381
|
+
return target_->LockFile(f, l);
|
|
382
|
+
}
|
|
383
|
+
Status UnlockFile(FileLock* l) override { return target_->UnlockFile(l); }
|
|
384
|
+
void Schedule(void (*f)(void*), void* a) override {
|
|
385
|
+
return target_->Schedule(f, a);
|
|
386
|
+
}
|
|
387
|
+
void StartThread(void (*f)(void*), void* a) override {
|
|
388
|
+
return target_->StartThread(f, a);
|
|
389
|
+
}
|
|
390
|
+
Status GetTestDirectory(std::string* path) override {
|
|
391
|
+
return target_->GetTestDirectory(path);
|
|
392
|
+
}
|
|
393
|
+
Status NewLogger(const std::string& fname, Logger** result) override {
|
|
394
|
+
return target_->NewLogger(fname, result);
|
|
395
|
+
}
|
|
396
|
+
uint64_t NowMicros() override { return target_->NowMicros(); }
|
|
397
|
+
void SleepForMicroseconds(int micros) override {
|
|
398
|
+
target_->SleepForMicroseconds(micros);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
private:
|
|
402
|
+
Env* target_;
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
} // namespace leveldb
|
|
406
|
+
|
|
407
|
+
// This workaround can be removed when leveldb::Env::DeleteFile is removed.
|
|
408
|
+
// Redefine DeleteFile if it was undefined earlier.
|
|
409
|
+
#if defined(_WIN32) && defined(LEVELDB_DELETEFILE_UNDEFINED)
|
|
410
|
+
#if defined(UNICODE)
|
|
411
|
+
#define DeleteFile DeleteFileW
|
|
412
|
+
#else
|
|
413
|
+
#define DeleteFile DeleteFileA
|
|
414
|
+
#endif // defined(UNICODE)
|
|
415
|
+
#endif // defined(_WIN32) && defined(LEVELDB_DELETEFILE_UNDEFINED)
|
|
416
|
+
|
|
417
|
+
#endif // STORAGE_LEVELDB_INCLUDE_ENV_H_
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Copyright (c) 2017 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_EXPORT_H_
|
|
6
|
+
#define STORAGE_LEVELDB_INCLUDE_EXPORT_H_
|
|
7
|
+
|
|
8
|
+
#if !defined(LEVELDB_EXPORT)
|
|
9
|
+
|
|
10
|
+
#if defined(LEVELDB_SHARED_LIBRARY)
|
|
11
|
+
#if defined(_WIN32)
|
|
12
|
+
|
|
13
|
+
#if defined(LEVELDB_COMPILE_LIBRARY)
|
|
14
|
+
#define LEVELDB_EXPORT __declspec(dllexport)
|
|
15
|
+
#else
|
|
16
|
+
#define LEVELDB_EXPORT __declspec(dllimport)
|
|
17
|
+
#endif // defined(LEVELDB_COMPILE_LIBRARY)
|
|
18
|
+
|
|
19
|
+
#else // defined(_WIN32)
|
|
20
|
+
#if defined(LEVELDB_COMPILE_LIBRARY)
|
|
21
|
+
#define LEVELDB_EXPORT __attribute__((visibility("default")))
|
|
22
|
+
#else
|
|
23
|
+
#define LEVELDB_EXPORT
|
|
24
|
+
#endif
|
|
25
|
+
#endif // defined(_WIN32)
|
|
26
|
+
|
|
27
|
+
#else // defined(LEVELDB_SHARED_LIBRARY)
|
|
28
|
+
#define LEVELDB_EXPORT
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
#endif // !defined(LEVELDB_EXPORT)
|
|
32
|
+
|
|
33
|
+
#endif // STORAGE_LEVELDB_INCLUDE_EXPORT_H_
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Copyright (c) 2012 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 database can be configured with a custom FilterPolicy object.
|
|
6
|
+
// This object is responsible for creating a small filter from a set
|
|
7
|
+
// of keys. These filters are stored in leveldb and are consulted
|
|
8
|
+
// automatically by leveldb to decide whether or not to read some
|
|
9
|
+
// information from disk. In many cases, a filter can cut down the
|
|
10
|
+
// number of disk seeks form a handful to a single disk seek per
|
|
11
|
+
// DB::Get() call.
|
|
12
|
+
//
|
|
13
|
+
// Most people will want to use the builtin bloom filter support (see
|
|
14
|
+
// NewBloomFilterPolicy() below).
|
|
15
|
+
|
|
16
|
+
#ifndef STORAGE_LEVELDB_INCLUDE_FILTER_POLICY_H_
|
|
17
|
+
#define STORAGE_LEVELDB_INCLUDE_FILTER_POLICY_H_
|
|
18
|
+
|
|
19
|
+
#include <string>
|
|
20
|
+
|
|
21
|
+
#include "leveldb/export.h"
|
|
22
|
+
|
|
23
|
+
namespace leveldb {
|
|
24
|
+
|
|
25
|
+
class Slice;
|
|
26
|
+
|
|
27
|
+
class LEVELDB_EXPORT FilterPolicy {
|
|
28
|
+
public:
|
|
29
|
+
virtual ~FilterPolicy();
|
|
30
|
+
|
|
31
|
+
// Return the name of this policy. Note that if the filter encoding
|
|
32
|
+
// changes in an incompatible way, the name returned by this method
|
|
33
|
+
// must be changed. Otherwise, old incompatible filters may be
|
|
34
|
+
// passed to methods of this type.
|
|
35
|
+
virtual const char* Name() const = 0;
|
|
36
|
+
|
|
37
|
+
// keys[0,n-1] contains a list of keys (potentially with duplicates)
|
|
38
|
+
// that are ordered according to the user supplied comparator.
|
|
39
|
+
// Append a filter that summarizes keys[0,n-1] to *dst.
|
|
40
|
+
//
|
|
41
|
+
// Warning: do not change the initial contents of *dst. Instead,
|
|
42
|
+
// append the newly constructed filter to *dst.
|
|
43
|
+
virtual void CreateFilter(const Slice* keys, int n,
|
|
44
|
+
std::string* dst) const = 0;
|
|
45
|
+
|
|
46
|
+
// "filter" contains the data appended by a preceding call to
|
|
47
|
+
// CreateFilter() on this class. This method must return true if
|
|
48
|
+
// the key was in the list of keys passed to CreateFilter().
|
|
49
|
+
// This method may return true or false if the key was not on the
|
|
50
|
+
// list, but it should aim to return false with a high probability.
|
|
51
|
+
virtual bool KeyMayMatch(const Slice& key, const Slice& filter) const = 0;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
// Return a new filter policy that uses a bloom filter with approximately
|
|
55
|
+
// the specified number of bits per key. A good value for bits_per_key
|
|
56
|
+
// is 10, which yields a filter with ~ 1% false positive rate.
|
|
57
|
+
//
|
|
58
|
+
// Callers must delete the result after any database that is using the
|
|
59
|
+
// result has been closed.
|
|
60
|
+
//
|
|
61
|
+
// Note: if you are using a custom comparator that ignores some parts
|
|
62
|
+
// of the keys being compared, you must not use NewBloomFilterPolicy()
|
|
63
|
+
// and must provide your own FilterPolicy that also ignores the
|
|
64
|
+
// corresponding parts of the keys. For example, if the comparator
|
|
65
|
+
// ignores trailing spaces, it would be incorrect to use a
|
|
66
|
+
// FilterPolicy (like NewBloomFilterPolicy) that does not ignore
|
|
67
|
+
// trailing spaces in keys.
|
|
68
|
+
LEVELDB_EXPORT const FilterPolicy* NewBloomFilterPolicy(int bits_per_key);
|
|
69
|
+
|
|
70
|
+
} // namespace leveldb
|
|
71
|
+
|
|
72
|
+
#endif // STORAGE_LEVELDB_INCLUDE_FILTER_POLICY_H_
|
|
@@ -0,0 +1,112 @@
|
|
|
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
|
+
// An iterator yields a sequence of key/value pairs from a source.
|
|
6
|
+
// The following class defines the interface. Multiple implementations
|
|
7
|
+
// are provided by this library. In particular, iterators are provided
|
|
8
|
+
// to access the contents of a Table or a DB.
|
|
9
|
+
//
|
|
10
|
+
// Multiple threads can invoke const methods on an Iterator without
|
|
11
|
+
// external synchronization, but if any of the threads may call a
|
|
12
|
+
// non-const method, all threads accessing the same Iterator must use
|
|
13
|
+
// external synchronization.
|
|
14
|
+
|
|
15
|
+
#ifndef STORAGE_LEVELDB_INCLUDE_ITERATOR_H_
|
|
16
|
+
#define STORAGE_LEVELDB_INCLUDE_ITERATOR_H_
|
|
17
|
+
|
|
18
|
+
#include "leveldb/export.h"
|
|
19
|
+
#include "leveldb/slice.h"
|
|
20
|
+
#include "leveldb/status.h"
|
|
21
|
+
|
|
22
|
+
namespace leveldb {
|
|
23
|
+
|
|
24
|
+
class LEVELDB_EXPORT Iterator {
|
|
25
|
+
public:
|
|
26
|
+
Iterator();
|
|
27
|
+
|
|
28
|
+
Iterator(const Iterator&) = delete;
|
|
29
|
+
Iterator& operator=(const Iterator&) = delete;
|
|
30
|
+
|
|
31
|
+
virtual ~Iterator();
|
|
32
|
+
|
|
33
|
+
// An iterator is either positioned at a key/value pair, or
|
|
34
|
+
// not valid. This method returns true iff the iterator is valid.
|
|
35
|
+
virtual bool Valid() const = 0;
|
|
36
|
+
|
|
37
|
+
// Position at the first key in the source. The iterator is Valid()
|
|
38
|
+
// after this call iff the source is not empty.
|
|
39
|
+
virtual void SeekToFirst() = 0;
|
|
40
|
+
|
|
41
|
+
// Position at the last key in the source. The iterator is
|
|
42
|
+
// Valid() after this call iff the source is not empty.
|
|
43
|
+
virtual void SeekToLast() = 0;
|
|
44
|
+
|
|
45
|
+
// Position at the first key in the source that is at or past target.
|
|
46
|
+
// The iterator is Valid() after this call iff the source contains
|
|
47
|
+
// an entry that comes at or past target.
|
|
48
|
+
virtual void Seek(const Slice& target) = 0;
|
|
49
|
+
|
|
50
|
+
// Moves to the next entry in the source. After this call, Valid() is
|
|
51
|
+
// true iff the iterator was not positioned at the last entry in the source.
|
|
52
|
+
// REQUIRES: Valid()
|
|
53
|
+
virtual void Next() = 0;
|
|
54
|
+
|
|
55
|
+
// Moves to the previous entry in the source. After this call, Valid() is
|
|
56
|
+
// true iff the iterator was not positioned at the first entry in source.
|
|
57
|
+
// REQUIRES: Valid()
|
|
58
|
+
virtual void Prev() = 0;
|
|
59
|
+
|
|
60
|
+
// Return the key for the current entry. The underlying storage for
|
|
61
|
+
// the returned slice is valid only until the next modification of
|
|
62
|
+
// the iterator.
|
|
63
|
+
// REQUIRES: Valid()
|
|
64
|
+
virtual Slice key() const = 0;
|
|
65
|
+
|
|
66
|
+
// Return the value for the current entry. The underlying storage for
|
|
67
|
+
// the returned slice is valid only until the next modification of
|
|
68
|
+
// the iterator.
|
|
69
|
+
// REQUIRES: Valid()
|
|
70
|
+
virtual Slice value() const = 0;
|
|
71
|
+
|
|
72
|
+
// If an error has occurred, return it. Else return an ok status.
|
|
73
|
+
virtual Status status() const = 0;
|
|
74
|
+
|
|
75
|
+
// Clients are allowed to register function/arg1/arg2 triples that
|
|
76
|
+
// will be invoked when this iterator is destroyed.
|
|
77
|
+
//
|
|
78
|
+
// Note that unlike all of the preceding methods, this method is
|
|
79
|
+
// not abstract and therefore clients should not override it.
|
|
80
|
+
using CleanupFunction = void (*)(void* arg1, void* arg2);
|
|
81
|
+
void RegisterCleanup(CleanupFunction function, void* arg1, void* arg2);
|
|
82
|
+
|
|
83
|
+
private:
|
|
84
|
+
// Cleanup functions are stored in a single-linked list.
|
|
85
|
+
// The list's head node is inlined in the iterator.
|
|
86
|
+
struct CleanupNode {
|
|
87
|
+
// True if the node is not used. Only head nodes might be unused.
|
|
88
|
+
bool IsEmpty() const { return function == nullptr; }
|
|
89
|
+
// Invokes the cleanup function.
|
|
90
|
+
void Run() {
|
|
91
|
+
assert(function != nullptr);
|
|
92
|
+
(*function)(arg1, arg2);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// The head node is used if the function pointer is not null.
|
|
96
|
+
CleanupFunction function;
|
|
97
|
+
void* arg1;
|
|
98
|
+
void* arg2;
|
|
99
|
+
CleanupNode* next;
|
|
100
|
+
};
|
|
101
|
+
CleanupNode cleanup_head_;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
// Return an empty iterator (yields nothing).
|
|
105
|
+
LEVELDB_EXPORT Iterator* NewEmptyIterator();
|
|
106
|
+
|
|
107
|
+
// Return an empty iterator with the specified status.
|
|
108
|
+
LEVELDB_EXPORT Iterator* NewErrorIterator(const Status& status);
|
|
109
|
+
|
|
110
|
+
} // namespace leveldb
|
|
111
|
+
|
|
112
|
+
#endif // STORAGE_LEVELDB_INCLUDE_ITERATOR_H_
|