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 would depend 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 selecionar: [CBLQuerySelect todos]

            de: [CBLQueryDataSource banco de dados: database]

          onde: [[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 aqui and the release notes are aqui.

Rápido

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

  • Operações CRUD
  • 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 aqui and the release notes are aqui.

.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 being:
    • 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 aqui.
    • 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 aqui to get started.

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

Autor

Postado por Sachin Smotra, diretor de gerenciamento de produtos, Couchbase

A carreira de Sachin Smotra abrange mais de 15 anos de desenvolvimento de produtos de software em vários domínios, incluindo software Java Enterprise, soluções DRM para jogos móveis e conferências na Web. Como diretor de gerenciamento de produtos da Couchbase, ele é um líder de produto prático responsável pelas linhas de produtos Couchbase Mobile, IOT e Analytics, incluindo a divulgação da estratégia e da visão do produto com clientes, parceiros, desenvolvedores e analistas. Antes de ingressar na Couchbase, Sachin foi gerente sênior de gerenciamento de produtos na Cisco WebEx, onde liderou a equipe de produtos responsável por transformar a experiência do cliente de ponta a ponta em todo o ciclo de vida do produto WebEx - consideração, compra, uso e renovação. Antes de trabalhar na Cisco, Sachin trabalhou em diferentes startups em uma série de funções nas áreas de engenharia, arquitetura, gerenciamento de produtos e alianças.

Deixar uma resposta