DZone
Database Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Database Zone > Couchbase Lite Developer Build 003 for Objective-C, Swift, and .NET

Couchbase Lite Developer Build 003 for Objective-C, Swift, and .NET

Couchbase recently announced that Couchbase Lite Developer Build 003 is available for download for Objective-C, Swift, and .NET. Learn about the changes here.

Sachin Smotra user avatar by
Sachin Smotra
·
Apr. 26, 17 · Database Zone · News
Like (0)
Save
Tweet
2.48K Views

Join the DZone community and get the full member experience.

Join For Free

I am very pleased that Couchbase Lite Developer Build 003 is now available for download for Objective-C, Swift, and .NET.

Database queries have changed significantly in this release. Couchbase Lite 2.0 uses semantics based on N1QL query language defined by Couchbase. This API will be familiar If you’ve used Core Data or other query APIs based on SQL (like jOOQ).

The Query API will have two styles — builder and fluent — and the implementation chosen depends on the development platform.

Objective-C

For Objective-C, we’ve implemented a builder API.

The SQL statement:

‘SELECT * FROM type=’account’ AND owner=’John’ ORDER BY dealSize’

...can be written with the builder API as follows:

CBLQuery *query =
[CBLQuery select: [CBLQuerySelect all]
            from: [CBLQueryDataSource database: database]
          where: [[CBLQueryExpression property: @”type”] equalTo: @”account”] and:
                  [CBLQueryExpression property: @”owner”] equalTo: @”Wayne”]]
         orderBy: [CBLQueryOrderBy expression: [CBLQueryExpression property: @”dealSize”]]
];

The API Specification for Objective-C is available here and the release notes are here.

Swift

We’ve implemented a fluent API with support for the following:

  • CRUD operations.
  • Document with property type accessors.
  • Subdocument API.
  • Blob data type.
  • CouchbaseLiteSwift framework for the Swift API.
  • Database and document change notification.

The API Specification for Swift is available here and the release notes are here.

.NET

The major changes in .NET are as follows:

  • We’ve added the sub-document API, which allows you to access embedded JSON objects. This is a much cleaner and safer approach with type-safe accessors and the thread safety rules.
  • Thread safety checking is optional now. When used, it will be rigorously enforced and fail quickly to indicate incorrect usage.
  • Plus, you get everything that was available in DB002 which is listed here. The key highlights are:
    • A new and simplified API to interact with Couchbase Lite. CRUD operations are available and each subsequent build will have API expansion and changes. More details are available here.
    • Blob data type support.
    • Database and document change notifications.

We are working hard on creating samples for you, but in the meanwhile, you can check out the unit tests here to get started.

The API specification is available here and the release notes are available here.

Objective C Swift (programming language) Build (game engine) API dev

Published at DZone with permission of Sachin Smotra. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Building Reactive Java Applications with Spring Framework
  • What Are Microservices?
  • Modern Application Security Requires Defense in Depth
  • PermGen and Metaspace

Comments

Database Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo