mirror of
https://github.com/orbitdb/orbitdb.git
synced 2025-03-30 15:08:28 +00:00
Added DataBase types to API.md
This commit is contained in:
parent
b4f569c27c
commit
971d3046eb
6
API.md
6
API.md
@ -98,6 +98,12 @@ const db = await orbitdb.keyvalue('profile')
|
|||||||
### orbitdb.create(name, type, [options])
|
### orbitdb.create(name, type, [options])
|
||||||
> Creates and opens an OrbitDB database.
|
> Creates and opens an OrbitDB database.
|
||||||
|
|
||||||
|
* [log](https://github.com/orbitdb/orbit-db/blob/master/API.md#orbitdblognameaddress): an imutable (write only) log database. Useful for transactions lists.
|
||||||
|
* [feed](https://github.com/orbitdb/orbit-db/blob/master/API.md#orbitdbfeednameaddress): a mutable log database. Useful for comments of a blog.
|
||||||
|
* [keyvalue](https://github.com/orbitdb/orbit-db/blob/master/API.md#orbitdbkeyvaluenameaddress): Useful for load data from keywords or an id.
|
||||||
|
* [docs](https://github.com/orbitdb/orbit-db/blob/master/API.md#orbitdbdocsnameaddress-options): a JSON objects storage. Useful for user data or forum posts.
|
||||||
|
* [counter](https://github.com/orbitdb/orbit-db/blob/master/API.md#orbitdbcounternameaddress): Useful for ordered data as an order list or playlist.
|
||||||
|
|
||||||
Returns a `Promise` that resolves to [a database instance](#store-api). `name` (string) should be the database name, not an OrbitDB address (i.e. `user.posts`). `type` is a supported database type (i.e. `eventlog` or [an added custom type](https://github.com/orbitdb/orbit-db#custom-store-types)). `options` is an object with any of the following properties:
|
Returns a `Promise` that resolves to [a database instance](#store-api). `name` (string) should be the database name, not an OrbitDB address (i.e. `user.posts`). `type` is a supported database type (i.e. `eventlog` or [an added custom type](https://github.com/orbitdb/orbit-db#custom-store-types)). `options` is an object with any of the following properties:
|
||||||
- `accessController` (object): An object, as shown in the example below, containing the key `write` whose value is an array of hex encoded public keys which are used to set write access to the database. `["*"]` can be passed in to give write access to everyone. See the [GETTING STARTED](https://github.com/orbitdb/orbit-db/blob/master/GUIDE.md) guide for more info.
|
- `accessController` (object): An object, as shown in the example below, containing the key `write` whose value is an array of hex encoded public keys which are used to set write access to the database. `["*"]` can be passed in to give write access to everyone. See the [GETTING STARTED](https://github.com/orbitdb/orbit-db/blob/master/GUIDE.md) guide for more info.
|
||||||
(Default: uses the OrbitDB identity id `orbitdb.identity.id`, which would give write access only to yourself)
|
(Default: uses the OrbitDB identity id `orbitdb.identity.id`, which would give write access only to yourself)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user