Skip to content

Conversation

brandur
Copy link
Contributor

@brandur brandur commented Jul 5, 2024

Here, finish the implementations on #insert_many and #insert_many_tx,
which were previously marked as not yet finished. The Python plugin for
sqlc doesn't implement copyfrom, so we instead fall back on an
alternative approach from an experimental database/sql branch I have,
which implements an insert many operation using a combination of Postgres
arrays and unnest.

We remove some Optional annotations on JobInsertParams for properties
that are always set by the client. (Necessary to make MyPy's checks pass
properly.)

@brandur brandur force-pushed the brandur-insert-many branch 2 times, most recently from ca4b452 to 3b49483 Compare July 5, 2024 06:53
Here, finish the implementations on `#insert_many` and `#insert_many_tx`,
which were previously marked as not yet finished. The Python plugin for
sqlc doesn't implement `copyfrom`, so we instead fall back on an
alternative approach from an experimental `database/sql` branch I have,
which implements an insert many operation using a combination of Postgres
arrays and `unnest`.

We remove some `Optional` annotations on `JobInsertParams` for properties
that are always set by the client. (Necessary to make MyPy's checks pass
properly.)
@brandur brandur force-pushed the brandur-insert-many branch from 3b49483 to efb0faf Compare July 5, 2024 06:57
@brandur brandur merged commit 178161e into master Jul 5, 2024
@brandur brandur deleted the brandur-insert-many branch July 5, 2024 06:59
brandur added a commit that referenced this pull request Jul 5, 2024
Tee up version 0.3.0, whose largest feature is a full implementation of
`insert_many()` and `insert_many_tx()` [1].

[1] #22
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