Skip to content

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

Open
@Rayyan98

Description

@Rayyan98

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

Metadata

Metadata

Assignees

Labels

api:sqlIssues related to SQL API

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions