Extends
- Map
Methods
fetchDoc(config) → {Object|Error}
Fetches a document from a database
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object | configuration object Properties
|
Returns:
- Type
- Object | Error
init(config)
- Source:
Initializes a new DatabaseController
Parameters:
Name | Type | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object | configuration object Properties
|
loadDb(name, dbAddressopt, portopt) → {Object}
- Source:
Loads and syncs with a database
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
name |
String | database name |
||
dbAddress |
String |
<optional> |
'local'
|
remote database address, or |
port |
Number |
<optional> |
5984
|
remote database port |
Returns:
- Type
- Object
start()
- Source:
Starts the DatabaseController
Listens to Events:
stop()
- Source:
Stops the DatabaseController
Listens to Events:
stopSyncing()
Stops syncing all databases
updateDoc(config)
Updates or creates a document in a database
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object | configuration object Properties
|