rql

Scala driver for RethinkDB.

Лицензия

Лицензия

Группа

Группа

com.esyfur
Идентификатор

Идентификатор

rql
Последняя версия

Последняя версия

0.1.8
Дата

Дата

Тип

Тип

jar
Описание

Описание

rql
Scala driver for RethinkDB.
Ссылка на сайт

Ссылка на сайт

https://github.com/esycat/rql-scala
Организация-разработчик

Организация-разработчик

Persic Entertainment
Система контроля версий

Система контроля версий

https://github.com/esycat/rql-scala

Скачать rql

Имя Файла Размер
rql-0.1.8.pom
rql-0.1.8.jar 387 KB
rql-0.1.8-sources.jar 73 KB
rql-0.1.8-javadoc.jar 965 KB
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.esyfur/rql/ -->
<dependency>
    <groupId>com.esyfur</groupId>
    <artifactId>rql</artifactId>
    <version>0.1.8</version>
</dependency>
// https://jarcasting.com/artifacts/com.esyfur/rql/
implementation 'com.esyfur:rql:0.1.8'
// https://jarcasting.com/artifacts/com.esyfur/rql/
implementation ("com.esyfur:rql:0.1.8")
'com.esyfur:rql:jar:0.1.8'
<dependency org="com.esyfur" name="rql" rev="0.1.8">
  <artifact name="rql" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.esyfur', module='rql', version='0.1.8')
)
libraryDependencies += "com.esyfur" % "rql" % "0.1.8"
[com.esyfur/rql "0.1.8"]

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
joda-time : joda-time jar 2.3
com.google.protobuf : protobuf-java jar 2.5.+
org.scala-lang : scala-library jar 2.10.3
org.joda : joda-convert jar 1.3.1

test (1)

Идентификатор библиотеки Тип Версия
org.scalatest : scalatest_2.10 jar 2.0.+

Модули Проекта

Данный проект не имеет модулей.

RethinkDB Scala Driver

The driver implements only the base part of the API.

It should work for RethinkDB v1.10.

Installation

SBT

appDependencies ++= Seq(
    "com.esyfur" % "rql" % "0.1.+"
)

Gradle

dependencies {
    compile group: 'com.esyfur', name: 'rql', version: '0.1.+'
}

Maven

<dependency>
    <groupId>com.esyfur</groupId>
    <artifactId>rql</artifactId>
    <version>0.1.+</version>
</dependency>

Usage

See the Main class for usage examples. Try gradle run to execute the class.

import com.esyfur.{rql => r}

val host = "localhost"
val db   = "awesomeness"
val tbl  = "beautifulThings"

val data = Map(...)

// connect to the server, set default connection and database
val conn = r.connect(host).repl().use(db)

// create a new database and show a list of existing databases
r.dbCreate(db).run()
r.dbList.run()

// create a new table and show a list of existing tables in the database
r.db(db).tableCreate(tbl).run()
r.db(db).tableList.run()

// insert some data
r.db(db).table(tbl).insert(data).run()

// select data from the table in different ways
r.db(db).table(tbl).limit(5).run()
r.db(db).table(tbl).slice(1, 2).run()

// check whether the table is empty
r.db(db).table(tbl).isEmpty.run()
r.db(db).table(tbl).count().run()

// math expressions
r.expr(5).add(2).add(10).sub(12).mul(6).div(3).mod(3).run()

// cleanup and disconnect
r.db(db).tableDrop(tbl).run()
r.dbDrop(db).run()
conn.close()

Development

To re-download and re-compile the protobuf API:

gradle protoApiDownload protoApiCompile

To run the test suite:

gradle test

Версии библиотеки

Версия
0.1.8
0.1.6
0.1.5