1

Running GET KEYS FROM BucketName query on datagrip results with all the keys from the bucket.

However, when querying the same query within the couchbase ui or java sdk results with syntax error - at KEYS. How does datagrip be able to get all the documents in the bucket without indexing.

ihsancemil
  • 432
  • 5
  • 16

2 Answers2

4

Basically our JDBC driver detects GET KEYS FROM BucketName queries and execute them using RawManagerRequest from Couchbase Java SDK. So you cannot run this query in couchbase ui

Here is how we do it: https://github.com/DataGrip/couchbase-jdbc-driver/blob/dev/driver/src/main/java/com/intellij/executor/GetBucketKeysExecutor.java

0
create primary index on bucketname;
SELECT RAW META(b).id FROM bucketname AS b;
vsr
  • 7,149
  • 1
  • 11
  • 10