Skip to content

Commit

Permalink
bump to 1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitc committed Oct 11, 2023
1 parent 5bf772d commit 469f3b1
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 27 deletions.
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
couchbeam NEWS
--------------

version 1.5.0 / 2023-10-11
--------------------------

- use hackney 2.20
- fix compatibility with couchdb 3
- fix compatibility with Erlang >= 23

version 1.4.1 / 2016-09-26
--------------------------

Expand Down
29 changes: 26 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@


# Couchbeam - simple Barrel and Apache CouchDB client library for Erlang applications #
# Couchbeam - simple Apache CouchDB client library for Erlang applications #

Copyright (c) 2009-2016 Benoît Chesneau.
Copyright (c) 2009-2023 Benoît Chesneau.

__Version:__ 1.4.2
__Version:__ 1.5.0

# couchbeam

Expand Down Expand Up @@ -399,3 +399,26 @@ in the `couchbeam:server_connection/2` documentation.

For issues, comments or feedback please [create an
issue](http://github.com/benoitc/couchbeam/issues).


## Modules ##


<table width="100%" border="0" summary="list of modules">
<tr><td><a href="http://github.com/benoitc/couchbeam/blob/master/doc/couchbeam.md" class="module">couchbeam</a></td></tr>
<tr><td><a href="http://github.com/benoitc/couchbeam/blob/master/doc/couchbeam_app.md" class="module">couchbeam_app</a></td></tr>
<tr><td><a href="http://github.com/benoitc/couchbeam/blob/master/doc/couchbeam_attachments.md" class="module">couchbeam_attachments</a></td></tr>
<tr><td><a href="http://github.com/benoitc/couchbeam/blob/master/doc/couchbeam_changes.md" class="module">couchbeam_changes</a></td></tr>
<tr><td><a href="http://github.com/benoitc/couchbeam/blob/master/doc/couchbeam_changes_stream.md" class="module">couchbeam_changes_stream</a></td></tr>
<tr><td><a href="http://github.com/benoitc/couchbeam/blob/master/doc/couchbeam_changes_sup.md" class="module">couchbeam_changes_sup</a></td></tr>
<tr><td><a href="http://github.com/benoitc/couchbeam/blob/master/doc/couchbeam_doc.md" class="module">couchbeam_doc</a></td></tr>
<tr><td><a href="http://github.com/benoitc/couchbeam/blob/master/doc/couchbeam_ejson.md" class="module">couchbeam_ejson</a></td></tr>
<tr><td><a href="http://github.com/benoitc/couchbeam/blob/master/doc/couchbeam_httpc.md" class="module">couchbeam_httpc</a></td></tr>
<tr><td><a href="http://github.com/benoitc/couchbeam/blob/master/doc/couchbeam_sup.md" class="module">couchbeam_sup</a></td></tr>
<tr><td><a href="http://github.com/benoitc/couchbeam/blob/master/doc/couchbeam_util.md" class="module">couchbeam_util</a></td></tr>
<tr><td><a href="http://github.com/benoitc/couchbeam/blob/master/doc/couchbeam_uuids.md" class="module">couchbeam_uuids</a></td></tr>
<tr><td><a href="http://github.com/benoitc/couchbeam/blob/master/doc/couchbeam_view.md" class="module">couchbeam_view</a></td></tr>
<tr><td><a href="http://github.com/benoitc/couchbeam/blob/master/doc/couchbeam_view_stream.md" class="module">couchbeam_view_stream</a></td></tr>
<tr><td><a href="http://github.com/benoitc/couchbeam/blob/master/doc/couchbeam_view_sup.md" class="module">couchbeam_view_sup</a></td></tr>
<tr><td><a href="http://github.com/benoitc/couchbeam/blob/master/doc/gen_changes.md" class="module">gen_changes</a></td></tr></table>

29 changes: 26 additions & 3 deletions doc/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@


# Couchbeam - simple Barrel and Apache CouchDB client library for Erlang applications #
# Couchbeam - simple Apache CouchDB client library for Erlang applications #

Copyright (c) 2009-2016 Benoît Chesneau.
Copyright (c) 2009-2023 Benoît Chesneau.

__Version:__ 1.4.2
__Version:__ 1.5.0

# couchbeam

Expand Down Expand Up @@ -399,3 +399,26 @@ in the `couchbeam:server_connection/2` documentation.

For issues, comments or feedback please [create an
issue](http://github.com/benoitc/couchbeam/issues).


## Modules ##


<table width="100%" border="0" summary="list of modules">
<tr><td><a href="couchbeam.md" class="module">couchbeam</a></td></tr>
<tr><td><a href="couchbeam_app.md" class="module">couchbeam_app</a></td></tr>
<tr><td><a href="couchbeam_attachments.md" class="module">couchbeam_attachments</a></td></tr>
<tr><td><a href="couchbeam_changes.md" class="module">couchbeam_changes</a></td></tr>
<tr><td><a href="couchbeam_changes_stream.md" class="module">couchbeam_changes_stream</a></td></tr>
<tr><td><a href="couchbeam_changes_sup.md" class="module">couchbeam_changes_sup</a></td></tr>
<tr><td><a href="couchbeam_doc.md" class="module">couchbeam_doc</a></td></tr>
<tr><td><a href="couchbeam_ejson.md" class="module">couchbeam_ejson</a></td></tr>
<tr><td><a href="couchbeam_httpc.md" class="module">couchbeam_httpc</a></td></tr>
<tr><td><a href="couchbeam_sup.md" class="module">couchbeam_sup</a></td></tr>
<tr><td><a href="couchbeam_util.md" class="module">couchbeam_util</a></td></tr>
<tr><td><a href="couchbeam_uuids.md" class="module">couchbeam_uuids</a></td></tr>
<tr><td><a href="couchbeam_view.md" class="module">couchbeam_view</a></td></tr>
<tr><td><a href="couchbeam_view_stream.md" class="module">couchbeam_view_stream</a></td></tr>
<tr><td><a href="couchbeam_view_sup.md" class="module">couchbeam_view_sup</a></td></tr>
<tr><td><a href="gen_changes.md" class="module">gen_changes</a></td></tr></table>

8 changes: 7 additions & 1 deletion doc/couchbeam_util.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@
## Function Index ##


<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#dbname-1">dbname/1</a></td><td></td></tr><tr><td valign="top"><a href="#deprecated-3">deprecated/3</a></td><td></td></tr><tr><td valign="top"><a href="#encode_att_name-1">encode_att_name/1</a></td><td></td></tr><tr><td valign="top"><a href="#encode_docid-1">encode_docid/1</a></td><td></td></tr><tr><td valign="top"><a href="#encode_docid1-1">encode_docid1/1</a></td><td></td></tr><tr><td valign="top"><a href="#encode_docid_noop-1">encode_docid_noop/1</a></td><td></td></tr><tr><td valign="top"><a href="#encode_query-1">encode_query/1</a></td><td>Encode needed value of Query proplists in json.</td></tr><tr><td valign="top"><a href="#encode_query_value-2">encode_query_value/2</a></td><td>Encode value in JSON if needed depending on the key.</td></tr><tr><td valign="top"><a href="#force_param-3">force_param/3</a></td><td>replace a value in a proplist.</td></tr><tr><td valign="top"><a href="#get_app_env-2">get_app_env/2</a></td><td></td></tr><tr><td valign="top"><a href="#get_value-2">get_value/2</a></td><td>emulate proplists:get_value/2,3 but use faster lists:keyfind/3.</td></tr><tr><td valign="top"><a href="#get_value-3">get_value/3</a></td><td></td></tr><tr><td valign="top"><a href="#oauth_header-3">oauth_header/3</a></td><td></td></tr><tr><td valign="top"><a href="#parse_options-1">parse_options/1</a></td><td>make view options a list.</td></tr><tr><td valign="top"><a href="#parse_options-2">parse_options/2</a></td><td></td></tr><tr><td valign="top"><a href="#propmerge-3">propmerge/3</a></td><td>merge 2 proplists.</td></tr><tr><td valign="top"><a href="#propmerge1-2">propmerge1/2</a></td><td>Update a proplist with values of the second.</td></tr><tr><td valign="top"><a href="#proxy_header-3">proxy_header/3</a></td><td></td></tr><tr><td valign="top"><a href="#proxy_token-2">proxy_token/2</a></td><td></td></tr><tr><td valign="top"><a href="#shutdown_sync-1">shutdown_sync/1</a></td><td></td></tr><tr><td valign="top"><a href="#start_app_deps-1">start_app_deps/1</a></td><td>Start depedent applications of App.</td></tr><tr><td valign="top"><a href="#to_atom-1">to_atom/1</a></td><td></td></tr><tr><td valign="top"><a href="#to_binary-1">to_binary/1</a></td><td></td></tr><tr><td valign="top"><a href="#to_integer-1">to_integer/1</a></td><td></td></tr><tr><td valign="top"><a href="#to_list-1">to_list/1</a></td><td></td></tr></table>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#binary_env-2">binary_env/2</a></td><td></td></tr><tr><td valign="top"><a href="#dbname-1">dbname/1</a></td><td></td></tr><tr><td valign="top"><a href="#deprecated-3">deprecated/3</a></td><td></td></tr><tr><td valign="top"><a href="#encode_att_name-1">encode_att_name/1</a></td><td></td></tr><tr><td valign="top"><a href="#encode_docid-1">encode_docid/1</a></td><td></td></tr><tr><td valign="top"><a href="#encode_docid1-1">encode_docid1/1</a></td><td></td></tr><tr><td valign="top"><a href="#encode_docid_noop-1">encode_docid_noop/1</a></td><td></td></tr><tr><td valign="top"><a href="#encode_query-1">encode_query/1</a></td><td>Encode needed value of Query proplists in json.</td></tr><tr><td valign="top"><a href="#encode_query_value-2">encode_query_value/2</a></td><td>Encode value in JSON if needed depending on the key.</td></tr><tr><td valign="top"><a href="#force_param-3">force_param/3</a></td><td>replace a value in a proplist.</td></tr><tr><td valign="top"><a href="#get_app_env-2">get_app_env/2</a></td><td></td></tr><tr><td valign="top"><a href="#get_value-2">get_value/2</a></td><td>emulate proplists:get_value/2,3 but use faster lists:keyfind/3.</td></tr><tr><td valign="top"><a href="#get_value-3">get_value/3</a></td><td></td></tr><tr><td valign="top"><a href="#oauth_header-3">oauth_header/3</a></td><td></td></tr><tr><td valign="top"><a href="#parse_options-1">parse_options/1</a></td><td>make view options a list.</td></tr><tr><td valign="top"><a href="#parse_options-2">parse_options/2</a></td><td></td></tr><tr><td valign="top"><a href="#propmerge-3">propmerge/3</a></td><td>merge 2 proplists.</td></tr><tr><td valign="top"><a href="#propmerge1-2">propmerge1/2</a></td><td>Update a proplist with values of the second.</td></tr><tr><td valign="top"><a href="#proxy_header-3">proxy_header/3</a></td><td></td></tr><tr><td valign="top"><a href="#proxy_token-2">proxy_token/2</a></td><td></td></tr><tr><td valign="top"><a href="#shutdown_sync-1">shutdown_sync/1</a></td><td></td></tr><tr><td valign="top"><a href="#start_app_deps-1">start_app_deps/1</a></td><td>Start depedent applications of App.</td></tr><tr><td valign="top"><a href="#to_atom-1">to_atom/1</a></td><td></td></tr><tr><td valign="top"><a href="#to_binary-1">to_binary/1</a></td><td></td></tr><tr><td valign="top"><a href="#to_integer-1">to_integer/1</a></td><td></td></tr><tr><td valign="top"><a href="#to_list-1">to_list/1</a></td><td></td></tr></table>


<a name="functions"></a>

## Function Details ##

<a name="binary_env-2"></a>

### binary_env/2 ###

`binary_env(Key, Default) -> any()`

<a name="dbname-1"></a>

### dbname/1 ###
Expand Down
32 changes: 17 additions & 15 deletions doc/couchbeam_view.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Equivalent to [`count(Db, all_docs, [])`](#count-3).
### count/2 ###

<pre><code>
count(Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::string(), ViewName::string()}) -&gt; integer() | {error, term()}
count(Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::<a href="#type-design_name">design_name()</a>, ViewName::<a href="#type-view_name">view_name()</a>}) -&gt; integer() | {error, term()}
</code></pre>
<br />

Expand All @@ -76,7 +76,7 @@ Equivalent to [`count(Db, ViewName, [])`](#count-3).
### count/3 ###

<pre><code>
count(Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::string(), ViewName::string()}, Options::<a href="#type-view_options">view_options()</a>) -&gt; integer() | {error, term()}
count(Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::<a href="#type-design_name">design_name()</a>, ViewName::<a href="#type-view_name">view_name()</a>}, Options::<a href="#type-view_options">view_options()</a>) -&gt; integer() | {error, term()}
</code></pre>
<br />

Expand All @@ -98,7 +98,7 @@ Equivalent to [`fetch(Db, all_docs, [])`](#fetch-3).
### fetch/2 ###

<pre><code>
fetch(Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::string(), ViewName::string()}) -&gt; {ok, Rows::[<a href="#type-ejson_object">ejson_object()</a>]} | {error, term()}
fetch(Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::<a href="#type-design_name">design_name()</a>, ViewName::<a href="#type-view_name">view_name()</a>}) -&gt; {ok, Rows::[<a href="#type-ejson_object">ejson_object()</a>]} | {error, term()}
</code></pre>
<br />

Expand All @@ -109,7 +109,7 @@ Equivalent to [`fetch(Db, ViewName, [])`](#fetch-3).
### fetch/3 ###

<pre><code>
fetch(Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::string(), ViewName::string()}, Options::<a href="#type-view_options">view_options()</a>) -&gt; {ok, Rows::[<a href="#type-ejson_object">ejson_object()</a>]} | {error, term()}
fetch(Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::<a href="#type-design_name">design_name()</a>, ViewName::<a href="#type-view_name">view_name()</a>}, Options::<a href="#type-view_options">view_options()</a>) -&gt; {ok, Rows::[<a href="#type-ejson_object">ejson_object()</a>]} | {error, term()}
</code></pre>
<br />

Expand Down Expand Up @@ -157,7 +157,7 @@ Equivalent to [`first(Db, all_docs, [])`](#first-3).
### first/2 ###

<pre><code>
first(Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::string(), ViewName::string()}) -&gt; {ok, Row::<a href="#type-ejson_object">ejson_object()</a>} | {error, term()}
first(Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::<a href="#type-design_name">design_name()</a>, ViewName::<a href="#type-view_name">view_name()</a>}) -&gt; {ok, Row::<a href="#type-ejson_object">ejson_object()</a>} | {error, term()}
</code></pre>
<br />

Expand All @@ -168,7 +168,7 @@ Equivalent to [`first(Db, ViewName, [])`](#first-3).
### first/3 ###

<pre><code>
first(Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::string(), ViewName::string()}, Options::<a href="#type-view_options">view_options()</a>) -&gt; {ok, Rows::<a href="#type-ejson_object">ejson_object()</a>} | {error, term()}
first(Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::<a href="#type-design_name">design_name()</a>, ViewName::<a href="#type-view_name">view_name()</a>}, Options::<a href="#type-view_options">view_options()</a>) -&gt; {ok, Rows::<a href="#type-ejson_object">ejson_object()</a>} | {error, term()}
</code></pre>
<br />

Expand Down Expand Up @@ -205,7 +205,7 @@ Return: {ok, Row} or {error, Error}
### fold/4 ###

<pre><code>
fold(Function::function(), Acc::any(), Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::string(), ViewName::string()}) -&gt; [term()] | {error, term()}
fold(Function::function(), Acc::any(), Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::<a href="#type-design_name">design_name()</a>, ViewName::<a href="#type-view_name">view_name()</a>}) -&gt; [term()] | {error, term()}
</code></pre>
<br />

Expand All @@ -216,7 +216,7 @@ Equivalent to [`fold(Function, Acc, Db, ViewName, [])`](#fold-5).
### fold/5 ###

<pre><code>
fold(Function::function(), Acc::any(), Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::string(), ViewName::string()}, Options::<a href="#type-view_options">view_options()</a>) -&gt; [term()] | {error, term()}
fold(Function::function(), Acc::any(), Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::<a href="#type-design_name">design_name()</a>, ViewName::<a href="#type-view_name">view_name()</a>}, Options::<a href="#type-view_options">view_options()</a>) -&gt; [term()] | {error, term()}
</code></pre>
<br />

Expand All @@ -234,7 +234,7 @@ list is empty. For example:
### foreach/3 ###

<pre><code>
foreach(Function::function(), Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::string(), ViewName::string()}) -&gt; [term()] | {error, term()}
foreach(Function::function(), Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::<a href="#type-design_name">design_name()</a>, ViewName::<a href="#type-view_name">view_name()</a>}) -&gt; [term()] | {error, term()}
</code></pre>
<br />

