couchdb_dart 1.0.0 copy "couchdb_dart: ^1.0.0" to clipboard
couchdb_dart: ^1.0.0 copied to clipboard

A small simple package to make it easier to use a CouchDB server

A small simple package to make it easier to use a CouchDB server.

Features #

  • Includes basic abstractions above the Database and Document api.
  • Supports nearly all authentication options (excludes JWT).
  • Low level access is possible if desired.
  • Does not support live data.
  • Does not support data other than json

Usage #

Example can be found in '/example'.

Uri uri = Uri.parse('http://localhost:5984/');
final client = CouchDbClient.fromUri(uri, authentication: CookieAuth(username, password));
final database = Database(client, 'test_db');
if (!(await database.exists())) {
  await database.create();
}

final doc = await database.createDocument({'data': 1}, id: 'some_id');
await doc.update({'data': 2});
print(doc);
await doc.delete();

client.close();

Additional information #

This package is a small abstraction above the CouchDB.

Testing #

For testing or development you can start the CouchDB instance defined in the couchdb directory with Docker

cd couchdb && docker-compose up

This includes predefined admin user (test:test) and required auth handlers enabled

1
likes
110
pub points
44%
popularity

Publisher

verified publisherdavidlangheiter.com

A small simple package to make it easier to use a CouchDB server

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

crypto, http

More

Packages that depend on couchdb_dart