Skip to content

docs: document TIME_NS mappings - #9

Merged
Giorgi merged 2 commits into
Giorgi:mainfrom
Mr444-dev:docs/time-ns-type-mapping
Nov 5, 2026
Merged

Giorgi merged 2 commits into
Giorgi:mainfrom
Mr444-dev:docs/time-ns-type-mapping

Conversation

@Mr444-dev

@Mr444-dev Mr444-dev commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Document the TIME_NS mapping and the precision exposed by the supported .NET temporal types.
  • Document TimeOnly and DuckDBTimeOnly mapped-appender support for TIME_NS columns.
  • Keep this documentation aligned with the library change in Giorgi/DuckDB.NET#387.

Validation

  • git diff --check passed.
  • I could not run the DocFX site build locally because the DocFX CLI is not installed; the PR build will validate the site.

@Giorgi

Giorgi commented Nov 4, 2026

Copy link
Copy Markdown
Owner

@Mr444-dev Thanks for the docs. Please change these three things:

  1. Remove DuckDBTimeNs. It's being removed from Data in feat(data): support writing TIME_NS values DuckDB.NET#387 (comment), so please take out the DuckDBTimeNs row in mapped-appender.md, DuckDBTimeNs in the TIME_NS row of type-mapping.md, and "while DuckDBTimeNs exposes the stored nanoseconds" in the precision note.

  2. Drop the TimeSpan parameter note. It doesn't match what the converter does:

    • With a plain SELECT ?, DuckDB doesn't know the parameter's type, so a TimeSpan with DbType.Time goes through ValueCreators[DbType.Time] and arrives as a microsecond TIME. The ticks are not kept.
    • When DuckDB knows the parameter is TIME_NS (an INSERT into a TIME_NS column, or ?::TIME_NS), the (DuckDBType.TimeNs, TimeSpan) case keeps the ticks, with or without DbType.Time.

    This page is also about reading ("when reading data with GetValue and GetFieldValue"), and TIME has the same DbType.Time rule without a note. Parameters for TIME and TIME_NS can be documented together later on a page of their own.

  3. Add > [!NOTE] to the precision note. The other notes on the page start with it; without it the note renders as a plain blockquote.

This PR should be merged after #387.

@Giorgi

Giorgi commented Nov 5, 2026

Copy link
Copy Markdown
Owner

@Mr444-dev Can you update this PR?

@Mr444-dev

Copy link
Copy Markdown
Contributor Author

Hi Giorgi, I’ve updated the documentation in commit c466102:

  • Removed DuckDBTimeNs from the mapped-appender table, the TIME_NS type mapping, and the precision note.
  • Removed the TimeSpan command-parameter note.
  • Changed the precision blockquote to a DocFX [!NOTE].

git diff --check passes. The DocFX CLI is not installed in my local environment, so I could not build the site locally. The related library PR #387 has now been merged. Could you please review the update?

@Giorgi
Giorgi merged commit 0cd045a into Giorgi:main Nov 5, 2026
1 check failed
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