-
Notifications
You must be signed in to change notification settings - Fork 61
Add auto increment keys and auto fields with UUID v4 or v7 #192
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
base: main
Are you sure you want to change the base?
Conversation
|
@claude /pr-review |
|
I'll analyze this and get back to you. |
Returning NULL as the default is not ideal as we want to generally avoid NULL in favor of richer expressions.
…with the correct amount of fields
| /// These statements can reference fields from the inserted record using | ||
| /// `Expr::ParentField`. They execute after the parent INSERT but do not | ||
| /// affect the returned results. | ||
| pub then: Vec<Statement>, |
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.
I know it was in the design doc. I would punt on it for the initial PR. I don't think any current test will require this to pass.
tests/tests/field_auto.rs
Outdated
| .await | ||
| .unwrap(); | ||
| assert_eq!(u.id, i); | ||
| assert_eq!(u.bars.get()[0].foo.get().id, i); |
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.
foo.get() should not work here since the foo association is not eager loaded. You will need to issue a query to load it. I don't remember the API, maybe check another test file
# Conflicts: # crates/toasty-core/src/schema/builder/table.rs # crates/toasty-core/src/schema/db/ty.rs

No description provided.