Title: Escaping natural language w/ mysql? · Issue #3091 · sqlc-dev/sqlc · GitHub
Open Graph Title: Escaping natural language w/ mysql? · Issue #3091 · sqlc-dev/sqlc
X Title: Escaping natural language w/ mysql? · Issue #3091 · sqlc-dev/sqlc
Description: Version 1.24.0 What happened? I'm trying to do a little complicated SQL and it seems that I cannot properly escape the natural language to put in a question mark. I always only get 4 params when I should be getting 5. Does anyone know ho...
Open Graph Description: Version 1.24.0 What happened? I'm trying to do a little complicated SQL and it seems that I cannot properly escape the natural language to put in a question mark. I always only get 4 params when I ...
X Description: Version 1.24.0 What happened? I'm trying to do a little complicated SQL and it seems that I cannot properly escape the natural language to put in a question mark. I always only get 4 params whe...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/3091
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Escaping natural language w/ mysql?","articleBody":"### Version\r\n\r\n1.24.0\r\n\r\n### What happened?\r\n\r\nI'm trying to do a little complicated SQL and it seems that I cannot properly escape the natural language to put in a question mark. I always only get 4 params when I should be getting 5. Does anyone know how I could escape the first so I can also have a natural language search param?\r\n\r\n### Relevant log output\r\n\r\n_No response_\r\n\r\n### Database schema\r\n\r\n```sql\r\nCREATE TABLE Profile (\r\n id SERIAL PRIMARY KEY AUTO_INCREMENT UNIQUE,\r\n profileOwner VARCHAR(36) NOT NULL,\r\n name VARCHAR(512) NOT NULL,\r\n subHead VARCHAR(512) NOT NULL,\r\n body TEXT,\r\n locationLat FLOAT,\r\n locationLon FLOAT,\r\n createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,\r\n updatedAt TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,\r\n FOREIGN KEY (profileOwner) REFERENCES User(id) ON DELETE CASCADE,\r\n FULLTEXT (name, body, subHead)\r\n);\r\n```\r\n\r\n### SQL queries\r\n\r\n```sql\r\nSELECT * FROM\r\n Profile\r\nWHERE\r\n MATCH (subHead, body, name) \r\n AGAINST (? IN NATURAL LANGUAGE MODE)\r\n AND locationLat BETWEEN ? AND ?\r\n AND locationLon BETWEEN ? AND ?;\r\n```\r\n\r\n\r\n### Configuration\r\n\r\n_No response_\r\n\r\n### Playground URL\r\n\r\nhttps://play.sqlc.dev/p/69a6c4d31598994f1c63df14d1af302ab36de123d066552e2463b79653580d50\r\n\r\n### What operating system are you using?\r\n\r\nmacOS\r\n\r\n### What database engines are you using?\r\n\r\nMySQL\r\n\r\n### What type of code are you generating?\r\n\r\nGo","author":{"url":"https://github.com/JakeTrock","@type":"Person","name":"JakeTrock"},"datePublished":"2023-12-31T05:59:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/3091/sqlc/issues/3091"}
| 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:fb300085-379c-5e20-076b-8f6ac046bde5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9DF4:FB8AB:3C2622:525581:6A51442C |
| html-safe-nonce | 6f62600fb5d71731f6f05a45c1de0f21a9754625c561a5332d218501f6f65ac2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5REY0OkZCOEFCOjNDMjYyMjo1MjU1ODE6NkE1MTQ0MkMiLCJ2aXNpdG9yX2lkIjoiNDgwMjA5NzM5MDkxNDk3ODg2MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6c28451d00e9f3f5bc461d6265a67e4def86f0a8b06a7219352add73c4769921 |
| hovercard-subject-tag | issue:2060952530 |
| 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/3091/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ca8df21dd18ac391044b98d4035cc5b3bc4fce11e05cd50b731ebd842899f474/sqlc-dev/sqlc/issues/3091 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ca8df21dd18ac391044b98d4035cc5b3bc4fce11e05cd50b731ebd842899f474/sqlc-dev/sqlc/issues/3091 |
| og:image:alt | Version 1.24.0 What happened? I'm trying to do a little complicated SQL and it seems that I cannot properly escape the natural language to put in a question mark. I always only get 4 params when I ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JakeTrock |
| hostname | github.com |
| expected-hostname | github.com |
| None | e840f405b2718e8f2d55aafa9ff27dbce17e29d0c253011d05ea0fea3c78baff |
| turbo-cache-control | no-preview |
| go-import | github.com/sqlc-dev/sqlc git https://github.com/sqlc-dev/sqlc.git |
| octolytics-dimension-user_id | 136738596 |
| octolytics-dimension-user_login | sqlc-dev |
| octolytics-dimension-repository_id | 193160679 |
| octolytics-dimension-repository_nwo | sqlc-dev/sqlc |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 193160679 |
| octolytics-dimension-repository_network_root_nwo | sqlc-dev/sqlc |
| 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 | b78565f6aa43cc5323c9935ec11b22cca7bb0a62 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width