package sohva
Contains all the classes needed to interact with a couchdb server. Classes in this package allows the user to:
- create/delete new databases into a couchdb instance,
- create/update/delete documents into a couchdb database,
- create/update/delete designs and views,
- manage built-in security document of a given database,
- create/update/delete couchdb users,
- use couchdb authentication API to create sessions and use built-in permission system.
- Grouped
- Alphabetic
- By Inheritance
- sohva
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- final case class Attachment (content_type: String, revpos: Int, digest: String, length: Int, stub: Boolean, encoded_length: Option[Int] = None, encoding: Option[String] = None) extends Product with Serializable
-
trait
Attachments
extends AnyRef
Mix in this trait with any object to have automatic management of the attachment fields
-
case class
AuthInfo
(authentication_db: String, authentication_handlers: List[String], authenticated: Option[String]) extends Product with Serializable
Authentication information indicating the authentication database, the handler used and the authentication method
-
case class
AuthResult
(ok: Boolean, userCtx: UserCtx, info: Option[AuthInfo]) extends Product with Serializable
Result of the authentication request
- class AutoCloseabled [T <: Closeable] extends AnyRef
-
class
BasicSession
extends CouchDB with Session
An instance of a Couch session that allows the user to perform authenticated operations using HTTP basic authentication.
- sealed trait BulkOp [+T] extends AnyRef
-
class
CList
extends AnyRef
A list that can be queried for a given view.
- case class Change (seq: JsValue, id: String, changes: Vector[Rev], deleted: Boolean, doc: Option[JsObject]) extends Product with Serializable
-
class
ChangeStream
extends AnyRef
A stream that represents a connection to the
_changes
stream of a database. - case class Changes (last_seq: JsValue, pending: Int, results: Vector[Change]) extends Product with Serializable
- case class CommonJSView (libs: Map[String, JsValue]) extends ViewDoc with Product with Serializable
-
case class
Configuration
(sections: Map[String, Map[String, String]]) extends Product with Serializable
The configuration object of a couchdb instance
- class ConflictException extends CouchException
-
class
CouchClient
extends CouchDB
A CouchDB instance.
A CouchDB instance. Allows users to access the different databases and instance information. This is the key class to start with when one wants to work with couchdb. Through this one you will get access to the sessions and anonymous access to databases.
- sealed trait CouchCredentials extends AnyRef
-
abstract
class
CouchDB
extends AnyRef
A CouchDB instance.
A CouchDB instance. Allows users to access the different databases and information. This is the key class to start with when one wants to work with couchdb. Through this one you will get access to the databases.
- class CouchException extends Exception
- trait CouchFormat [T] extends RootJsonFormat[T]
- trait CouchFormatImpl extends AnyRef
- final case class CouchInfo (couchdb: String, version: String) extends Product with Serializable
- case class CouchUser (name: String, password: String, roles: List[String], oauth: Option[OAuthData] = None, type: String = "user") extends IdRev with Product with Serializable
-
class
Database
extends DocumentOps
Gives the user access to the different operations available on a database.
Gives the user access to the different operations available on a database. Among other operations this is the key class to get access to the documents of this database.
It also exposes the change handler interface, that allows people to react to change notifications. This is a low-level API, that handles raw Json objects
-
abstract
class
DbRef
extends AnyRef
A Reference to a database.
- sealed trait DbResult extends AnyRef
- final case class DbUpdate (db_name: String, seq: JsValue, type: String) extends Product with Serializable
- case class Delete (id: String, rev: String) extends BulkOp[Nothing] with Product with Serializable
-
class
Design
extends AnyRef
A design gives access to the different views.
A design gives access to the different views. Use this class to get or create new views.
- case class DesignDoc (_id: String, language: String, views: Map[String, ViewDoc], validate_doc_update: Option[String], updates: Map[String, String], filters: Map[String, String], shows: Map[String, String], lists: Map[String, String], rewrites: Seq[RewriteRule], libs: Map[String, JsValue]) extends IdRev with Product with Serializable
- final case class DocUpdate (ok: Boolean, id: String, rev: String) extends Product with Serializable
- abstract class DocumentOps extends AnyRef
-
final
case class
ErrorRawRow
(key: JsValue, error: String) extends RawRow with Product with Serializable
Warning: This is low-level API, and might break compatibility even between patch releases
- final case class ErrorResult (id: Option[String], error: String, reason: String) extends DbResult with Product with Serializable
-
trait
IdRev
extends AnyRef
Mix in this trait with any object to have more efficient automatic handling of documents (no reflective method call is performed)
- final case class InfoResult (compact_running: Boolean, db_name: String, disk_format_version: Int, disk_size: Long, doc_count: Long, doc_del_count: Long, data_size: Long, instance_start_time: String, purge_seq: Long, update_seq: JsValue, sizes: Option[Sizes], other: Option[Map[String, JsValue]]) extends Product with Serializable
- class Local extends DocumentOps
-
case class
LocalDb
(name: String) extends DbRef with Product with Serializable
A Reference to a local database identified by its name.
- final case class LoginPasswordCredentials (username: String, password: String) extends CouchCredentials with Product with Serializable
- final case class Membership (all_nodes: Vector[String], cluster_nodes: Vector[String]) extends Product with Serializable
- final case class OAuthCredentials (consumerKey: String, consumerSecret: String, token: String, secret: String) extends CouchCredentials with Product with Serializable
- case class OAuthData (consumer_keys: Map[String, String], tokens: Map[String, String]) extends Product with Serializable
-
class
OAuthSession
extends CouchDB with Session
An instance of a Couch session that allows the user to perform authenticated operations using OAuth.
- final case class OkResult (ok: Boolean, id: Option[String], rev: Option[String]) extends DbResult with Product with Serializable
-
sealed
trait
RawRow
extends AnyRef
Warning: This is low-level API, and might break compatibility even between patch releases
-
final
case class
RawViewResult
(total_rows: Long, offset: Long, rows: List[RawRow], update_seq: Option[Long]) extends Product with Serializable
Warning: This is low-level API, and might break compatibility even between patch releases
-
case class
RemoteDb
(url: URL) extends DbRef with Product with Serializable
A Reference to a remote database identified by its url.
-
case class
Replication
(_id: String, source: DbRef, target: DbRef, continuous: Option[Boolean] = None, create_target: Option[Boolean] = None, _replication_id: Option[String] = None, _replication_state: Option[String] = None, _replication_state_time: Option[String] = None, doc_ids: List[String] = Nil, user_ctx: Option[UserCtx] = None) extends IdRev with Product with Serializable
A replication document contains information about a particular replication process (continuous or not, ...)
-
class
Replicator
extends Database
A replicator database that allows people to manage replications:
A replicator database that allows people to manage replications:
- start replication
- cancel or stop replications
- list current replications
- case class Rev (rev: String) extends Product with Serializable
- final case class RevDiff (missing: Vector[String], possible_ancestors: Vector[String]) extends Product with Serializable
- case class RewriteRule (from: String, to: String, method: String, query: Map[String, String]) extends Product with Serializable
- case class Row [Key, Value, Doc](id: Option[String], key: Key, value: Value, doc: Option[Doc] = None) extends Product with Serializable
- case class Save [T](doc: T) extends BulkOp[T] with Product with Serializable
-
case class
SecurityDoc
(admins: SecurityList = EmptySecurityList, members: SecurityList = EmptySecurityList) extends Product with Serializable
A security document is a special document for couchdb.
A security document is a special document for couchdb. It has no
_id
or_rev
field. - case class SecurityList (names: List[String] = Nil, roles: List[String] = Nil) extends Product with Serializable
-
trait
Session
extends CouchDB
Methods that must be implemented by a session.
-
class
Show
extends AnyRef
A show function that can be queried.
-
sealed
trait
Since
extends AnyRef
start sequence of a change stream.
- final case class Sizes (file: Long, external: Long, active: Long) extends Product with Serializable
- case class SohvaException (msg: String, cause: Throwable = null) extends Exception with Product with Serializable
- case class SohvaJsonException (msg: String, inner: Exception) extends Exception with Product with Serializable
- trait SohvaProtocol extends DefaultJsonProtocol with MangoProtocol with CouchFormatImpl
- case class StandardView (map: String, reduce: Option[String], libs: Map[String, JsValue]) extends ViewDoc with Product with Serializable
-
final
case class
SuccessRawRow
(id: Option[String], key: JsValue, value: JsValue, doc: Option[JsObject]) extends RawRow with Product with Serializable
Warning: This is low-level API, and might break compatibility even between patch releases
-
class
Update
extends AnyRef
An update handler that can be queried.
-
final
case class
UpdateSequence
(seq: JsValue) extends Since with Product with Serializable
Start at the given update sequence.
-
case class
UserCtx
(name: Option[String], roles: List[String]) extends Product with Serializable
The user context giving his name and roles
-
case class
UserInfo
(name: String, roles: List[String]) extends Product with Serializable
A couchdb user has a name, a password and a lit of roles.
-
class
Users
extends AnyRef
The users database, exposing the interface for managing couchdb users.
-
class
View
extends AnyRef
A view can be queried to get the result.
- sealed trait ViewDoc extends AnyRef
- final case class ViewResult [Key, Value, Doc](total_rows: Int, offset: Int, rows: List[Row[Key, Value, Doc]], update_seq: Option[Int]) extends Product with Serializable
Value Members
- val COPY: HttpMethod
- val now: Now.type
- object ConflictException extends Serializable
- object CouchException extends Serializable
- object CouchFormatImpl
- object EmptySecurityList extends SecurityList
-
object
Now
extends Since with Product with Serializable
Start with changes from now on.
- object OAuth
-
object
Origin
extends Since with Product with Serializable
Start at the beginning of time.
- object SohvaProtocol extends SohvaProtocol
Inherited from AnyRef
Inherited from Any
Ungrouped
LowLevel
Low-level classes that may break compatibility even between patch and minor versions