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 a backquote on the bucket's name in the n1ql request #13

Open
fijemax opened this issue Apr 12, 2018 · 2 comments
Open

Add a backquote on the bucket's name in the n1ql request #13

fijemax opened this issue Apr 12, 2018 · 2 comments

Comments

@fijemax
Copy link
Contributor

fijemax commented Apr 12, 2018

My bucket is named "foo-prod", the n1ql query need backquote around the bucket due to the "-" caractere.
When I forget the backquote libcouchbase raise the following error :

Libcouchbase::Error::HttpError: 
	from libcouchbase (1.2.8) lib/libcouchbase/results_native.rb:45:in `stream'

Is it possible to automaticly insert backquote into the "from" sql statement ?

@stakach
Copy link
Member

stakach commented Apr 14, 2018

Can you give me an example of some code that doesn't work without escaping?
Or is it at the connection level where the bucket name needs escaping?

@fijemax
Copy link
Contributor Author

fijemax commented Apr 16, 2018

Here is my code :
query.select('*').from('`fleet-prod`').where('type == "mission" AND mission_type == "' + mission_type + '"')

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

2 participants