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

Use Room API instead of SQLite API directly #169

Open
djbrown opened this issue Jul 3, 2024 · 2 comments
Open

Use Room API instead of SQLite API directly #169

djbrown opened this issue Jul 3, 2024 · 2 comments

Comments

@djbrown
Copy link

djbrown commented Jul 3, 2024

From https://developer.android.com/training/data-storage/room:

The Room persistence library provides an abstraction layer over SQLite to allow fluent database access while harnessing the full power of SQLite. In particular, Room provides the following benefits:

  • Compile-time verification of SQL queries.
  • Convenience annotations that minimize repetitive and error-prone boilerplate code.
  • Streamlined database migration paths.

Because of these considerations, we highly recommend that you use Room instead of using the SQLite APIs directly.

mainly concerns the org.gnucash.android.db package, but also all the other places where sqlite API is used directly (see search).

also #164 is mildly relevant

@hades
Copy link

hades commented Jul 18, 2024

I'm actually working on it in my repository. I'll send you pull requests as I go. Do note, however, that it will involve a lot of cleanup first, as I want to simplify the current models as much as possible, remove nested models (such as account->transaction->split), remove behaviour that belongs somewhere else, etc.

@djbrown
Copy link
Author

djbrown commented Jul 23, 2024

@hades good to know 👍🏾
Cautious reminder: please keep PRs small and as isolated as possible, so they can be reviewed better and faster.

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

No branches or pull requests

2 participants