Couchbase Questions: N1QL

Have a Question? Get it answered by our community

ahurt's picture
Asked 3 days 14 hours ago
Latest activity 1 day 22 hours ago

Better way to split a string?

I have a document element that looks like this ...

"ip": "123.12.11.4"

I need to be able to get each 'octet' out of that value (split it on the '.') I can get the first portion with a case statement:

case
when
substr(ws.ip, 1, 1) == '.'
...

Emilio G.'s picture
Asked 1 week 1 day ago
Latest activity 1 week 12 hours ago

N1QL Golang

Hello,
It is possible use N1QL with the Golang SDK?

P.D.: out of curiosity, when will release final version?

Thanks

Best,
Emilio

arik@peerkamp.com's picture
Asked 1 week 6 days ago
Latest activity 1 week 1 day ago

N1QL with Ruby client

Is there any documentation of using N1QL with the RUby client SDK?

If not - can anyone give a example of how to query the Couchbase server using N1QL via the Ruby client?

Thanks

neda.alipanah's picture
Asked 1 month 4 weeks ago
Latest activity 1 month 4 weeks ago

N1QL Access different indices of Array in JSON

I have a bucket of JSON documents. They are heterogenous documents with different items. Each document is an array with different objects. I need to select all objects of the array that satisfied certain criteria. I realize that you defined "OVER" keyword to iterate the collections. But I am not...

jonathonl's picture
Asked 2 months 3 days ago
Latest activity 1 month 4 weeks ago

Date Index

I know there are more date functions coming in DP3, but functions don't help as access points. Any thoughts on a specialized date index?

CREATE DATE INDEX date ON default(date)
...
jonathonl's picture
Asked 2 months 3 days ago
Latest activity 1 month 3 weeks ago

What About Grouping Indexes?

Just a though and maybe some other previewers can voice their opinions on this, but I was thinking that it might be good to allow multiple indexes to be grouped into the same design document for cluster performance considerations.

It could look something like:...

jonathonl's picture
Asked 2 months 1 week ago
Latest activity 2 months 1 week ago

IS NOT VALUED does not seem to work.

Maybe I am not understanding this correctly, but I expected IS NOT VALUED to be the same as (IS MISSING OR IS NULL). This does not seem to be the case.

SELECT * FROM gamesim-sample WHERE loggedIn IS
...
jonathonl's picture
Asked 2 months 1 week ago
Latest activity 2 months 1 week ago

Ranges not used on primary index for Meta().id

It would be highly beneficial if startKey and endKey ranges were used for document ids when a primary key exists. Currently the input ranges are null.

All of my documents follow an ID structure of {DocType}::{uuid} (e.g., User::3b49dd18-1d56-478e-8ab1-fb38e31ce7e2). So a common query...

jonathonl's picture
Asked 2 months 1 week ago
Latest activity 2 months 1 week ago

Engine crashes when prepending LIKE wildcard on index

I couldn't find a n1ql project at couchbase.com/issues, so I am posting this here.

Like expressions starting with a wildcard will crash cbq-engine when used on indexed field . My guess is that it's trying to use startKey and endKey on the view, which can only work if the wildcard is at...

jonathonl's picture
Asked 2 months 2 weeks ago
Latest activity 2 months 2 weeks ago

How does N1QL handle the stale parameter?

1. Does N1QL use "stale=ok" for queries that use created indexes?

2. Is there an issue with stale documents for buckets that have no indexes created on them? In other words, if a primary index is not created and "SELECT * FROM default" is called, is it possible for the result from the...

Pages