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

fix: [SQLite3] getFieldData() returns incorrect primary_key values #8460

Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Jan 26, 2024

Description
The return type is integer, not boolean.

primary_key - integer 1 if the column is a primary key (all integer 1, even if there are multiple primary keys), otherwise integer 0 (This field is currently only available for MySQL and SQLite3)
See https://codeigniter4.github.io/CodeIgniter4/database/metadata.html#retrieve-field-metadata

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added the bug Verified issues on the current code behavior or pull requests that will fix them label Jan 26, 2024
@kenjis kenjis added the database Issues or pull requests that affect the database layer label Jan 26, 2024
@kenjis kenjis force-pushed the fix-sqlite3-getFieldData-primary_key branch from 284ac97 to 4a949b3 Compare January 26, 2024 23:49
@kenjis kenjis merged commit 057bcbd into codeigniter4:develop Jan 30, 2024
63 checks passed
@kenjis kenjis deleted the fix-sqlite3-getFieldData-primary_key branch January 30, 2024 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them database Issues or pull requests that affect the database layer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants