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

Documentation update on DateTimeConverter sample #442

Merged
merged 6 commits into from
Dec 19, 2020
Merged

Documentation update on DateTimeConverter sample #442

merged 6 commits into from
Dec 19, 2020

Conversation

cassioseffrin
Copy link
Contributor

Following the @vitusortner suggestion I have made a PR just to update the sample of DateTimeConverter in the docs.

@codecov
Copy link

codecov bot commented Dec 9, 2020

Codecov Report

Merging #442 (eaa6eb8) into develop (9da21f3) will decrease coverage by 0.10%.
The diff coverage is n/a.

Impacted file tree graph

@@             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     
Flag Coverage Δ
floor ?
floor_generator 83.29% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
floor/lib/src/adapter/query_adapter.dart
floor/lib/src/callback.dart
floor/lib/src/adapter/migration_adapter.dart
floor/lib/src/migration.dart
floor/lib/src/sqflite_database_factory.dart
floor/lib/src/util/primary_key_helper.dart
...src/extension/on_conflict_strategy_extensions.dart
floor/lib/src/adapter/insertion_adapter.dart
floor/lib/src/adapter/deletion_adapter.dart
floor/lib/src/adapter/update_adapter.dart

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9da21f3...38ecbf1. Read the comment docs.

Copy link
Collaborator

@vitusortner vitusortner left a 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
Comment on lines 587 to 591
try {
return DateTime.fromMillisecondsSinceEpoch(databaseValue);
} catch (e) {
return null;
}
Copy link
Collaborator

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
Comment on lines 596 to 600
try {
return value.millisecondsSinceEpoch;
} catch (e) {
return null;
}
Copy link
Collaborator

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.

@cassioseffrin
Copy link
Contributor Author

@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.

@vitusortner
Copy link
Collaborator

Your commit seems to have gone missing. Can you try to push it again?

@cassioseffrin
Copy link
Contributor Author

@vitusortner check if you have received the new PR, I have made the commit, but not the PR.

@vitusortner vitusortner mentioned this pull request Dec 19, 2020
@vitusortner vitusortner merged commit dc871d6 into pinchbv:develop Dec 19, 2020
vitusortner added a commit that referenced this pull request Dec 19, 2020
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants