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

SELECT VERSION() returns "version()" as column name in the SQL API #8911

Open
Rayyan98 opened this issue Nov 5, 2024 · 0 comments
Open

SELECT VERSION() returns "version()" as column name in the SQL API #8911

Rayyan98 opened this issue Nov 5, 2024 · 0 comments
Assignees
Labels
api:sql Issues related to SQL API bug Something isn't working

Comments

@Rayyan98
Copy link

Rayyan98 commented Nov 5, 2024

Description
I am seeing a problem when connecting to cube sql api using ORMs. I tried connecting to it with Knex, however, it fails to connect with knex not being able to infer the postgres version. This is happening because knex runs the select version() query and expects the returned rows to have column names / keys as version which is what happens on actual postgres. However, cube returns the version with the column name / key as version() and hence the ORM fails initialization. Images attached

To Reproduce
Make a small project and install knex and pg libraries into it. Try connecting to cube sql api and running a query. Fails with a parseVersion hint in the stack trace

Expected behavior
Should connect and run queries without problems

Screenshots
image

image

image

Minimally reproducible Cube Schema
Any schema

@igorlukanin igorlukanin changed the title SELECT VERSION() returns "version()" as coiumn name on sql api SELECT VERSION() returns "version()" as column name in the SQL API Nov 6, 2024
@igorlukanin igorlukanin added bug Something isn't working api:sql Issues related to SQL API labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:sql Issues related to SQL API bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants