-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
SQLite Scaffolding: Use column type and values to provide a better CLR type #30816
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bricelam
changed the title
SQLite Scaffolding: Use column values and type name to provide a better CLR type
SQLite Scaffolding: Use column type and values to provide a better CLR type
May 4, 2023
bricelam
commented
May 4, 2023
src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteDatabaseModelFactory.cs
Outdated
Show resolved
Hide resolved
bricelam
commented
May 5, 2023
bricelam
commented
May 5, 2023
src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteDatabaseModelFactory.cs
Outdated
Show resolved
Hide resolved
bricelam
commented
May 5, 2023
src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteDatabaseModelFactory.cs
Outdated
Show resolved
Hide resolved
ajcvickers
reviewed
May 8, 2023
src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteDatabaseModelFactory.cs
Show resolved
Hide resolved
ajcvickers
reviewed
May 8, 2023
ajcvickers
approved these changes
May 8, 2023
bricelam
commented
May 8, 2023
src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteDatabaseModelFactory.cs
Outdated
Show resolved
Hide resolved
bricelam
force-pushed
the
duck
branch
2 times, most recently
from
May 9, 2023 22:38
794e31c
to
a392e70
Compare
bricelam
commented
May 9, 2023
src/EFCore.Sqlite.Core/Scaffolding/Internal/SqliteDatabaseModelFactory.cs
Show resolved
Hide resolved
…R type Here's a table highlighting some of the improvements. Column type | Sample value | Before | After ----------- | -------------------------------------- | ------ | ----- BOOLEAN | 0 | byte[] | bool SMALLINT | 0 | long | short INT | 0 | long | int BIGINT | 0 | long | long TEXT | '0.0' | string | decimal TEXT | '1970-01-01' | string | DateOnly TEXT | '1970-01-01 00:00:00' | string | DateTime TEXT | '00:00:00' | string | TimeSpan TEXT | '00000000-0000-0000-0000-000000000000' | string | Guid STRING | 'ABC' | byte[] | string Resolves dotnet#8824
Looks like this also dramatically improves views (where column types aren't available) |
I manually tested this on the Northwind and Chinook sample databases, and the improvements are incredible. So many string-to-DateTime and byte-array-to-something-actually-useful changes. |
Where are those sample SQLite Databases? |
0xced
added a commit
to 0xced/EFCore.Scaffolding
that referenced
this pull request
Sep 27, 2023
It has much better scaffolding capabilities for SQLite since dotnet/efcore#30816
0xced
added a commit
to 0xced/EFCore.Scaffolding
that referenced
this pull request
Oct 13, 2023
It has much better scaffolding capabilities for SQLite since dotnet/efcore#30816
0xced
added a commit
to 0xced/EFCore.Scaffolding
that referenced
this pull request
Nov 27, 2023
It has much better scaffolding capabilities for SQLite since dotnet/efcore#30816 TODO: Wait for Oracle, see oracle/dotnet-db-samples#328
0xced
added a commit
to 0xced/EFCore.Scaffolding
that referenced
this pull request
Nov 27, 2023
It has much better scaffolding capabilities for SQLite since dotnet/efcore#30816 TODO: Wait for Oracle, see oracle/dotnet-db-samples#328
0xced
added a commit
to 0xced/EFCore.Scaffolding
that referenced
this pull request
Jan 25, 2024
It has much better scaffolding capabilities for SQLite since dotnet/efcore#30816
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
"If it looks like a duck, quacks like a duck, it's a duck!" (Robin Cook)
Here's a table highlighting some of the improvements.
Resolves #8824