Realm is a mobile database: an alternative to SQLite & key-value stores https://realm.io
Go to file
Thomas Goyne d8a69b87dc Improve change calculation performance for nontrivial object graphs
Skip doing any checking at all if none of the tables reachable from the root
table have been modified (which can happen if the table version was bumped due
to insertions, unrelated backlinks, or unlinked-to rows being deleted in linked
tables).

Add cycle checking rather than relying on the max depth to handle it, as the
worst case was O(N^16) if the cycle involved a LinkList of size N.

Track which rows have been confirmed to have not been modified.

Cache the information about the links for each of the relevant tables as
checking the table schema can get somewhat expensive.
2016-05-11 16:08:30 -07:00
CMake Rewrite the code coverage generation 2016-05-06 15:23:30 -07:00
external submodule fixes 2016-03-03 14:48:41 -08:00
fuzzer Build all of the fuzzer variants 2016-05-11 16:08:30 -07:00
src Improve change calculation performance for nontrivial object graphs 2016-05-11 16:08:30 -07:00
tests Improve change calculation performance for nontrivial object graphs 2016-05-11 16:08:30 -07:00
.gitignore Support building on Linux. 2016-03-02 01:02:11 -08:00
.gitmodules Hook the parser tests into the CMake build system. 2016-01-19 10:41:25 -08:00
CMakeLists.txt Add an afl-based fuzzer for notifications 2016-05-11 16:08:30 -07:00
README.md Add support for building with the various sanitizers 2016-03-10 10:35:29 -08:00

README.md

Realm Object Store

Cross-platform code used accross bindings. Binding developers can choose to use some or all the included functionality:

  • object_store/schema/object_schema/property - contains the structures and logic used to setup and modify realm files and their schema.
  • shared_realm - wraps the object_store apis to provide transactions, notifications, realm caching, migrations, and other higher level functionality.
  • object_accessor/results/list - accessor classes, object creation/update pipeline, and helpers for creating platform specific property getters and setters.
  • parser/query_builder - cross platform query parser and query builder - requires and object_accessor specialization for argument support. Depends on https://github.com/ColinH/PEGTL

Building

The object store's build system currently only suports building for OS X. The object store itself can build for all Apple platforms when integrated into a binding.

  1. Install CMake. You can download an installer for OS X from the CMake download page, or install via Homebrew:

    brew install cmake
    
  2. Generate build files:

    cmake .
    
  3. Build:

    make
    

If you wish to build against a local version of core you can invoke cmake like so:

cmake -DREALM_CORE_VERSION=/path/to/realm-core

The given core tree will be built as part of the object store build.

Building with Sanitizers

The object store can be built using ASan, TSan and/or UBSan by specifying -DSANITIZE_ADDRESS=1, -DSANITIZE_THREAD=1, or -DSANITIZE_UNDEFINED=1 when inoking CMake. Building with ASan requires specifying a path to core with -DREAM_CORE_VERSION as core needs to also be built with ASan enabled.

On OS X, the Xcode-provided copy of Clang only comes with ASan, and using TSan or UBSan requires a custom build of Clang. If you have installed Clang as an external Xcode toolchain (using the install-xcode-toolchain when building LLVM), note that you'll have to specify -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ when running cmake to stop cmake from being too clever.

Testing

make run-tests