Expand All @@ -245,7 +245,7 @@ Equivalent to [`foreach(Function, Db, ViewName, [])`](#foreach-4).
### foreach/4 ###

<pre><code>
foreach(Function::function(), Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::string(), ViewName::string()}, Options::<a href="#type-view_options">view_options()</a>) -&gt; [term()] | {error, term()}
foreach(Function::function(), Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::<a href="#type-design_name">design_name()</a>, ViewName::<a href="#type-view_name">view_name()</a>}, Options::<a href="#type-view_options">view_options()</a>) -&gt; [term()] | {error, term()}
</code></pre>
<br />

Expand All @@ -271,7 +271,7 @@ parse view options
### stream/2 ###

<pre><code>
stream(Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::string(), ViewName::string()}) -&gt; {ok, StartRef::term(), ViewPid::pid()} | {error, term()}
stream(Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::<a href="#type-design_name">design_name()</a>, ViewName::<a href="#type-view_name">view_name()</a>}) -&gt; {ok, StartRef::term(), ViewPid::pid()} | {error, term()}
</code></pre>
<br />

Expand All @@ -282,7 +282,7 @@ Equivalent to [`stream(Db, ViewName, Client, [])`](#stream-4).
### stream/3 ###

<pre><code>
stream(Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::string(), ViewName::string()}, Options::<a href="#type-view_options">view_options()</a>) -&gt; {ok, StartRef::term(), ViewPid::pid()} | {error, term()}
stream(Db::<a href="#type-db">db()</a>, ViewName::all_docs | {DesignName::<a href="#type-design_name">design_name()</a>, ViewName::<a href="#type-view_name">view_name()</a>}, Options::<a href="#type-view_options">view_options()</a>) -&gt; {ok, StartRef::term()} | {error, term()}
</code></pre>
<br />

Expand Down Expand Up @@ -328,9 +328,11 @@ happend.</dd>


```
Options :: view_options() [{key, binary()} | {startkey_docid, binary()}
| {endkey_docid, binary()} | {start_key, binary()}
| {end_key, binary()} | {limit, integer()}
Options :: view_options() [{key, binary()}
| {start_docid, binary()} | {startkey_docid, binary()}
| {end_docid, binary()} | {endkey_docid, binary()}
| {start_key, binary()} | {end_key, binary()}
| {limit, integer()}
| {stale, stale()}
| descending
| {skip, integer()}
Expand Down
2 changes: 1 addition & 1 deletion doc/gen_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* [Function Details](#functions)

gen_changes CouchDB continuous changes consumer behavior
This behaviour allws you to create easily a server that consume
This behaviour allows you to create easily a server that consume
Couchdb continuous changes.

__This module defines the `gen_changes` behaviour.__<br /> Required callback functions: `init/1`, `handle_change/2`, `handle_call/3`, `handle_cast/2`, `handle_info/2`, `terminate/2`.
Expand Down
6 changes: 3 additions & 3 deletions doc/overview.edoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@



@copyright 2009-2016 Benoît Chesneau.
@version 1.4.2
@title Couchbeam - simple Barrel and Apache CouchDB client library for Erlang applications
@copyright 2009-2023 Benoît Chesneau.
@version 1.5.0
@title Couchbeam - simple Apache CouchDB client library for Erlang applications

@doc

Expand Down
2 changes: 1 addition & 1 deletion src/couchbeam.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{application, couchbeam,
[{description, "Erlang CouchDB client"},
{vsn, "1.19.1"},
{vsn, "1.5.0"},
{modules, []},
{registered, [
couchbeam_sup
Expand Down

0 comments on commit 469f3b1

Please sign in to comment.