GitHub - Ohdmire/realm-db-reader: A Rust library to read Realm database files · GitHub
Skip to content

About

A Rust library to read Realm database files

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Realm Database Reader

This is a Rust library that provides basic functionality for reading data from a Realm database. For usage and examples, please check the documentation.

Supported

This library supports reading .realm files of file format 9.9 (the pre-cluster format written by older Realm core versions) and 24 (the modern cluster-based format written by realm-core v12 and later, including the C++, Kotlin, and Swift SDKs). Files must not be encrypted.

In specific, you can:

  • Open a Realm file
  • List and open tables in the database
  • Read rows in those tables
  • Find rows by a known value for indexed columns (file format 9.9 only)
  • Easily convert rows to a native Rust struct

The modern format reader has been cross-validated against realm-core v14 itself: every table, row, and value of a real-world 34k-row database reads back identically to the official implementation.

Shortcomings

Other than the limitations mentioned above regarding the Realm version, and not handling encryption, this library does not support:

  • Creating or writing Realm databases
  • Tables with columns of the following types:
    • Enums (9.9), Decimal128 (24)
    • Mixed values are partially supported in the modern format reader (ints, bools, strings, binaries, timestamps, and floats)
  • Finding multiple rows by a known value for indexed columns
  • Searching indexed columns in the modern file formats (the data itself reads fine; only the index-based lookup is unsupported)

License

This project is licensed under the MIT License.

Portions of this project are derived from work covered by the Apache License 2.0.

For those portions:

  • The original copyright and license notices have been retained.
  • Any modifications from the original have been documented in the source code or accompanying files.
  • A copy of the Apache License 2.0 is provided in APACHE_LICENSE.
  • The inclusion of Apache 2.0–licensed code does not alter the terms of the MIT License for the rest of the project.

About

A Rust library to read Realm database files

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages