Skip to content

Add Column::getOptional<T>() for nullable values - #614

Open
SRombauts wants to merge 3 commits into
masterfrom
feature-column-get-optional
Open

SRombauts wants to merge 3 commits into
masterfrom
feature-column-get-optional

Conversation

@SRombauts

Copy link
Copy Markdown
Owner

Add a C++17 Column::getOptional<T>() accessor that returns std::nullopt for SQL NULL and otherwise uses existing column conversions. Cover zero, empty values, pointers, embedded NUL bytes, and borrowed views. This does not change getColumns() or add implicit optional conversions; follow-up to #521 and #612.

SRombauts added a commit that referenced this pull request Oct 24, 2026
Add the new nullable value accessor to the 4.0 changelog (#614).
SRombauts added a commit that referenced this pull request Oct 24, 2026
Add the new nullable value accessor to the 4.0 changelog (#614).
@SRombauts
SRombauts force-pushed the feature-column-get-optional branch from cea0a93 to 34cfa6d Compare October 24, 2026 16:58
@coveralls

coveralls commented Oct 24, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 99.737% (+0.002%) from 99.735% — feature-column-get-optional into master

SRombauts added a commit that referenced this pull request Oct 24, 2026
Add the new nullable value accessor to the 4.0 changelog (#614).
@SRombauts
SRombauts force-pushed the feature-column-get-optional branch from 34cfa6d to 723c14b Compare October 24, 2026 17:25
Return std::nullopt for SQL NULL and reuse existing value
conversions otherwise. Cover NULL, zero, empty strings and BLOBs,
embedded NUL bytes, and borrowed pointer and view types.
Distinguish owned strings from borrowed pointers and views,
including optional values and their lifetime constraints.
Add the new nullable value accessor to the 4.0 changelog (#614).
@SRombauts
SRombauts force-pushed the feature-column-get-optional branch from 723c14b to c8c4468 Compare October 24, 2026 18:52

This branch has not been deployed

No deployments
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.

2 participants