-
Notifications
You must be signed in to change notification settings - Fork 194
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
Documentation update on DateTimeConverter sample #442
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #442 +/- ##
===========================================
- Coverage 83.40% 83.29% -0.11%
===========================================
Files 68 58 -10
Lines 1687 1479 -208
===========================================
- Hits 1407 1232 -175
+ Misses 280 247 -33
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a second README file located at floor/README.md
which is a copy of the project-level one. Please also apply your changes to this file.
README.md
Outdated
try { | ||
return DateTime.fromMillisecondsSinceEpoch(databaseValue); | ||
} catch (e) { | ||
return null; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓Is it possible to make DateTime.fromMillisecondsSinceEpoch
throw as long as the given value is not null
? If not, we could simplify these lines by checking if the databaseValue
is null
. If not, we create a DateTime
. In case it's null
, we return null
.
README.md
Outdated
try { | ||
return value.millisecondsSinceEpoch; | ||
} catch (e) { | ||
return null; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡We could simply check if value
is null
. If it is, we return null
. If it isn't, we access value.millisecondsSinceEpoch
.
@vitusortner I have changed now the both README.md files, I also added an explanation of what's the code do, so please check if it's ok now. |
Your commit seems to have gone missing. Can you try to push it again? |
@vitusortner check if you have received the new PR, I have made the commit, but not the PR. |
* Change ForeignKeyAction to enum in the generator (#359) * Added support for WITH statements for DatabaseViews (#443) * Documentation update on DateTimeConverter sample (#442) * Make foreign key mapping null safe Co-authored-by: mqus <8398165+mqus@users.noreply.github.com> Co-authored-by: themadmrj <themadmrj@users.noreply.github.com> Co-authored-by: Cássio Seffrin <cassioseffrin@gmail.com>
Following the @vitusortner suggestion I have made a PR just to update the sample of DateTimeConverter in the docs.