libdittoffi.so
) included$LIBDITTOFFI_PATH
environment variableSSLKEYLOGFILE
for debugging TLS connectionssystem::data_sync_info
virtual collection for sync diagnosticstransports_discovered_peers
system parameter to dynamically update peers discovered out-of-band (#17009)system::indexes
virtual collection for viewing DQL indexes on small peers (#17011)SSLKEYLOGFILE
for inspecting network traffic in tools like Wireshark (#17029)UPDATE_LOCAL_DIFF
id conflict strategy for INSERT statements (#17310)transports_tcp_so_nodelay
system parameter to control TCP_NODELAY for TCP and TCP-based websockets connections (#17673){"#index":...}
(#QE-255)setAvailablePeerToPeerEnabled(enabled: boolean)
method to TransportConfig
, which enables peer-to-peer transports supported on the current platform. (#16520) Added: Support for Wi-Fi Aware (NAN) transport in TransportConfigPeerToPeer
, enabling P2P communication on supported Android devices. (#16520) Added: Support for WiFiAware
as a new ConditionSource
value, enabling transport condition observation for Wi-Fi Aware connections in the Ditto.observeTransportConditions
API. (#16520) Added: Wi-Fi Aware as a new transports protocol for React Native (Android only). (#16520) Deprecated: setAllPeerToPeerEnabled()
in favor of setAvailablePeerToPeerEnabled()
. The new method is safer and respects platform transport availability. (#16520) Added: macOS support for Ditto React Native. (#17244) Added: method Ditto.sync.start()
to replace deprecated Ditto.startSync()
(#17321) Added: method Ditto.sync.stop()
to replace deprecated Ditto.stopSync()
(#17321) Added: property Ditto.sync.isActive
to replace deprecated Ditto.isSyncActive
(#17321) Added: type PeerOS
to represent the operating system a peer is running on (#17321) Changed: narrowed type of Peer.os
from string
to PeerOS
(#17321) Deprecated: AuthenticationHandler
(#17321) Deprecated: Authenticator.loginWithUsernameAndPassword()
(#17321) Deprecated: Authenticator.loginWithToken()
, use Authenticator.login()
instead (#17321) Deprecated: Logger.setLogFile()
(#17321) Deprecated: Logger.setLogFileURL()
(#17321) Deprecated: Logger.emojiLogLevelHeadingsEnabled
(#17321) Deprecated: Ditto.sdkVersion
, use Ditto.version
instead (#17321) Deprecated: Ditto.startSync()
, use ditto.sync.start()
instead (#17321) Deprecated: Ditto.stopSync()
, use ditto.sync.stop()
instead (#17321) Deprecated: Ditto.isSyncActive
, use ditto.sync.isActive
instead (#17321) Deprecated: Ditto.path
, use Ditto.persistenceDirectory
instead (#17321) Deprecated: Ditto.siteID
, use peerKeyString
instead (#17321) Deprecated: Ditto.observePeers()
, use ditto.presence.observe()
instead (#17321) Deprecated: Ditto.runGarbageCollection()
(#17321) Deprecated: PresenceConnectionType
type, replaced by ConnectionType
(#17321) Deprecated: RemotePeer
type, replaced by Peer
(#17321) Deprecated: siteID
property in IdentityOfflinePlayground
(#17321) Deprecated: siteID
property in IdentitySharedKey
(#17321) Added: error code authentication/expiration-handler-missing
to ERROR_CODES
(#17404) Added: error code validation/invalid-ditto-config
to ERROR_CODES
(#17404) Added: (Preview) class DittoConfig
- a unified configuration object that encapsulates all parameters required to configure a Ditto instance. Required by the new Ditto.open()
and Ditto.openSync()
factory methods. This API will become the standard way to initialize Ditto instances in v5. (#17404) Added: union type DittoConfigConnect
, which includes interfaces DittoConfigConnectServer
and DittoConfigConnectSmallPeersOnly
, representing the connectivity options for a DittoConfig
instance. (#17404) Added: (Preview) Ditto.open()
, an async, fallible factory method for creating Ditto
instances, alongside the synchronous convenience variant Ditto.openSync()
. These will replace the Ditto
constructor in v5. (#17404) Added: (Preview) function type AuthenticationExpirationHandler
, an async handler for authentication expiration events. This will replace the phased out AuthenticationHandler
type in v5. (#17404) Added: (Preview) property Ditto.config
, a read-only property that provides access to the configuration of the Ditto
instance. This will be the standard way to access configuration in v5. (#17404) Added: (Preview) read-only property Authenticator.expirationHandler
, holding an AuthenticationExpirationHandler
. (#17404) Added: (Preview) method Authenticator.setExpirationHandler()
, which allows setting the authentication expiration handler. (#17404) Added: (Preview) static property Authenticator.DEVELOPMENT_PROVIDER
, which provides the development authentication provider string constant. (#17404) Added: Ditto.absolutePersistenceDirectory
, a read-only property that provides the absolute path to the persistence directory. (#17404) Added: Ditto.DEFAULT_ROOT_DIRECTORY
, a static property that provides the default base directory used on the current platform to resolve the effective persistence directory path when DittoConfig.persistenceDirectory
is not specified or specified as a relative path. (#17404) Deprecated: the context
property of DittoError
. (#SDKS-1096) Added: read-only property commitID
to class QueryResult
. (#SDKS-1280) Changed: The ditto native library on Android is now 16KB aligned to meet Google Play’s upcoming requirement, effective November 2025. (#SDKS-1333) Fixed: Creating a Ditto instance using an online with authentication identity without required authentication handlers will now throw a descriptive error message. (#SDKS-254) Deprecated: The siteID
property on Ditto
in favor of peerKeyString
on Peer
. (#SDKS-699) Deprecated: The siteID
field on the IdentityOfflinePlayground
interface. A warning will be logged when this field is specified. (#SDKS-699) Deprecated: The siteID
field on the IdentitySharedKey
interface. A warning will be logged when this field is specified. (#SDKS-699) Deprecated: The address
property on the Peer
interface, and the associated Address
type. Please use peerKeyString
instead. (#SDKS-699) Deprecated: The addressToString
function. (#SDKS-699)QueryResult.mutatedDocumentIDsV2()
, use this instead of the deprecated QueryResult.mutatedDocumentIDs
. (#SDKS-907)
Deprecated: class BasePendingCursorOperation
, use DQL (Ditto Query Language) instead. (#SDKS-907)BasePendingIDSpecificOperation
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class Collection
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class CollectionsEvent
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class Counter
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class Document
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class DocumentID
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class DocumentPath
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class LiveQuery
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class LiveQueryEventInitial
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class LiveQueryEventUpdate
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class MutableCounter
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class MutableDocument
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class MutableDocumentPath
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class MutableRegister
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class PendingCollectionsOperation
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class PendingCursorOperation
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class PendingIDSpecificOperation
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class Register
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class SingleDocumentLiveQueryEvent
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class Subscription
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class UpdateResult
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class UpdateResultsMap
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class WriteTransaction
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class WriteTransactionCollection
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class WriteTransactionPendingCursorOperation
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: class WriteTransactionPendingIDSpecificOperation
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: interface LiveQueryMove
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: interface WriteTransactionResult
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: method QueryResult.mutatedDocumentIDs
, use QueryResult.mutatedDocumentIDsV2()
instead (#SDKS-907) Deprecated: method SmallPeerInfo.getSyncScope()
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: method SmallPeerInfo.setSyncScope()
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: method Store.collection()
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: method Store.collectionNames()
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: method Store.collections()
, use DQL (Ditto Query Language) instead Deprecated: method Store.write()
, use Store.transaction()
instead. (#SDKS-907) Deprecated: property SmallPeerInfo.syncScope
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type CollectionsObservationHandler
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type DocumentIDValue
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type LiveQueryEvent
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type QueryArguments
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type QueryObservationHandler
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type SingleObservationHandler
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type SmallPeerInfoSyncScope
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type SortDirection
, use DQL (Ditto Query Language) instead. (#SDKS-907) Deprecated: type WriteStrategy
, use DQL (Ditto Query Language) instead. (#SDKS-907)DQL Strict Mode
DQL_STRICT_MODE=false
), Ditto is more flexible and will infer the CRDT type based on the document’s shape:Differ
API for calculating diffs between query results.
This API can be used with a store observer to understand how its results change
over successive callbacks. The Differ
API provides a way to track changes in
the data and can be used to optimize data synchronization and conflict resolution.Differ API documentation.Feature | Description | Example |
---|---|---|
UNSET clause | Remove fields from documents | UPDATE orders UNSET items.abc WHERE _id = 'my-id' |
CAST function | Explicitly convert between data types | SELECT * FROM products WHERE CAST(price AS INT) > 10 |
USE IDS clause | Direct document retrieval by ID | SELECT * FROM products USE IDS '123', '456' |
SIMILAR TO | Pattern matching expressions | SELECT * FROM products WHERE name SIMILAR TO '%phone%' |
Runtime expressions | Use expressions in object/array construction | UPDATE products SET metadata = { 'updated_at': current_timestamp() } |
Counters | Support for legacy compatible counter type | UPDATE products APPLY in_stock PN_INCREMENT BY 1.0 |
->
) are deprecated. Read more.DELETE
to remove documents.DQL_STRICT_MODE
as a system parameter to opt-out of requiring collection definitions (#16573)network_use_nextgen_multihop_stack
(#16370)persistenceDirectory
parameter now throws a DittoError
with code store/persistence-directory-locked
instead of only logging an error. This change prevents constructing a non-functional instance as Ditto does require separate configurations for this parameter when multiple instances are instantiated. (#12336) Added: Error code store/persistence-directory-locked
to the DittoError
class. (#12336) Added: property SmallPeerInfo.syncScope
to replace the now deprecated methods SmallPeerInfo.getSyncScope()
and Ditto.smallPeerInfo.setSyncScope()
. (#15579) Deprecated: Methods SmallPeerInfo.getSyncScope()
and SmallPeerInfo.setSyncScope()
, use the SmallPeerInfo.syncScope
property instead. (#15579) Added: Method transaction()
on Store
allowing a DQL transaction to be performed. (#15800) Added: Transaction
representing an active DQL transaction. (#15800) Added: TransactionInfo
encapsulating information about a transaction. (#15800) Added: TransactionCompletionAction
representing an action to be taken upon completing a transaction: Commit or Rollback. (#15800) Added: An opt-in Android foreground service which allows Ditto to sync in the background. (#16097) Added: ditto.observeTransportConditions()
API for React Native that will allow developers to be aware transports conditions changes, like shutting down bluetooth. (#16518) Added: class Diff
to represent diffs produced by the Differ
. (#16723) Added: class Differ
, which calculates diffs between query results. This can be used with a store observer to understand how its results change over successive callbacks. (#16723) Added: More detailed messages about network problems are logged when authentication fails (#SEC-124) Changed: Unify dedicated TCP servers across different transports (Multicast, mDNS, and WiFi Aware) by utilizing a single static TCP server implementation (#TRANS-131)SDK>React Native Install Guide
SDK>Configuring Collection Sync
startSync()
is called USER_COLLECTION_SYNC_SCOPES
cannot be updated without
closing and reopening a new Ditto instance. This will be resolved in the next release. For more information
see Updating Sync Scopes
Sync Scope | Purpose |
---|---|
”AllPeers” (default) | Sync with both Ditto Server and other Small Peers. This is the default behavior for all collections. |
”BigPeerOnly” | Sync only with Ditto Server (Big Peer). Do no sync with other Small Peers. |
”SmallPeersOnly” | Sync only with other Small Peers. Do not sync with Ditto Server. |
”LocalPeerOnly” | Do not sync this collection to Ditto Server or other Small Peers. |
local_mesh_orders
to only sync with other small peers in the mesh and not with Ditto Serverusing the SmallPeersOnly
sync scope.ditto.store.registerObserver(...)
) will now run multi-threaded on all platforms (except for in Web Browsers)
by default. Prior to 4.10.0
all store observers would run on the same thread which could lead to performance issues for applications
with multiple store observers. Users may see performance improvements on applications using more than one store observer, especially during
high-volume usage.Ditto guarantees order sequencing for a single observer. Because observers now run in parallel there is not a guarantee for order
sequencing between observers. This behavior change should not have an impact on your application. If you have concerns or questions
about this behavior change reach out to Ditto’s Customer Support.To reset Ditto to only use a single thread for all Ditto observers use the following system parameter. For instruction on how to set
a system parameter in your specific SDK see SDK>Customizing System Settings
LIKE
operatorLIKE
operator can now be used for pattern matching of string values.DQL>Operator Expressions
Pattern | Meaning |
---|---|
% | Matches zero or more characters (like .* in regex) |
_ | Matches exactly one character (like . in regex) |
object_keys(object)
: Returns an array
with all the keys in the given object
.object_values(object)
: Returns an array
with all the values in object
.DQL>Operator Expressions
LIMIT
, OFFSET
and ORDER BY
in EVICT
and UPDATE
statements.DQL Exampledittoffi_query_result_item_free()
and ditto_clear_presence_callback()
functions in React Native. (#SDKS-555)customAuthURL
and allow authenticating with a custom authentication service instead of the Ditto cloud. (#15904)object_keys
and object_values
scalar DQL functions. (#QE-73)
Peer
type to the correct spelling dittoSdkVersion
from the previous, incorrect spelling dittoSDKVersion
. (#SDKS-176)