Skip to content

Realm is a mobile database: a replacement for SQLite & ORMs

License

Notifications You must be signed in to change notification settings

amaniak/realm-java

 
 

Repository files navigation

Realm

Realm is a mobile database that runs directly inside phones, tablets or wearables. This repository holds the source code for the Java version of Realm, which currently runs only on Android.

Features

  • Mobile-first: Realm is the first database built from the ground up to run directly inside phones, tablets and wearables.
  • Simple: Data is directly exposed as objects and queryable by code, removing the need for ORM's riddled with performance & maintenance issues. Plus, we've worked hard to keep our API down to very few classes: most of our users pick it up intuitively, getting simple apps up & running in minutes.
  • Modern: Realm supports easy thread-safety, relationships & encryption.
  • Fast: Realm is faster than even raw SQLite on common operations, while maintaining an extremely rich feature set.

Setting up Realm in your app

See full instructions in our docs.

Documentation

Documentation for Realm can be found at realm.io/docs/java. The API reference is located at realm.io/docs/java/api.

Building Realm

Prerequisites:

  • Make sure make is available in your $PATH

  • Download the JDK 7 or JDK 8 from Oracle and install it.

  • Download & install the Android SDK, Android 4.4W (API 20) (for example through Android Studio’s Android SDK Manager)

  • Also download & install the Android SDK, Android 4.4.2 (API 19) (for example through Android Studio’s Android SDK Manager)

  • Download the Android NDK (>= r9d). For example, on Mac OS you can do this with Homebrew with brew install android-ndk.

  • Add a local.properties file at the root of this folder with the correct paths for the Android SDK and NDK, for example:

    sdk.dir=/Applications/Android Studio.app/sdk
    ndk.dir=/usr/local/Cellar/android-ndk/r9d
    

Once you have completed all the pre-requisites building Realm is done with a simple command

./gradlew androidJar

That command will generate the .jar file containing the Realm runtime and the annotation processor. You will find it in realm/build/libs.

Other Commands

  • ./gradlew generateReleaseJavadoc will generate the Javadocs
  • ./gradlew realm:connectedCheck will run the tests on a connected Android device

Generating the Javadoc using the command above will report a failure (1 error, 30+ warnings). The Javadoc is generated, and we will fix realm/build.gradle in the near future.

Filing Issues

Whether you find a bug, typo or an API call that could be clarified, please file an issue on our GitHub repository.

When filing an issue, please provide as much of the following information as possible in order to help others fix it:

  1. Goals
  2. Expected results
  3. Actual results
  4. Steps to reproduce
  5. Code sample that highlights the issue (link to full Android Studio projects that we can compile ourselves are ideal)
  6. Version of Realm/Android Studio/OS

If you'd like to send us sensitive sample code to help troubleshoot your issue, you can email help@realm.io directly.

Contributing

See CONTRIBUTING.md for more details!

License

Realm Java is published under the Apache 2.0 license.
The underlying core is available under the Realm Core Binary License while we work to open-source it under the Apache 2.0 license.

Feedback

If you use Realm and are happy with it, all we ask is that you please consider sending out a tweet mentioning @realm, announce your app on our mailing-list, or email info@realm.io to let us know about it!

And if you don't like it, please let us know what you would like improved, so we can fix it!

analytics

About

Realm is a mobile database: a replacement for SQLite & ORMs

Resources

License

Stars

Watchers

Forks

Packages

No packages published