Skip to content

feat: add nullable civil types for date/time parameters#325

Open
dlevy-msft-sql wants to merge 1 commit intomainfrom
feat/nullable-civil-types
Open

feat: add nullable civil types for date/time parameters#325
dlevy-msft-sql wants to merge 1 commit intomainfrom
feat/nullable-civil-types

Conversation

@dlevy-msft-sql
Copy link

Adds NullDate, NullDateTime, and NullTime types that wrap civil.Date, civil.DateTime, and civil.Time with nullable semantics.

Changes

  • civil_null.go: New NullDate, NullDateTime, NullTime types with Scanner and Valuer interfaces
  • mssql_go19.go: Handle nullable civil types in convertInputParameter
  • mssql.go: Handle null encoding in makeParam
  • tvp_go19.go: TVP support for nullable civil types

Features

  • Implements Scanner and Valuer interfaces for database operations
  • Supports TVP (Table Value Parameters) with null handling
  • Supports OUT parameters

Closes #289

Adds NullDate, NullDateTime, and NullTime types that wrap civil.Date,
civil.DateTime, and civil.Time with nullable semantics.

- Implements Scanner and Valuer interfaces for database operations
- Supports TVP (Table Value Parameters) with null handling
- Supports OUT parameters

Closes #289
@dlevy-msft-sql dlevy-msft-sql force-pushed the feat/nullable-civil-types branch from 36d34cf to 23d7c2c Compare February 6, 2026 04:06
@dlevy-msft-sql dlevy-msft-sql self-assigned this Feb 6, 2026
@codecov-commenter
Copy link

codecov-commenter commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 66.34615% with 35 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.36%. Comparing base (95e5e8a) to head (23d7c2c).

Files with missing lines Patch % Lines
tvp_go19.go 0.00% 21 Missing ⚠️
mssql.go 0.00% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #325      +/-   ##
==========================================
- Coverage   78.59%   78.36%   -0.24%     
==========================================
  Files          34       35       +1     
  Lines        6598     6702     +104     
==========================================
+ Hits         5186     5252      +66     
- Misses       1134     1171      +37     
- Partials      278      279       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Null support for civil.*

2 participants