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

List Parameter for Query #39

Open
maennchen opened this issue Nov 14, 2023 · 2 comments
Open

List Parameter for Query #39

maennchen opened this issue Nov 14, 2023 · 2 comments

Comments

@maennchen
Copy link

maennchen commented Nov 14, 2023

The following code is not currently supported:

Adbc.Connection.query(
  connection_pid,
  """
  SELECT *
  FROM posts
  WHERE id = ANY(?1::INT[])
  """,
  [[1, 2]]
)

=>

{:error, %ArgumentError{message: "type not supported yet."}
@maennchen maennchen changed the title List Parameter in Query List Parameter for Query Nov 14, 2023
@josevalim
Copy link
Member

Yes, we don't support list types yet. PRs are welcome. :)

@maennchen
Copy link
Author

I tried to take a quick stab at it, but have some issues:

  • SQLite does not really support arrays except in JSON. I therefore wanted to try with Postgres
  • Postgres array responses are not working: Postgres List Response #40
  • Adbc seems not to support parameters with Postgres select at all

https://arrow.apache.org/adbc/0.5.1/python/recipe/postgresql.html#execute-a-statement-with-bind-parameters

Right now, the PostgreSQL driver only supports bind parameters for queries that don’t generate result sets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants