A newer version of this documentation is available.

View Latest

Release Notes

      +

      3.0.12 — June 2023

      Version 3.0.12 for Android delivers the following features and enhancements:

      Known Issues

      None for this release.

      3.0.15 — February 2022

      On upgrading from a 2.x release, all Couchbase Lite databases will be automatically re-indexed on initial database open.
      This can result in a delay before the database is usable.

      New Features

      Kotlin Support in Android

      Couchbase Lite for Android delivers an idiomatic Kotlin API out-of-the-box. This enables seamless integration with Android apps developed in Kotlin without the need for custom extensions.

      Kotlin developers can now build apps using common Kotlin Patterns and use familiar Kotlin features such as:

      • Nullability annotations

      • Named parameters

      • Kotlin Flows

      Java support and functionality continues for Android. You can choose whether to use the Kotlin extensions API or continue using the Java api.

      Read More . . . Couchbase Lite for Kotlin

      SQL++/N1QL Query Strings

      Couchbase Lite’s SQL++ for Mobile query API vastly simplifies the integration of Couchbase Lite within hybrid/cross platform apps.

      N1QL for Mobile is an implementation of the emerging SQL-for-JSON query language specification (SQL++). It provides native, hybrid and cross-platform mobile app developers with a consistent, convenient and flexible interface to query JSON documents within the embedded database using a SQL-based syntax. This means developers can reuse queries across platforms, reducing development, testing and maintenance costs.

      Read More . . . SQL++ for Mobile

      Enhancements

      Auto-purge on Channel Access Revocation

      An auto-purge feature is introduced for loss of access to channels and the documents in them. This is important for enforcement of data governance and data retention policies.

      Channels are the fundamental mechanism for enforcement of access control using Sync Gateway. They guarantee that only users with access to a specific channel can access documents in that channel.

      When a user loses access to a channel (and so to its documents) Couchbase Lite clients will auto purge all local documents on devices that belong to the revoked channel (during Pull or PushAndPull replication), unless the user has access to the document via some other channel.

      Document API Support for JSON Data

      The Couchbase Lite API now offers out-of-the box support for document data in JSON format. This will make it easier for developers' applications to store, transform and manipulate JSON data in the database.

      The API offers JSON support for Documents, MutableDocuments, Arrays, MutableArrays, Dictionaries, MutableDictionaries and Query Results.

      Read More . . . Documents | Blobs

      Replicator Change Listeners

      The API is enhanced to allow replicator listeners to be added at any point without requiring a replicator restart.

      Other Enhancements

      API Changes

      This content introduces the changes made to the Couchbase Lite for Android API for release 3.0.15.

      Removed

      ResetCheckpoint

      The method Replicator.resetCheckpoint() has been removed.
      Instead, use Replicator.resetCheckpoint(boolean reset).

      Before
      replicator.resetCheckpoint()
      replicator.start()
      After
      replicator.start(true)
      Database.setLogLevel

      The method Database.setLogLevel() has been removed.
      Instead:

      1. Set the logging levels for loggers, individually

      2. Set the domains to be logged by the console logger, explicitly.

      Before
      Database.setLogLevel(LogDomain.ALL, LogLevel.VERBOSE)
      After
      Database.log.getConsole().setDomains(LogDomain.ALL_DOMAINS)
      Database.log.getConsole().setLevel(LogLevel.VERBOSE)
      Database.log.getFile().setDomains(LogLevel.DEBUG)
      Database.compact

      The Database.compact() method has been removed.
      It is replaced by the new Database.performMaintenance(MaintenanceType) method, and the maintenance operations represented in the enum MaintenanceType

      Before
      try testdb.compact()
      After
      testdb.performMaintenance(MaintenanceType.COMPACT)

      Deprecated in the API

      MATCH

      The class, FullTextExpression has been deprecated.
      Use FullTextFunction instead.

      Before
      FullTextExpression index = FullTextExpression.index("indexName")
      Query q = QueryBuilder.select([SelectResult.expression(Meta.id)])
        .from(DataSource.database(testdb))
        .where(index.match(queryString))
      After
      Query q = QueryBuilder.select([SelectResult.expression(Meta.id)])
        .from(DataSource.database(testdb))
        .where(FullTextFunction.match("indexName", queryString))
      isNullOrMissing/notNullOrMissing

      The functions Expression.isNullOrMissing and Expression.notNullOrMissing have been deprecated.
      Use isNotValued() and-or isValued() instead.

      Before
      Query q =
        QueryBuilder
          .select([SelectResult.expression(Meta.id)])
          .from(DataSource.database(testdb))
          .where(
            Expression.property("missingProp").isNullOrMissing())
      
      Query q =
        QueryBuilder
          .select([SelectResult.expression(Meta.id)])
          .from(DataSource.database(testdb))
          .where(Expression.property("notMissingProp").notNullOrMissing())
      After
      Query q = QueryBuilder.select([SelectResult.expression(Meta.id)])
        .from(DataSource.database(testdb))
        .where(Expression.property("missingProp").isNotValued())
      
      Query q = QueryBuilder.select([SelectResult.expression(Meta.id)])
        .from(DataSource.database(testdb))
        .where(Expression.property("notMissingProp").isValued())
      AbstractReplicatorConfiguration

      The enum AbstractReplicatorConfiguration.ReplicatorType and the methods ReplicatorConfiguration.setReplicatorType and ReplicatorConfiguration.getReplicatorType have all been deprecated.
      Instead, use the methods ReplicatorConfiguration.setType and ReplicatorConfiguration.getType, and the top level enum ReplicatorType.

      Before
      ReplicatorConfiguration config =
        new ReplicatorConfiguration().setReplicatorType(ReplicatorConfiguration.ReplicatorType.PUSH_AND_PULL);
      After
      ReplicatorConfiguration config =
        new ReplicatorConfiguration().setType(ReplicatorType.PUSH_AND_PULL);

      Moved in the API

      The enum AbstractReplicator.ActivityLevel and the classes AbstractReplicator.Progress and AbstractReplicator.Status have all been moved to be top level definitions.
      They are replaced by these definitions:

      Before
      ListenerToken token =
        replicator.addChangeListener(
          testSerialExecutor,
          change -> {
            final AbstractReplicator.Status status = change.getStatus()
            if (status.getActivityLevel() == AbstractReplicator.ActivityLevel.BUSY)
            { AbstractReplicator.Progress progress =
                status.getProgress(); Logger.log("Progress: " + progress.completed + "/" progress.total);
            }
          });
      After
      ListenerToken token =
        replicator.addChangeListener(
          testSerialExecutor,
          change -> {
            final ReplicatorStatus status = change.getStatus()
            if (status.getActivityLevel() == ReplicatorActivityLevel.BUSY)
            { ReplicatorProgress progress =
                status.getProgress(); Logger.log("Progress: " + progress.completed + "/" progress.total);
            }
          });

      Known Issues

      None for this release.

      Fixed Issues

      Deprecated in this Release

      Items (features and-or functionality) are marked as deprecated when a more current, and usually enhanced, alternative is available.

      Whilst the deprecated item will remain usable, it is no longer supported, and will be removed in a future release — see also: Removed in this Release You should plan to move to an alternative, supported, solution as soon as practical.

      Previously Deprecated

      None specified

      Support Notices

      This section documents any support-related notes, constraints and changes.

      New

      None specified in this release

      Ongoing

      None specified