Title: Relation does not exists when name is surrounded by ` character · Issue #3800 · sqlc-dev/sqlc · GitHub
Open Graph Title: Relation does not exists when name is surrounded by ` character · Issue #3800 · sqlc-dev/sqlc
X Title: Relation does not exists when name is surrounded by ` character · Issue #3800 · sqlc-dev/sqlc
Description: Version 1.28.0 What happened? I'm using this sqlite3 command to export schema from the database: sqlite3 db/data.db '.schema authors' > ./db/schema.sql and it generates an sql schema where all table and column names are surrounded with a...
Open Graph Description: Version 1.28.0 What happened? I'm using this sqlite3 command to export schema from the database: sqlite3 db/data.db '.schema authors' > ./db/schema.sql and it generates an sql schema where all tabl...
X Description: Version 1.28.0 What happened? I'm using this sqlite3 command to export schema from the database: sqlite3 db/data.db '.schema authors' > ./db/schema.sql and it generates an sql schema...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/3800
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Relation does not exists when name is surrounded by ` character","articleBody":"### Version\n\n1.28.0\n\n### What happened?\n\nI'm using this `sqlite3` command to export schema from the database: `sqlite3 db/data.db '.schema authors' \u003e ./db/schema.sql` and it generates an sql schema where all table and column names are surrounded with a backtick character. This schema cannot be parsed by `sqlc `. Removing the backtick characters using command ```sed -i \"s/\\`//g\" db/schema.sql``` allows sqlc to generate the code.\n\n### Relevant log output\n\n```shell\n# package db\ndb/query.sql:6:1: relation \"authors\" does not exist\n```\n\n### Database schema\n\n```sql\nCREATE TABLE `authors` (\n `id` INTEGER PRIMARY KEY,\n `name` text NOT NULL,\n `bio` text\n);\n```\n\n### SQL queries\n\n```sql\n-- name: GetAuthor :one\nSELECT * FROM authors WHERE id = ? LIMIT 1;\n```\n\n### Configuration\n\n```yaml\nversion: \"2\"\nsql:\n - engine: \"sqlite\"\n queries: \"db/query.sql\"\n schema: \"db/schema.sql\"\n gen:\n go:\n package: \"db\"\n out: \"db\"\n```\n\n### Playground URL\n\nhttps://play.sqlc.dev/p/5d35e2538160c53e61fe204c3a2f05fe489687ac10a8d74304a82c2d7ec95871\n\n### What operating system are you using?\n\nLinux\n\n### What database engines are you using?\n\nSQLite\n\n### What type of code are you generating?\n\nGo","author":{"url":"https://github.com/Codebreaker101","@type":"Person","name":"Codebreaker101"},"datePublished":"2025-01-21T06:15:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/3800/sqlc/issues/3800"}
| 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:bc8eed2d-0b6b-7149-0d3d-c10fcf33dbad |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8854:3ADF04:2A6372A:3C784A0:6A510BD0 |
| html-safe-nonce | f0fc0f1fe87c769d27ca54074a77ca86000c3f3d0df71a5b0d1891bb31cc0a6d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODU0OjNBREYwNDoyQTYzNzJBOjNDNzg0QTA6NkE1MTBCRDAiLCJ2aXNpdG9yX2lkIjoiMTExOTA4MDI3MzY1NDM4NTYxNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | da75edc142bb5de9a74aa47bce06c3104f1706b753c7003ba65edba65e35b599 |
| hovercard-subject-tag | issue:2800801668 |
| 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/3800/issue_layout |
| twitter:image | https://opengraph.githubassets.com/69da097345389a56e920adb9cf269d18a20f8bf8c34c5f992b19cd42ccfce956/sqlc-dev/sqlc/issues/3800 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/69da097345389a56e920adb9cf269d18a20f8bf8c34c5f992b19cd42ccfce956/sqlc-dev/sqlc/issues/3800 |
| og:image:alt | Version 1.28.0 What happened? I'm using this sqlite3 command to export schema from the database: sqlite3 db/data.db '.schema authors' > ./db/schema.sql and it generates an sql schema where all tabl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Codebreaker101 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b076e100febaa00374cd89239f915d00dd3187f7c68b12bc2b7688181305344d |
| 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 | 2d129404fc45ea64edb1b98567c53e55b395536f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width