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

Pragma statements not being added to generated code #1089

Closed
ScottPierce opened this issue Dec 10, 2018 · 1 comment
Closed

Pragma statements not being added to generated code #1089

ScottPierce opened this issue Dec 10, 2018 · 1 comment
Milestone

Comments

@ScottPierce
Copy link

I'm adding some simple sql statements for database management, but I'm not seeing them generate anywhere that I can use them.

getUserVersion:
PRAGMA user_version;

setUserVersion:
PRAGMA user_version=?1;

A workaround that is a little ugly:

db.getConnection()
    .prepareStatement("PRAGMA user_version;", SqlPreparedStatement.Type.EXECUTE, 0)
    .executeQuery()
    .getLong(0)!!

db.getConnection()
    .prepareStatement(
        "PRAGMA user_version=${QueryWrapper.Schema.version};",
        SqlPreparedStatement.Type.EXECUTE,
        0
    )
    .execute()
@AlecKazakova
Copy link
Collaborator

Going to track pragma statements which return values separately: #1106

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

No branches or pull requests

2 participants