You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 20, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 20, 2023. It is now read-only.
I'm creating a simple select statement with rel and trying to execute it on MySQL but I can't seem to get it to work.
It seems to have to do with rel's use of double quotes everywhere.
My simple rel code is mytable.project(rel.star()).where(mytable.column('name').eq('test')).toSql() and I get a SQL statement of SELECT * FROM "mytable" WHERE "mytable"."name" = "test"
MySQL gives me an error of Unknown column 'test' in 'where clause'
Is there anything I can do to resolve this? I've tried setting the sql_mode in MySQL to just about every possible mode but nothing works.
The problem is in the last line of @quote (currently line 179) of lib/visitors/to-sql.coffee, in that it uses the wrong kind of quote. Even worse, it doesn't do sufficient escaping of quotes in the value, which is a security nightmare.
Activity
rednaxus commentedon Nov 17, 2011
yes, i get this too, would be nice to fix this
granthusbands commentedon Feb 5, 2013
The problem is in the last line of @quote (currently line 179) of lib/visitors/to-sql.coffee, in that it uses the wrong kind of quote. Even worse, it doesn't do sufficient escaping of quotes in the value, which is a security nightmare.
carlwoodward commentedon Sep 22, 2014
Not maintaining any more.
granthusbands commentedon Nov 4, 2014
@yang This issue needs reopening and fixing. It's a serious flaw, both for security and compatibility.