Skip to content

[codex] Add auto_id tag support - #119

Merged
TheSentinel454 merged 1 commit into
masterfrom
codex/auto-id-tag
Jun 8, 2026
Merged

[codex] Add auto_id tag support#119
TheSentinel454 merged 1 commit into
masterfrom
codex/auto-id-tag

Conversation

@TheSentinel454

Copy link
Copy Markdown
Collaborator

Summary

Adds support for an auto_id db tag option so a mapped model field can participate in Squalor's generated-id writeback even when table metadata does not mark the column as AUTO_INCREMENT.

Details

  • Parses db:\",auto_id\" / db:\"id,auto_id\" into field metadata.
  • Treats auto_id fields like auto-increment fields in insert planning for LastInsertId() population.
  • Excludes auto_id fields from update and upsert assignment lists, matching existing auto-increment handling.
  • Documents the tag and adds regression coverage for tag parsing and insert writeback.

Validation

  • go test -vet=off ./...

Note: plain go test ./... still fails on the existing vet/example issue: ExampleTable_Join refers to unknown field or method: Table.Join.

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@TheSentinel454
TheSentinel454 marked this pull request as ready for review June 8, 2026 14:59
@TheSentinel454
TheSentinel454 merged commit 4f7792d into master Jun 8, 2026
7 checks passed
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.

3 participants