dependencies - How to execute n1ql query of Couchbase in scala? -


i want execute nickel query in project , want convert task doing using view perform nickel. possible..??

if yes please provide example , executing nickel queries in scala,and have add additional dependencies in project. if yes please provide link too.

any suggestions appreciated

we planning/working on scala driver, right can use java sdk through scala pretty easily. recommend follow official docs, convert java examples scala: http://docs.couchbase.com/developer/java-2.1/java-intro.html

you want java-client dependency first:

librarydependencies := "com.couchbase.client" % "java-client" % "2.1.4" 

if use implict conversions, can make life little easier too:

import com.couchbase.client.java.couchbasecluster import com.couchbase.client.java.query.query import scala.collection.javaconversions._  object connectandquery {    def main(args: array[string]): unit = {     val cluster = couchbasecluster.create()     val bucket = cluster.openbucket("travel-sample")      val result = bucket.query(query.simple("select * `travel-sample`limit 10"))     result.allrows().map(_.value()).foreach(println)      cluster.disconnect()   }  } 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -