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

Issue #74 - Support microsecond time resolution #93

Merged
merged 9 commits into from
Apr 4, 2023

Conversation

acinep
Copy link
Contributor

@acinep acinep commented Apr 4, 2023

Resolves issue #74

  • Rename struct fields to clarify microsecond vs. millisecond
  • Use ticks to create and parse DateTime objects retaining microseconds
  • Use constant value for UnixEpoch
  • Update tests to include microseconds
  • Removed p/invoke call

The parsing to/from ticks is a little clunky as the netstandard2 and net6 DateTime API don't support microsecond properties. This is available in net7+ which would clean a lot of this up.

Feedback welcome

@acinep
Copy link
Contributor Author

acinep commented Apr 4, 2023

I added additional test cases with non-zero microseconds. I think its probably fine to use these instead of the existing cases (keeping the total at three per fixture) but I didn't want to remove existing cases without getting the OK to do so.

@Giorgi Giorgi changed the base branch from main to develop April 4, 2023 15:09
@coveralls
Copy link

coveralls commented Apr 4, 2023

Pull Request Test Coverage Report for Build 4612114486

  • 12 of 22 (54.55%) changed or added relevant lines in 4 files are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-1.0%) to 85.338%

Changes Missing Coverage Covered Lines Changed/Added Lines %
DuckDB.NET/Utils.cs 4 6 66.67%
DuckDB.NET/DuckDBTimestamp.cs 0 3 0.0%
DuckDB.NET/DuckDBTimeOnly.cs 6 11 54.55%
Files with Coverage Reduction New Missed Lines %
DuckDB.NET/DuckDBTimestamp.cs 5 46.67%
Totals Coverage Status
Change from base Build 4609338767: -1.0%
Covered Lines: 705
Relevant Lines: 824

💛 - Coveralls

Copy link
Owner

@Giorgi Giorgi left a comment

Choose a reason for hiding this comment

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

Looks good

DuckDB.NET/DuckDBTimeOnly.cs Outdated Show resolved Hide resolved
@Giorgi Giorgi merged commit b23b5a6 into Giorgi:develop Apr 4, 2023
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.

3 participants