Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add cursor extension to get columns by name #110

Merged
merged 3 commits into from
Feb 3, 2025

Conversation

kpgalligan
Copy link
Contributor

Columns by name, implemented with partially forked SqlDelight drivers. Tested on iOS, but I have another branch that intends to add some core testing, to actually run the db calls within the core test suite. Can discuss the relative priority of that, though.

The SqlDelight driver code doesn't expose much that can be extended within the platform-specific implementations, so much of the code is copied over. Jdbc is an exception, which allowed for some extension and less code copy. However, the SqlDriver implementations look and act the same as the stock drivers to SqlDelight calls. That means the bulk of the internal driver code remains the same. The only real difference in the driver implementation is the cursor extension, which allow grabbing column names and indexes.

The driver code for SqlDelight rarely changes at this point, so forking the code is of minimal risk as far as maintenance is concerned. In addition, the only meaningful changes from a functional perspective are the extended cursors, so if the drivers were to have meaningful future changes, adopting those would be straightforward.

@DominicGBauer DominicGBauer changed the title Kpg/columns by name feat: add cursor extension to get columns by name Feb 3, 2025
@DominicGBauer DominicGBauer merged commit 970f9dd into powersync-ja:main Feb 3, 2025
3 checks passed
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.

2 participants