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: github.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:701f2c15-82c9-c308-3c98-1433479ec5fa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C6D2:3EF6AE:E6BC2C:144E7FB:696FC014 |
| html-safe-nonce | c9a2dff8695ffb8627a56b35de8a85728a7967614fb94734ba7abe8fc4acb805 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNkQyOjNFRjZBRTpFNkJDMkM6MTQ0RTdGQjo2OTZGQzAxNCIsInZpc2l0b3JfaWQiOiIzODQ5Mjk0ODQ1MTU4ODY2OTY0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4caa65ce3017a1a7869faa8fee87067c4092d6ba5091262f295c3f20efe30e7e |
| 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 | 40ce4030a7db32193be29054756ed7f7eceec3a82973f060300035bdff8cf777 |
| 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 | 1cdcabe0d7ddc4be91a713d57280849e4c89f5cd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width