Skip to content
This repository was archived by the owner on Jul 9, 2024. It is now read-only.

Initial Drift QueryExecutor #1

Merged
merged 9 commits into from
Feb 20, 2024
Merged

Initial Drift QueryExecutor #1

merged 9 commits into from
Feb 20, 2024

Conversation

rkistner
Copy link
Contributor

@rkistner rkistner commented Feb 20, 2024

Tested and working:

  • Querying
  • Watching queries
  • Insert, update and delete
  • Custom queries
  • Transactions, nested transactions

Upstream changes that could help to have in Drift:

  1. A separate method for "update ... returning", instead of using runSelect for this.
  2. Allow SupportedTransactionDelegate to implement nested transactions, instead of duplicating the logic here.

Structured as a monorepo to make it easy to merge into sqlite_async repo later.

This only contains basic examples showing the database setup. A full example of what usage would look like is here:
powersync-ja/powersync.dart#60. It's mostly just Drift examples though - the only code directly relevant to this package is the database setup.

Copy link
Contributor

@stevensJourney stevensJourney left a comment

Choose a reason for hiding this comment

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

This is pretty awesome.

@rkistner rkistner merged commit ec8220b into main Feb 20, 2024
@rkistner rkistner deleted the drift-executor branch February 20, 2024 14:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants