Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(sqlite): Support NOT NULL constraints #4234

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

Open
ncruces wants to merge 2 commits into sqlc-dev:main
base: main
Choose a base branch
Loading
from ncruces:notnull

Conversation

@ncruces
Copy link

@ncruces ncruces commented Dec 15, 2025

You may have missed that sqlite3_table_column_metadata gets additional metadata for columns, in particular NOT NULL constraints.

Unfortunately because of backwards compatibility a PRIMARY KEY column is not always NOT NULL, and it's really hard to correctly detect INTEGER PRIMARY KEY columns which are NOT NULL.

So this misses a few NOT NULL columns, but it's better than nothing, I guess.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. 🔧 golang labels Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

size:S This PR changes 10-29 lines, ignoring generated files. 🔧 golang

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /