add disable option for sqlite3_expanded_sql by UnixY2K · Pull Request #399 · SRombauts/SQLiteCpp (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation2 Commits2 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

@UnixY2K

Description

Add an option to disable sqlite3_expanded_sql that disables the internal use of it inside the method Statement::getExpandedSQL so it gives a warning when building SQLiteCpp, at runtime it will give an exception instead

this should fix #213

changes

@UnixY2K

make sqlite3_expanded_sql use optional and give a warning at compile time along with a exception at runtime when used in an application

@UnixY2K

I think that we could also add an special exception like SQLite::UnsupportedMethodException for any method that does not want to expose the internal implementation of sqlite3 and not make use of the same Exception used for internal SQLite3 Exceptions.

Edit:

I don´t think that this should be on this PR as is a potential refactor/change of how the API throws exceptions, making it easier to differentiate between internal errors and unsupported errors and how other applications handles it, for example app application showing that the support of cyphers or any optional feature is not supported on the system, but that is just a design idea

@UnixY2K

@SRombauts

@UnixY2K UnixY2K deleted the optional-sqlite3_expanded_sql branch

February 12, 2023 23:20

2 participants

@UnixY2K @SRombauts