Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

a method that escapes a "table.column" string #582

Closed
sdepold opened this Issue · 1 comment

2 participants

Sascha Depold Jeremy Evans
Sascha Depold

Hi :)

is there an internal method I could use in my plugin, that would convert a string "table.column" into the respective dialects escaped equivalent? So that i would get "table.column" for mysql and whatever syntax postgres and co has for those dialects?

greetings
@sdepold

Jeremy Evans
Owner

No. That requires parsing SQL, which is something that Sequel never does. The general Sequel way to represent qualified identifiers is :table__column.

You could probably do the following: Sequel.qualify(*str.split('.', 2)), which returns an object that Sequel will literalize correctly.

Jeremy Evans jeremyevans closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.