Reader small image

You're reading from  Learning Couchbase

Product typeBook
Published inNov 2015
Publisher
ISBN-139781785288593
Edition1st Edition
Right arrow
Author (1)
Henry Potsangbam
Henry Potsangbam
author image
Henry Potsangbam

Henry Potsangbam is an experienced software developer, administrator, and architect with more than 14 years of experience in enterprise application architecture, design, and development. He's worked in various domains, such as e-commerce, retail, and energy sectors. He is an IBM certified application and solution developer, SAP Certified Netweaver EP Consultant and CIPM (project management). Always fascinated by and interested in exploring emerging technologies to solve business scenarios, Henry has been following NoSQL and Couchbase since its initial release around 2011. In his spare time, he explores, and educates professionals in big data technologies such as Hadoop (Mapr, Hortonworks, and Cloudera), enterprise integration (camel, fuse esb, and Mule), analytics with R, messaging with kafka, rabbitMQ, the OSGI framework, NoSQL (Couchbase, Cassandra, and Mongodb), enterprise architecture, and so on. During his career, he architect private cloud implementation using virtualization for one of the fortune 500 company. He also played active role in provisioning infrastructure for one of the largest cash transfer programme in the world.
Read more about Henry Potsangbam

Right arrow

Using the N1QL API


Let's understand the Java APIs to use N1QL queries in our Java application. In order to demonstrate it, let's create another Maven project with the following details:

ModelVersion: 4.0.0
GroupId: com.ht
ArtifactId: LearningCouchbaseN1QL

You need to ensure that the following dependency is included in your pom.xml project:

<dependency>
<groupId>com.couchbase.client</groupId>
<artifactId>java-client</artifactId>
<version>2.0.0</version>
</dependency>

You also need to ensure that the version you use for this module is 2.0.0. At the time of writing this book, this is the only version compatible with the N1QL Developer Preview, which we have used in this book:

package com.ht.cql.view;

import com.couchbase.client.java.Bucket;
import com.couchbase.client.java.Cluster;
import com.couchbase.client.java.CouchbaseCluster;
import com.couchbase.client.java.query.QueryResult;
import com.couchbase.client.java.query.QueryRow;

/**
 * 
 ...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Learning Couchbase
Published in: Nov 2015Publisher: ISBN-13: 9781785288593

Author (1)

author image
Henry Potsangbam

Henry Potsangbam is an experienced software developer, administrator, and architect with more than 14 years of experience in enterprise application architecture, design, and development. He's worked in various domains, such as e-commerce, retail, and energy sectors. He is an IBM certified application and solution developer, SAP Certified Netweaver EP Consultant and CIPM (project management). Always fascinated by and interested in exploring emerging technologies to solve business scenarios, Henry has been following NoSQL and Couchbase since its initial release around 2011. In his spare time, he explores, and educates professionals in big data technologies such as Hadoop (Mapr, Hortonworks, and Cloudera), enterprise integration (camel, fuse esb, and Mule), analytics with R, messaging with kafka, rabbitMQ, the OSGI framework, NoSQL (Couchbase, Cassandra, and Mongodb), enterprise architecture, and so on. During his career, he architect private cloud implementation using virtualization for one of the fortune 500 company. He also played active role in provisioning infrastructure for one of the largest cash transfer programme in the world.
Read more about Henry Potsangbam