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

Implement .getGeneratedKeys[R] #9

Merged
merged 4 commits into from
Apr 12, 2024
Merged

Implement .getGeneratedKeys[R] #9

merged 4 commits into from
Apr 12, 2024

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Apr 12, 2024

I hardcoded it into the base DbApi/Query APIs, rather than as a dialect. Sqlite doesn't support it, but it is a builtin part of the JDBC interface, so it's a bit on the fence which side it should go. But the fact that it does need special support in the core DbApi implementation makes me lean towards treating it as a builtin

We need to pass an explicit [R] type parameter to .getGeneratedKeys because our Table model is not rich enough to tell us what the auto generated primary keys of the table are. This is in contrast to richer models like SLICK which do contain this information. We can streamline this later if necessary, but passing in [Int] or whatever is not a huge hardship.

@lihaoyi lihaoyi merged commit c2cb04f into main Apr 12, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant