-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Improve and document foreign_keys=... argument to insert/create/etc #17
Comments
It looks like the type information isn't actually used for anything at all, so this: sqlite-utils/tests/test_create.py Lines 97 to 103 in f8d3b7c
Could actually be written like this:
|
Sanity checking those foreign keys would be worthwhile. |
This involves a breaking API change. I need to call that out in the README and also fix my two other projects which use the old four-tuple version of And I'll also need to set a minimum version for https://github.com/simonw/db-to-sqlite/blob/c2f8e93bc6bbdfd135de3656ea0f497859ae49ff/setup.py#L25 |
A breaking change is shipping shortly: simonw/sqlite-utils#17
Re-opening this until I've fixed the other two projects. |
Need to put out a new release of |
Both projects have been upgraded. |
The
foreign_keys=
argument totable.insert_all()
and friends can be used to specify foreign key relationships that should be created.It is not yet documented. It also requires you to specify the SQLite type of each column, even though this can be detected by introspecting the referenced table:
Relates to #2
The text was updated successfully, but these errors were encountered: