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

Summary

The Xcode Playground is an interactive environment that allows developers to write and execute Swift code immediately, making it a convenient way to explore the new querying API in Couchbase Mobile 2.0. The query API is designed using the Fluent API Design Pattern and uses method cascading to read, making it intuitive and easy to understand. Developers can use the Playground to test queries against pre-built databases without having to create a full-blown App project. The Playground pages provide a set of Query examples that exercise the query API, and developers can update these queries to explore other querying options. To use the Playground, developers must first build the CouchbaseLiteSwift framework by building the containing CBLTestBed.xcodeproj project. Once built, the developer can execute a playground and examine the results inline. The Playground is compatible with Swift 3.1+ and requires Xcode 8.3.3+.