Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use member of replace where in get syntax error #2030

Closed
silver-brother opened this issue Jan 24, 2023 · 2 comments
Closed

use member of replace where in get syntax error #2030

silver-brother opened this issue Jan 24, 2023 · 2 comments
Labels
bug Something isn't working triage New issues that hasn't been reviewed

Comments

@silver-brother
Copy link

Version

1.16.0

What happened?

In mysql, I want to use member of syntax instead of where in syntax, but I encounter a compile error

Relevant log output

syntax error near "member of (?);"

Database schema

CREATE TABLE `song` (
  `id` varchar(64) NOT NULL DEFAULT '',
  `create_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
  `update_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3) COMMENT '修改时间',
  `name` varchar(256) NOT NULL DEFAULT '' COMMENT ' 歌曲名称 。 ',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

SQL queries

-- name: ListSongByIDS :many
SELECT *
FROM song
where id member of (?);

Configuration

version: "2"
sql:
  - schema: "./schema"
    queries: "./queries"
    engine: "mysql"
    gen:
      go:
        package: "model"
        out: "model"

Playground URL

https://play.sqlc.dev/p/8f37ba937f2e300b40fca209d3aaa88abe441855fb8c3fd52dd0d6b5df25196a

What operating system are you using?

macOS

What database engines are you using?

MySQL

What type of code are you generating?

Go

@silver-brother silver-brother added bug Something isn't working triage New issues that hasn't been reviewed labels Jan 24, 2023
@bas-ie
Copy link

bas-ie commented Feb 3, 2023

I think this is not currently supported. Note #695.

@kyleconroy
Copy link
Collaborator

@richchurcher is correct, this is currently not supported. Hopefully sometime in the future!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage New issues that hasn't been reviewed
Projects
None yet
Development

No branches or pull requests

3 participants