You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-src/adapters.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
1
# PouchDB Adapters
2
2
3
-
When you use the PouchDB `RxStorage`, there are many adapters that define where the data has to be stored.
4
-
Depending on which environment you work in, you can choose between different adapters. For example in the browser you want to store the data inside of IndexedDB but on NodeJs you want to store the data on the filesystem.
3
+
When you use PouchDB `RxStorage`, there are many adapters that define where the data has to be stored.
4
+
Depending on which environment you work in, you can choose between different adapters. For example, in the browser you want to store the data inside of IndexedDB but on NodeJS you want to store the data on the filesystem.
5
5
6
6
This page is an overview over the different adapters with recommendations on what to use where.
7
7
8
-
**Please always ensure that your pouchdb adapter-version is the same as `pouchdb-core` in the [rxdb package.json](https://github.com/pubkey/rxdb/blob/master/package.json). Otherwise you might have strange problems**
8
+
**Please always ensure that your pouchdb adapter-version is the same as `pouchdb-core` in the [rxdb package.json](https://github.com/pubkey/rxdb/blob/master/package.json). Otherwise, you might have strange problems**
9
9
10
10
# Any environment
11
11
12
12
## Memory
13
13
In any environment, you can use the memory-adapter. It stores the data in the javascript runtime memory. This means it is not persistent and the data is lost when the process terminates.
14
14
15
15
Use this adapter when:
16
-
- You want to have a really good performance
16
+
- You want to have really good performance
17
17
- You do not want persistent state, for example in your test suite
Copy file name to clipboardExpand all lines: docs-src/plugins.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Creating Plugins
2
2
3
-
Creating an own plugin is very simple. A plugin is basically an javascript-object which overwrites or extends RxDB's internal classes, prototypes and hooks.
3
+
Creating your own plugin is very simple. A plugin is basically a javascript-object which overwrites or extends RxDB's internal classes, prototypes, and hooks.
4
4
5
-
A basic plugins:
5
+
A basic plugin:
6
6
7
7
```javascript
8
8
@@ -12,7 +12,7 @@ const myPlugin = {
12
12
* (optional) init() method
13
13
* that is called when the plugin is added to RxDB for the first time.
14
14
*/
15
-
init(){
15
+
init(){
16
16
// import other plugins or initialize stuff
17
17
},
18
18
/**
@@ -27,13 +27,13 @@ const myPlugin = {
27
27
* @param{object}prototype of RxCollection
28
28
*/
29
29
RxCollection: (proto) => {
30
-
proto.hello=function(){
30
+
proto.hello=function(){
31
31
return'world';
32
32
};
33
33
}
34
34
},
35
35
/**
36
-
* some methods are static and can be overwritten in the overwriteable-object
36
+
* some methods are static and can be overwritten in the overwritable-object
37
37
*/
38
38
overwritable: {
39
39
validatePassword:function(password) {
@@ -46,7 +46,7 @@ const myPlugin = {
46
46
*/
47
47
hooks: {
48
48
/**
49
-
* add a foo-property to each document. You can then call myDocument.foo (='bar')
49
+
* add a `foo` property to each document. You can then call myDocument.foo (='bar')
50
50
*/
51
51
createRxDocument: {
52
52
/**
@@ -68,19 +68,19 @@ addRxPlugin(myPlugin);
68
68
69
69
## rxdb
70
70
71
-
The `rxdb`-property signals that this plugin is and rxdb-plugin and not a pouchdb-plugin. The value should always be `true`.
71
+
The `rxdb`-property signals that this plugin is an rxdb-plugin and not a pouchdb-plugin. The value should always be `true`.
72
72
73
73
## prototypes
74
74
75
-
The `prototypes`-property contains a function for each of RxDB's internal prototype that you want to manipulate. Each function gets the prototype-object of the corresponding class as parameter and than can modify it. You can see a list of all available prototypes [here](https://github.com/pubkey/rxdb/blob/master/src/plugin.ts)
75
+
The `prototypes`-property contains a function for each of RxDB's internal prototype that you want to manipulate. Each function gets the prototype-object of the corresponding class as parameter and then can modify it. You can see a list of all available prototypes [here](https://github.com/pubkey/rxdb/blob/master/src/plugin.ts)
76
76
77
77
## overwritable
78
78
79
-
Some of RxDB's functions are not inside of a class-prototype but are static. You can set and overwrite them with the `overwritable`-object. You can see a list of all overwriteables[here](https://github.com/pubkey/rxdb/blob/master/src/overwritable.ts).
79
+
Some of RxDB's functions are not inside of a class-prototype but are static. You can set and overwrite them with the `overwritable`-object. You can see a list of all overwritables[here](https://github.com/pubkey/rxdb/blob/master/src/overwritable.ts).
80
80
81
81
# hooks
82
82
83
-
Sometimes you don't want to overwrite an existing RxDB-method, but extend it. You can do this by adding hooks which will be called each time the code jumps into the hooks corresponding call. You can find a list of all hooks here [here](https://github.com/pubkey/rxdb/blob/master/src/hooks.ts).
83
+
Sometimes you don't want to overwrite an existing RxDB-method, but extend it. You can do this by adding hooks which will be called each time the code jumps into the hooks corresponding call. You can find a list of all hooks [here](https://github.com/pubkey/rxdb/blob/master/src/hooks.ts).
Copy file name to clipboardExpand all lines: orga/releases/12.0.0.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -202,9 +202,9 @@ Changes to `RxStorageInterface`:
202
202
There are many things that can be done by **you** to improve RxDB:
203
203
204
204
- Check the [BACKLOG](https://github.com/pubkey/rxdb/blob/master/orga/BACKLOG.md) for features that would be great to have.
205
-
- Check the [breaking backlog](https://github.com/pubkey/rxdb/blob/master/orga/before-next-major.md) for breaking changes that must be implemented in the future but where I did not had the time yet.
205
+
- Check the [breaking backlog](https://github.com/pubkey/rxdb/blob/master/orga/before-next-major.md) for breaking changes that must be implemented in the future but where I did not have the time yet.
206
206
- Check the [TODOs](https://github.com/pubkey/rxdb/search?q=TODO) in the code. There are many small improvements that can be done for performance and build size.
207
-
- Review the code and add tests. I am only a single human with a laptop. My code is not perfect and much small improvements can be done when people review the code and help me to clearify undefined behaviors.
207
+
- Review the code and add tests. I am only a single human with a laptop. My code is not perfect and much small improvements can be done when people review the code and help me to clarify undefined behaviors.
208
208
- Improve the documentation. In the last user survey, many users told me that the documentation is not good enough. But I reviewed the docs and could not find clear flaws. The problem is that I am way too deep into RxDB so that I am not able to understand which documentation a newcomer to the project needs. Likely I assume too much knowledge or focus writing about the wrong parts.
209
209
- Update the [example projects](https://github.com/pubkey/rxdb/tree/master/examples) many of them are outdated and need updates.
210
210
- Help the next [PouchDB release](https://github.com/pouchdb/pouchdb/issues/8408) to improve RxDBs performance.
0 commit comments