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

ERROR: syntax error at or near "." #22

Closed
idhard opened this issue Oct 23, 2019 · 6 comments
Closed

ERROR: syntax error at or near "." #22

idhard opened this issue Oct 23, 2019 · 6 comments

Comments

@idhard
Copy link

idhard commented Oct 23, 2019

Hello , thanks for the driver ;)

i'm facing a parsing error when trying to query to aurora postgresql serverless :

ERROR: syntax error at or near "."

the query is :

SELECT DISTINCT `distinctAlias`.`User_id` as "ids_User_id" FROM (SELECT `User`.`id` AS `User_id`, `User`.`email` AS `User_email`....

if i replace "`" by " " " seems to execute correctly, in my test, but not sure how to make it work generally , any help would be welcome

thanks

@idhard
Copy link
Author

idhard commented Oct 23, 2019

if i run the same code with postgres driver instead of data-api the queries are formatted like this :

SELECT DISTINCT "distinctAlias"."User_id" as "ids_User_id" FROM (SELECT "User"."id" AS "User_id", "User"."email" AS...

@ArsenyYankovsky
Copy link
Owner

Hello, I haven't really tested the driver against postgres because the use case I started it for was for MySQL. So, currently the postgres is not supported.

It's a bit of work to make it work for postgres and requires changes in the TypeORM project itself. I can't promise any timeframe, but I will take a look at it.

@idhard
Copy link
Author

idhard commented Oct 29, 2019

hey , yes i reached same conclusion the driver only works for mysql, i have been playing around with it and at least managed to successfully connect to my db although when doing queries the format is incorrect.
Let me know if i can help you somehow

@mpvosseller
Copy link

I ran into the same issue. In my case I got the below error. Adding support for postgres would be great.

query: SELECT DATABASE() AS `db_name`
TypeORM connection error:  BadRequestException: ERROR: syntax error at or near "`"

@rudieros
Copy link

Getting the same as @mpvosseller
+1 for postgres support

@ArsenyYankovsky
Copy link
Owner

I'm going to track the Postgres work here

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

4 participants