Skip to content
This repository was archived by the owner on Nov 20, 2023. It is now read-only.
This repository was archived by the owner on Nov 20, 2023. It is now read-only.

MySQL Problem #7

Open
Open

Description

@dizlexik

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.

Activity

  1. rednaxus commented on Nov 17, 2011

    @rednaxus

    yes, i get this too, would be nice to fix this

  2. granthusbands commented on Feb 5, 2013

    @granthusbands

    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.

  3. carlwoodward commented on Sep 22, 2014

    @carlwoodward
    Collaborator

    Not maintaining any more.

  4. granthusbands commented on Nov 4, 2014

    @granthusbands

    @yang This issue needs reopening and fixing. It's a serious flaw, both for security and compatibility.

  5. reopened this on Nov 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions