Company
Date Published
Author
Priya Rajagopal, Senior Director, Product Management
Word count
2921
Language
English
Hacker News points
None

Summary

Couchbase Lite 2.0 introduces the ability to perform JOINS across JSON documents using its new Query interface, which is based on N1QL—a declarative query language extending SQL for JSON. This interface simplifies the process of creating indexes and constructing queries, making it more powerful than the previous map-views and map functions in version 1.x. The blog demonstrates various types of JOINS, including INNER, LEFT, CROSS, and chained JOINS, providing equivalent SQL statements for each example. These JOINs enable the combination of data from multiple documents, such as fetching employee details alongside department and location information, and are supported across platforms like iOS, Android, and Windows. Additionally, the post highlights the potential to use comparison operators and function expressions in JOIN expressions, showcasing the flexibility and functionality of Couchbase Lite's new querying capabilities.