Search code examples
javacouchbasesql++datagrip

How datagrip gets all the documents from a couchbase bucket?


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.


Solution

  • 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