I am very excited to announce that the eagerly awaited N1QL Developer Preview 4 (DP4) is here now!
N1QL is the query language from Couchbase for querying rich data, at scale.
DP4 is a significant milestone in the journey of designing and developing N1QL. With DP4, N1QL is now language complete – what this means is that, all the syntax and the language elements of N1QL which are foundational for building rich data apps is now fully defined.
As a refresher, we introduced JOINs in DP3. That is a very powerful and much needed feature for application development. In DP4, we introduce subqueries which takes it to the next level in terms of being able to build all the queries you need for powering your Apps. We have also added DML (Data Manipulation) constructs like INSERT, UPDATE, DELETE, UPSERT in order to complete the language (Some of these are experimental currently – please refer to documentation).
Functions get a major facelift in DP4. There are a variety of array functions, regular expression functions, and many other functions that have been added. Rather than list them all here, I’d point you to our documentation which has a comprehensive list of them. Same goes for operators – where you’ll now find UNION, INTERSECT, and EXCEPT operators.
Our command line interface has been enhanced to allow multi-line shell input. Sounds simple, but this was a popular ask, and rightly so :)
From an interface standpoint, we have robust REST APIs to N1QL and this allows for a seamless interaction with the N1QL engine from apps or tools.
I understand this is a lot of information to be summarized in a blog. Examples and getting hands-on at your own pace, is the best way to understand this. To enable this, we have our Online Query Tutorial that you can try here. I strongly encourage you to download N1QL DP4 and give it a spin, point it to your own development instance of Couchbase Server, write queries, learn and have fun :)
As always, we are very eager to receive your feedback. Please contact us via the online forums (which is directly monitored by our engineering team), send us your feedback or ask us questions. Once again, I am very excited to deliver this product to you, and thank you for your support.
RESOURCES:
Everything about N1QL, Downloads, Docs, Tutorials: http://query.couchbase.com
Can you please tell what is better approach for retrieving records in terms of performance, N1QL or views? I am having around 100000+ documents in couchbase with views indexed on different attributes of documents.
Hello Ilam , wanted to know when he will be a version for Ubuntu ?
Hello – I\’m trying to work with loopback-couchbase-connector – it only seems to be working with N1QL DP3 with Couchbase 4 DP and I cant find a binary for CB 4 with N1QL DP3 – Could you help me find it please?