Title: support copyfrom · Issue #63 · sqlc-dev/sqlc-gen-python · GitHub
Open Graph Title: support copyfrom · Issue #63 · sqlc-dev/sqlc-gen-python
X Title: support copyfrom · Issue #63 · sqlc-dev/sqlc-gen-python
Description: To insert mutliple values at once there is the sqlc copyfrom, but it it is unsupported in sqlc-gen-python But it should be quite easy to implement using an executemany statement: https://stackoverflow.com/questions/13020908/sql-multiple-...
Open Graph Description: To insert mutliple values at once there is the sqlc copyfrom, but it it is unsupported in sqlc-gen-python But it should be quite easy to implement using an executemany statement: https://stackoverf...
X Description: To insert mutliple values at once there is the sqlc copyfrom, but it it is unsupported in sqlc-gen-python But it should be quite easy to implement using an executemany statement: https://stackoverf...
Opengraph URL: https://github.com/sqlc-dev/sqlc-gen-python/issues/63
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"support copyfrom","articleBody":"To insert mutliple values at once there is the sqlc [copyfrom](https://docs.sqlc.dev/en/stable/howto/insert.html#using-copyfrom), but it it is unsupported in sqlc-gen-python\r\n\r\n\r\nBut it should be quite easy to implement using an `executemany` statement:\r\nhttps://stackoverflow.com/questions/13020908/sql-multiple-inserts-with-python\r\n\r\n```python\r\nrows = []\r\n\r\nfor row in range(sheet.nrows):\r\n \"\"\"name is in the 0th col. email is the 4th col.\"\"\"\r\n name = sheet.cell(row, 0).value \r\n email = sheet.cell(row, 4).value\r\n rows.append((name, email))\r\n\r\ndb = MySQLdb.connect(host=host, user=user, db=dbname, passwd=pwd)\r\ncursor = db.cursor()\r\ncursor.executemany(\"\"\"INSERT INTO mailing_list (name,email) VALUES (%s,%s)\"\"\", rows)\r\n```","author":{"url":"https://github.com/borissmidt","@type":"Person","name":"borissmidt"},"datePublished":"2024-11-21T11:58:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/63/sqlc-gen-python/issues/63"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c5c6b794-b4a7-3264-2855-c846f6b94e32 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C594:1E73E4:B1D224:F96AC4:696E6703 |
| html-safe-nonce | 9fc07ad3255cde7600c12eec5435d92c941ea32ffb65571b800aca7f647c8121 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTk0OjFFNzNFNDpCMUQyMjQ6Rjk2QUM0OjY5NkU2NzAzIiwidmlzaXRvcl9pZCI6IjYyMDA3NTY2MDAzOTg4MzM0MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6f396cdee0dc266d8dc8335c47727d30fe0e2ee55374ab67a3bc3ce41dae38ce |
| hovercard-subject-tag | issue:2679223961 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sqlc-dev/sqlc-gen-python/63/issue_layout |
| twitter:image | https://opengraph.githubassets.com/92f7ffa13ffbe1c57bf31234e6aa76226a5773b9baad2ba09185344e7cc942ef/sqlc-dev/sqlc-gen-python/issues/63 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/92f7ffa13ffbe1c57bf31234e6aa76226a5773b9baad2ba09185344e7cc942ef/sqlc-dev/sqlc-gen-python/issues/63 |
| og:image:alt | To insert mutliple values at once there is the sqlc copyfrom, but it it is unsupported in sqlc-gen-python But it should be quite easy to implement using an executemany statement: https://stackoverf... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | borissmidt |
| hostname | github.com |
| expected-hostname | github.com |
| None | 99a4a74f92e7618f6e15b4dbb9f4470c8d31701a90d89c21ff31970528b7f0c3 |
| turbo-cache-control | no-preview |
| go-import | github.com/sqlc-dev/sqlc-gen-python git https://github.com/sqlc-dev/sqlc-gen-python.git |
| octolytics-dimension-user_id | 136738596 |
| octolytics-dimension-user_login | sqlc-dev |
| octolytics-dimension-repository_id | 548530161 |
| octolytics-dimension-repository_nwo | sqlc-dev/sqlc-gen-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 548530161 |
| octolytics-dimension-repository_network_root_nwo | sqlc-dev/sqlc-gen-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ef0d97829e997c64864f25a29b00067f5dc3a4c4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width