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

Consistently used sqlite_master for compatibility with older SQLite versions #540

Merged
merged 3 commits into from
Jun 20, 2023

Conversation

mphill
Copy link
Contributor

@mphill mphill commented Jun 20, 2023

There is a mismatch in the schema name being used in the inspector, in one query sqlite_schema is used, then directly after sqlite_master is used. They renamed sqlite_master to sqlite_schema, but both exist at this point and will for the foreseeable future.

In 3.33.0 created an alias for sqlite_master, sqlite_schema.

See:

https://sqlite.org/forum/forumpost/d90adfbb0a

Thanks!

…r to 3.33.0 work

There is a mismatch in the schema name being used in the inspector, in one query sqlite_schema is used, then directly after sqlite_master is used.  They renamed sqlite_master to sqlite_schema, but both exist at this point and will for the foreseeable future.
Use sqlite_master instead of sqlite_schema
@vercel
Copy link

vercel bot commented Jun 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kysely ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 20, 2023 10:04am

@koskimas
Copy link
Member

Thank you!

Copy link
Member

@igalklebanov igalklebanov left a comment

Choose a reason for hiding this comment

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

Let's use sqlite_schema instead of sqlite_master, as "master" might be offensive and its also the legacy name now.

@mphill
Copy link
Contributor Author

mphill commented Jun 20, 2023

https://developer.android.com/reference/android/database/sqlite/package-summary

I’m trying to get kysely working on android via react native/expo. As you see kysely will not run on any current android version due to the sqlite_schema reference. Effectively excluding billions of devices.

Using sqlite_master allows kysely to work on all Android versions, all versions of SQLite everywhere.

Android aside, kysely will not work on older SQLite versions release prior to 8/2020 as a result of using sqlite_schema.

@mphill
Copy link
Contributor Author

mphill commented Jun 20, 2023

Thank you

https://github.com/mphill/kysely-expo

I have kysely working on iOS and Android, it’s perfect for embedded and mobile. This change will allow it to work in even more places now.

@igalklebanov igalklebanov added bug Something isn't working sqlite Related to sqlite built-in dialect Related to a built-in dialect labels Jun 20, 2023
@koskimas koskimas merged commit e4de7bb into kysely-org:master Jun 20, 2023
3 checks passed
Gaspero pushed a commit to Gaspero/kysely that referenced this pull request Oct 2, 2023
…r to 3.33.0 work (kysely-org#540)

There is a mismatch in the schema name being used in the inspector, in one query sqlite_schema is used, then directly after sqlite_master is used.  They renamed sqlite_master to sqlite_schema, but both exist at this point and will for the foreseeable future.

Co-authored-by: Igal Klebanov <igalklebanov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working built-in dialect Related to a built-in dialect sqlite Related to sqlite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants