Skip to content

Commit 99a654b

Browse files
- Updated README.md
1 parent 7534774 commit 99a654b

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,34 @@ name = StringField(required=True)
330330

331331
### DB
332332

333+
```python
334+
from pfunk import Database
335+
336+
db = Database(name='yourdb')
337+
```
338+
339+
#### Methods
340+
341+
##### add_resource
342+
Add a single collection to the database.
343+
```python
344+
db.add_resource(SomeCollection)
345+
```
346+
347+
##### add_resources
348+
Add multiple collections to the database at one time.
349+
```python
350+
db.add_resources([SomeCollection, AnotherCollection])
351+
```
352+
353+
##### publish
354+
Publishes the collections, indexes, user-defined functions, GraphQL schema, and roles at time.
355+
```python
356+
db.publish()
357+
```
358+
359+
#### Properties
360+
333361
### Client
334362

335363
### Resources

0 commit comments

Comments
 (0)