Skip to content

docs: clarify datetime2 scale precision - #1828

Open
Ananya2 wants to merge 2 commits into
tediousjs:masterfrom
Ananya2:docs/datetime2-scale-precision
Open

Ananya2 wants to merge 2 commits into
tediousjs:masterfrom
Ananya2:docs/datetime2-scale-precision

Conversation

@Ananya2

@Ananya2 Ananya2 commented Oct 13, 2026

Copy link
Copy Markdown

Summary

  • Clarify that scale controls fractional-second digits for Time, DateTime2, and DateTimeOffset parameters and bulk-load columns.
  • Document the default (7, or 0 for null values).
  • Add a DateTime2 parameter example using { scale: 3 }.

The option remains named scale to avoid a compatibility change.

Validation

  • npx eslint src/request.ts src/bulk-load.ts

@arthurschreiber arthurschreiber left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, clarifying what scale means for the temporal types is a good improvement. The request-parameter defaults described here match the code, but the bulk-load comment describes a default that bulk load never actually uses, so I'd like that fixed before merging. Details inline.

One more thing: the @param scale For Numeric, Decimal, Time, DateTime2, DateTimeOffset. line on BulkLoad#addColumn (around line 292) is unchanged, so it's now inconsistent with the new ColumnOptions.scale docs. Could you update it too, or point it at ColumnOptions.scale?

It would also help to run the typedoc build to check that the inline code and emphasis render properly with the link format from #1826. eslint alone won't catch that.


Generated by Claude Code

Comment thread src/bulk-load.ts Outdated
Comment thread src/request.ts Outdated

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