Skip to content

Update to DQL#200

Open
Alec Coyner (acoyner) wants to merge 1 commit intomainfrom
ac/update-to-dql
Open

Update to DQL#200
Alec Coyner (acoyner) wants to merge 1 commit intomainfrom
ac/update-to-dql

Conversation

@acoyner
Copy link
Contributor

@acoyner Alec Coyner (acoyner) commented Dec 9, 2025

User description

Closes CXTOOLS-255


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Migrates the application to use Ditto Query Language (DQL) for data operations and synchronization across several modules. Updates the DittoService to explicitly disable v3 sync and replaces legacy collection observers with DQL-based DittoStoreObserver and DittoSyncSubscription components.

TopicDetails
Infrastructure Updates data models and service initialization to support DQL, including handling DittoQueryResultItem and enforcing a fail-fast v3 sync disablement.
Modified files (4)
  • DittoToolsApp/DittoToolsApp/Services/Ditto Service/DittoService.swift
  • Sources/DittoExportData/ExportData.swift
  • Sources/DittoPresenceDegradation/Models/Peer.swift
  • Sources/DittoPresenceDegradation/Models/Settings.swift
Latest Contributors(2)
UserCommitDate
bplattenburgUpdate-min-SDK-to-4.12...November 06, 2025
[email protected]Add-support-for-macOS-...March 18, 2025
DQL Migration Replaces legacy collection-based subscriptions and live queries with DQL SELECT statements in DataBrowserViewModel and DocumentsViewModel.
Modified files (4)
  • Sources/DittoDataBrowser/DataBrowser.swift
  • Sources/DittoDataBrowser/DataBrowserViewModel.swift
  • Sources/DittoDataBrowser/DocumentsViewModel.swift
  • Sources/DittoHeartbeat/HeartbeatVM.swift
Latest Contributors(2)
UserCommitDate
[email protected]minor-fixesJune 05, 2025
[email protected]Removing-all-unsupport...March 11, 2025
This pull request is reviewed by Baz. Review like a pro on (Baz).

@acoyner Alec Coyner (acoyner) requested a review from a team as a code owner December 9, 2025 18:14
func startSubscription() {
subscription = ditto.store.collections().subscribe()
do {
subscription = try ditto.sync.registerSubscription(query: "SELECT * FROM system:collections")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we trying to subscribe to all the collections? i.e. here we would need a list of all of the collections, then for each one register a subscription?

this is just registering a subscription to the system collection, which I am not sure we actually need to do that - its always accessible (double check me on that)

Also would that query work? the :collections part isn't misinterpreted as a value placeholder?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We definitely don't want to subscribe to anything in this tool, the fact that the old one did is not a good thing.

@rajramsaroop

I don't think we're handling strict mode here at all? My suggestion would be a toggle for strict mode, with default strict mode off

@bplattenburg
Copy link
Member

I'd like to take a step back here and make sure we have a clear path forward here - I think the overall goal is to replace this tool entirely with a DQL editor like Aaron LaBeau (@biozal) made in Edge Studio rather than something more piecemeal.

@acoyner
Copy link
Contributor Author

Should I just remove the Data Browser changes from this PR and put up a new one for that change? Brian Plattenburg (@bplattenburg)

@bplattenburg
Copy link
Member

Alec Coyner (@acoyner) Yes, I think that makes sense to break out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants