You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried fetching definitions from my database and generating the models, but a lot of our real-world use cases couldn't be used so I thought I could add some of them.
A few more are still missing, like TIME and DATETIMEOFFSET.
Also not quite certain about NUMERIC and DECIMAL
I could possibly try adding something like this to the integration tests if I can get them running
Yeah, the integration tests are a little finicky to get working. Especially the mssql ones. The basic unit test can be ran from just the welds/welds directory with a cargo test. The database specific integration tests need to be ran from a Linux box with docker installed so they can test against a real DB.
The MSSQL tests are even worse. The migration tests can't be ran in parallel for MSSQL, so they need
cd tests
cd mssql
cargo test -- --test-threads=1
Your types look great, but I have a couple thoughts for you.
For recommended_db_type I thought the recommended MSSQL type for datetimes was DATETIME2. Both DATETIME2 and DATETIME should map just fine to a chrono::Datetime, just want to make the best recommendation as to what type we suggest using in the DB line:448 in your Merge request
You asked about NUMERIC and DECIMAL. I know tiberius will map these to rust_decimal::Decimal. This requires adding tiberius to your cargo.toml with the feature rust_decimal added. I would suggest going with these.
Really appreciate your help here. Let me know what you think.
This file contains hidden or 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
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.
I tried fetching definitions from my database and generating the models, but a lot of our real-world use cases couldn't be used so I thought I could add some of them.
A few more are still missing, like TIME and DATETIMEOFFSET.
Also not quite certain about NUMERIC and DECIMAL
I could possibly try adding something like this to the integration tests if I can get them running