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

sqlite: no support for "STRICT Tables" #1877

Closed
trevorstarick opened this issue Oct 4, 2022 · 2 comments
Closed

sqlite: no support for "STRICT Tables" #1877

trevorstarick opened this issue Oct 4, 2022 · 2 comments

Comments

@trevorstarick
Copy link

trevorstarick commented Oct 4, 2022

Version

1.15.0

What happened?

I attempted to enable SQLite's strict table mode and was told that STRICT was an extraneous input. I believe a new token needs to be added to the lexer/parser to support strict tables, but there shouldn't need to be any work done on the generator side as SQLC doesn't handle table generation at the moment.

I believe errors should be thrown if the types used aren't from the following:

  • INT
  • INTEGER
  • REAL
  • TEXT
  • BLOB
  • ANY

as those are what are officially supported per the SQLite documentation: https://www.sqlite.org/stricttables.html

Relevant log output

line 3:2 extraneous input 'STRICT' expecting {<EOF>, ';', ALTER_, ANALYZE_, ATTACH_, BEGIN_, COMMIT_, CREATE_, DEFAULT_, DELETE_, DETACH_, DROP_, END_, EXPLAIN_, INSERT_, PRAGMA_, REINDEX_, RELEASE_, REPLACE_, ROLLBACK_, SAVEPOINT_, SELECT_, UPDATE_, VACUUM_, VALUES_, WITH_}

Database schema

CREATE TABLE foo (
	hash TEXT NOT NULL PRIMARY KEY
) STRICT;

SQL queries

No response

Configuration

No response

Playground URL

No response

What operating system are you using?

Linux, macOS

What database engines are you using?

SQLite

What type of code are you generating?

Go

@trevorstarick trevorstarick added bug Something isn't working triage New issues that hasn't been reviewed labels Oct 4, 2022
@kyleconroy kyleconroy added 🔧 golang 💻 darwin 📚 sqlite 💻 linux and removed triage New issues that hasn't been reviewed labels Nov 9, 2022
@prochac
Copy link

prochac commented Apr 7, 2023

Solved in #2175

@kyleconroy kyleconroy added this to the 1.18.0 milestone Apr 7, 2023
@kyleconroy
Copy link
Collaborator

This will be released in v1.18.0.

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

3 participants