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

Add Raw SQL escape hatch #212

Open
k0001 opened this issue Sep 20, 2016 · 8 comments
Open

Add Raw SQL escape hatch #212

k0001 opened this issue Sep 20, 2016 · 8 comments

Comments

@k0001
Copy link
Contributor

k0001 commented Sep 20, 2016

As much as I don't like having to reach out to unsafe escape hatches, at times it is just necessary to be able to write raw SQL given that Opaleye doesn't support 100% of PostgreSQL. Of course, we should be adding safe support for as many features as possible, but not being able to write raw SQL as a temporal workaround while Opaleye adds support for any missing feature can certainly be a deal-breaker.

I propose adding this as an internal function:

unsafeRawSqlQuery :: String -> Query a

Without this escape hatch, it is many times hard to recommend Opaleye for a large project.

Some issues that can benefit or could have benefited from this: #211 #175 #164 #139 #134 and many others.

@tomjaguarpaw
Copy link
Owner

A very good idea!

@DiegoNolan
Copy link

Any work on this? I want to want to use the @@ operator for text search. Doesn't appear it is supported.

@tomjaguarpaw
Copy link
Owner

The escape hatch has not been implemented. It's probably much easier to add the @@ than add the escape hatch at this point.

@centromere
Copy link
Contributor

Any work on this? I want to use the UPSERT feature as described in #139.

@tomjaguarpaw
Copy link
Owner

Same answer as for UPSERT. No one's done the work yet.

@DanBurton
Copy link

Bump. Just want to express continued interest in this feature request.

@tomjaguarpaw
Copy link
Owner

@DanBurton Are you interested in this issue per se, or just in order to achieve #134?

@DanBurton
Copy link

@tomjaguarpaw mainly interested in #134 at the moment, but this issue still seems like a good idea.

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

5 participants