8000 Make the columns Access requires a value in NOT NULL in the schema and DDL by dominion525 · Pull Request #100 · dominion525/jetdb · GitHub
[go: up one dir, main page]

Skip to content

Make the columns Access requires a value in NOT NULL in the schema and DDL - #100

Merged
dominion525 merged 3 commits into
mainfrom
fix/ddl-required-not-null
Oct 17, 2026
Merged

dominion525 merged 3 commits into
mainfrom
fix/ddl-required-not-null

Conversation

@dominion525
Copy link
Copy Markdown
Owner

Summary

  • The schema and DDL wrote NOT NULL from the NULLABLE flag of each column, but Access keeps that flag on every column: none of the 2,430 columns of the test databases is without it. "Required" in the table design of Access is the Required property of the column, which 106 of them have set. So jetdb schema, jetdb schema --ddl and ddl in jetdb-wasm wrote NOT NULL for AutoNumber columns alone.
  • ddl::schema_tables, which the three use, now clears NULLABLE on each column whose Required property is Yes, as it already gives each calculated column the type of its result. In jetdb-sample.accdb, the four required columns of tblOrders are NOT NULL now.
  • A new test checks that the DDL of jetdb-sample.accdb has NOT NULL on its six required columns and three AutoNumber columns alone.
  • docs/cli.md / docs/cli.ja.md say which columns are NOT NULL.

🤖 Generated with Claude Code

dominion525 and others added 3 commits October 17, 2026 14:48
…d DDL

- Access keeps the NULLABLE flag on every column and stores "Required" as the Required property of the column, so the schema and DDL never wrote NOT NULL but for AutoNumber columns
- Clear NULLABLE in schema_tables on each column whose Required property is Yes, so that jetdb schema, jetdb schema --ddl and ddl in jetdb-wasm write NOT NULL for it
- Add a test that the DDL of jetdb-sample.accdb has NOT NULL on its required columns alone

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Say in docs/cli.md and docs/cli.ja.md that a column whose Required property is Yes, and an AutoNumber column, is NOT NULL in the DDL and in the column list of jetdb schema

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… complexity threshold

- Move the check whether a map of properties is that of a column whose Required property is Yes into is_required, and let clear_nullable_of_required collect the names of those columns and clear their flags, which takes its cyclomatic complexity from 10 to 7

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@dominion525
dominion525 merged commit 5828b06 into main Oct 17, 2026
10 checks passed
@dominion525
dominion525 deleted the fix/ddl-required-not-null branch October 17, 2026 06:05
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

Successfully merging this pull request may close these issues.

1 participant

0