Skip to content

feat: add option to override string to DateTime for Sqlite#317

Merged
SockworkOrange merged 7 commits intomainfrom
316-question-about-type-overrides-in-sqlite
Sep 27, 2025
Merged

feat: add option to override string to DateTime for Sqlite#317
SockworkOrange merged 7 commits intomainfrom
316-question-about-type-overrides-in-sqlite

Conversation

@SockworkOrange
Copy link
Collaborator

No description provided.

@SockworkOrange SockworkOrange linked an issue Sep 24, 2025 that may be closed by this pull request
@SockworkOrange SockworkOrange changed the title feat: add optin to override string to DateTime for Sqlite feat: add option to override string to DateTime for Sqlite Sep 24, 2025
@SockworkOrange SockworkOrange force-pushed the 316-question-about-type-overrides-in-sqlite branch from f754a81 to 7712c7f Compare September 24, 2025 19:52
@SockworkOrange SockworkOrange force-pushed the 316-question-about-type-overrides-in-sqlite branch from 3f4d78c to e618035 Compare September 24, 2025 20:21
Comment on lines +66 to +67
return $"{el} != null ? (int?) new DateTimeOffset({elWithOptionalNull}.ToUniversalTime()).ToUnixTimeSeconds() : {nullValue}";
return $"{el} != null ? {elWithOptionalNull}.ToString(\"yyyy-MM-dd HH:mm:ss\") : {nullValue}";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Great work! only two questions

  1. \"yyyy-MM-dd HH:mm:ss\" shouldn't this come from the override config (we can have a coded default)
  2. Shouldn't this be documented in our README override options?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

  1. Maybe a constant, don't think as an option - that is the default datetime format in SQLite. While it doesn't have datetime data type support, it does have a datetime function that returns at this format. relying on the default makes sense here, no?
  2. Yeah definitely, will add that

Copy link
Collaborator

@doron050 doron050 left a comment

Choose a reason for hiding this comment

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

amazing!

@SockworkOrange SockworkOrange merged commit ecda614 into main Sep 27, 2025
6 checks passed
@github-actions github-actions bot deleted the 316-question-about-type-overrides-in-sqlite branch December 1, 2025 02:06
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.

Question about type overrides in SQLite

2 participants