Skip to content

Commit

Permalink
move Open a Realm page (test)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbullinger committed Sep 13, 2023
1 parent fef80ab commit 9c755cc
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
4 changes: 4 additions & 0 deletions config/redirects
Original file line number Diff line number Diff line change
Expand Up @@ -1262,3 +1262,7 @@ raw: ${prefix}/sdk/swift/sync/sync-realm-open-legacy -> ${base}/sdk/swift/sync/c

raw: ${prefix}/sdk/swift/sync/sync-progress -> ${base}/sdk/swift/sync/sync-session/
raw: ${prefix}/sdk/swift/sync/network-connection -> ${base}/sdk/swift/sync/sync-session/

# DOCSP-30339: Move Configure & Open a Realm page up a level

raw: ${prefix}/sdk/kotlin/realm-database/realm-files/open-and-close-a-realm -> ${base}/sdk/kotlin/realm-database/open-and-close-a-realm/
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ class OpenARealmTest: RealmTest() {
assertEquals("Kermit", frog.name)
assertEquals(encryptionKey, encryptedRealm.configuration.encryptionKey)
// :remove-end:

encryptedRealm.close()
// :remove-start:
assertTrue(encryptedRealm.isClosed())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ runBlocking {
// Copied Frog object is available in the new realm
val frog = encryptedRealm.query<Frog>().find().first()
Log.v("Copied Frog: ${frog.name}")

encryptedRealm.close()
}
3 changes: 2 additions & 1 deletion source/sdk/kotlin/realm-database.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ Realm - Kotlin SDK

Frozen Architecture </sdk/kotlin/realm-database/frozen-arch>
Model Data </sdk/kotlin/realm-database/schemas>
Manage Realm Files </sdk/kotlin/realm-database/realm-files>
Configure & Open a Realm </sdk/kotlin/realm-database/open-and-close-a-realm>
Read & Write Data </sdk/kotlin/realm-database/write-transactions>
Manage Realm Files </sdk/kotlin/realm-database/realm-files>
React to Changes </sdk/kotlin/realm-database/react-to-changes>
Serialization </sdk/kotlin/realm-database/serialization>
Handle Realm Errors </sdk/kotlin/realm-database/errors>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Configure & Open a Realm - Kotlin SDK
:depth: 2
:class: singlecol

This page describes realm files and how to open and close a realm that only
persists data locally. To open a realm that synchronizes data with Atlas
This page describes realm files and how to configure, open, and close a realm
that only persists data locally. To open a realm that synchronizes data with Atlas
using Device Sync, refer to :ref:`Open a Synced Realm
<kotlin-open-a-synced-realm>`.

Expand Down Expand Up @@ -147,6 +147,9 @@ specifics of the realm that you would like to open, including:
- Flagging whether Realm should :ref:`delete the realm file
<kotlin-delete-to-avoid-migration>` if a migration is required

For more information on specific configuration implementations, refer to
:ref:`<kotlin-manage-realm-files>`.

To configure a realm with non-default values, create the ``RealmConfiguration``
through `RealmConfiguration.Builder.build()
<{+kotlin-local-prefix+}io.realm.kotlin/-realm-configuration/-builder/index.html>`__
Expand Down
8 changes: 7 additions & 1 deletion source/sdk/kotlin/realm-database/realm-files.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
.. _kotlin-manage-realm-files:

===============================
Manage Realm Files - Kotlin SDK
===============================

.. toctree::
:titlesonly:

Configure & Open a Realm </sdk/kotlin/realm-database/realm-files/open-and-close-a-realm>
Reduce Realm File Size </sdk/kotlin/realm-database/realm-files/compact-realm>
Delete a Realm </sdk/kotlin/realm-database/realm-files/delete-a-realm>
Encrypt a Realm </sdk/kotlin/realm-database/realm-files/encrypt-a-realm>
Bundle a Realm </sdk/kotlin/realm-database/realm-files/bundle-a-realm>

- :ref:`Reduce Realm File Size <kotlin-compact-realm>`
- :ref:`Delete a Realm <kotlin-delete-a-realm>`
- :ref:`Encrypt a Realm <kotlin-encrypt-a-realm>`
- :ref:`Bundle a Realm <kotlin-bundle-a-realm>`

0 comments on commit 9c755cc

Please sign in to comment.