ICouch v0.6.2 ICouch.DB View Source
Holds information about CouchDB databases.
Link to this section Summary
Functions
Internal function that checks if a database exists.
Initialize a DB struct.
Invokes an arbitrary CouchDB API call on a database which may or may not be implementation specific.
Invokes an arbitrary CouchDB API call on a database which may or may not be implementation specific.
Internal function to build a server endpoint.
Link to this section Types
Link to this section Functions
Link to this function
exists(db)
View Sourceexists(db :: t()) :: {:ok, t()} | {:error, ICouch.RequestError.well_known_error() | term()}
Internal function that checks if a database exists.
Link to this function
new(server, name)
View Sourcenew(server :: ICouch.Server.t(), name :: String.t()) :: t()
Initialize a DB struct.
Link to this function
send_raw_req(db, endpoint, method \\ :get, body \\ nil, headers \\ [], ib_options \\ [])
View Sourcesend_raw_req( db :: t(), endpoint :: ICouch.Server.endpoint(), method :: ICouch.Server.method(), body :: term(), headers :: [{binary(), binary()}], ib_options :: Keyword.t() ) :: {:ok, {response_headers :: [{binary(), binary()}], body :: binary()}} | {:ibrowse_req_id, id :: term()} | {:error, ICouch.RequestError.well_known_error() | term()}
Invokes an arbitrary CouchDB API call on a database which may or may not be implementation specific.
Link to this function
send_req(db, endpoint, method \\ :get, body_term \\ nil)
View Sourcesend_req( db :: t(), endpoint :: ICouch.Server.endpoint(), method :: ICouch.Server.method(), body_term :: term() ) :: {:ok, body :: term()} | {:error, ICouch.RequestError.well_known_error() | term()}
Invokes an arbitrary CouchDB API call on a database which may or may not be implementation specific.
Link to this function
server_endpoint(db, endpoint)
View Sourceserver_endpoint(db :: t(), endpoint :: ICouch.Server.endpoint()) :: URI.t()
Internal function to build a server endpoint.
Basically prepends the database name to the given URL path segment.