Skip to content

Commit

Permalink
docs: fix typos (#4463)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lioness100 authored Feb 21, 2023
1 parent c245fe7 commit 87c9c95
Show file tree
Hide file tree
Showing 88 changed files with 156 additions and 156 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ const mySchema = {
title: "hero schema",
version: 0, // <- incremental version-number
description: "describes a simple hero",
primaryKey: 'name', // <- 'name' is the primary key for the coollection, it must be unique, required and of the type string
primaryKey: 'name', // <- 'name' is the primary key for the collection, it must be unique, required and of the type string
type: "object",
properties: {
name: {
Expand Down
2 changes: 1 addition & 1 deletion config/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ if (process.env.CI) {
*/
// configuration.reporters = [];

// how many browser should be started simultanous
// how many browser should be started simultaneously
configuration.concurrency = 1;
}

Expand Down
2 changes: 1 addition & 1 deletion config/karma.performance.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ if (process.env.CI) {
*/
// configuration.reporters = [];

// how many browser should be started simultanous
// how many browser should be started simultaneously
configuration.concurrency = 1;
}

Expand Down
6 changes: 3 additions & 3 deletions docs-src/capacitor-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[Capacitor](https://capacitorjs.com/) is an open source native JavaScript runtime to build Web based Native apps. You can use it to create cross-platform iOS, Android, and Progressive Web Apps with the web technologies JavaScript, HTML, and CSS.
It is developed by the Ionic Team and provides a great alternative to create hybrid apps. Compared to [React Native](./react-native-database.md), Capacitor is more Web-Like because the JavaScript runtime supports most Web APIs like IndexedDB, fetch, and so on.

To read and write persistend data in Capacitor, there are multiple solutions which are shown in the following.
To read and write persistent data in Capacitor, there are multiple solutions which are shown in the following.

**NOTICE:** You are reading this inside of the [RxDB](https://rxdb.info/) documentation, so everything might be opinionated.

Expand All @@ -19,7 +19,7 @@ To read and write persistend data in Capacitor, there are multiple solutions whi

### Preferences API

Capacitor comes with a native [Preferences API](https://capacitorjs.com/docs/apis/preferences) which is a simple, perssistent key->value store for lightweight data, similar to the browsers localstorage or React Native [AsyncStorage](./react-native-database.md#asyncstorage).
Capacitor comes with a native [Preferences API](https://capacitorjs.com/docs/apis/preferences) which is a simple, persistent key->value store for lightweight data, similar to the browsers localstorage or React Native [AsyncStorage](./react-native-database.md#asyncstorage).

To use it, you first have to install it from npm `npm install @capacitor/preferences` and then you can import it and write/read data.
Notice that all calls to the preferences API are asynchronous so they return a `Promise` that must be `await`-ed.
Expand Down Expand Up @@ -99,7 +99,7 @@ The downside of SQLite is that it is lacking many features that are handful when

[RxDB](https://rxdb.info/) is an offline first, NoSQL database for JavaScript Applications like hybrid apps. Because it is reactive, you can subscribe to all state changes like the result of a query or even a single field of a document. This is great for UI-based realtime applications in a way that makes it easy to develop realtime applications like what you need in Capacitor.

Because RxDB is made for Web applications, most of the [available RxStorage](./rx-storage.md) plugins can be used to store and query data in a Capacitor app. However it is recommended to use the [SQLite RxStorage](./rx-storage-sqlite.md) because it stores the data on the filesystem of the device, not in the JavaScript runtime (like IndexedDB). Storing data on the filesystem ensures it is persistend and will not be cleaned up by any process. Also the performance of SQLite is [much faster](./rx-storage.md#performance-comparison) compared to IndexedDB, because SQLite does not have to go through a browsers permission layers. For the SQLite binding you should use the [@capacitor-community/sqlite](https://github.com/capacitor-community/sqlite) package.
Because RxDB is made for Web applications, most of the [available RxStorage](./rx-storage.md) plugins can be used to store and query data in a Capacitor app. However it is recommended to use the [SQLite RxStorage](./rx-storage-sqlite.md) because it stores the data on the filesystem of the device, not in the JavaScript runtime (like IndexedDB). Storing data on the filesystem ensures it is persistent and will not be cleaned up by any process. Also the performance of SQLite is [much faster](./rx-storage.md#performance-comparison) compared to IndexedDB, because SQLite does not have to go through a browsers permission layers. For the SQLite binding you should use the [@capacitor-community/sqlite](https://github.com/capacitor-community/sqlite) package.

Because the SQLite RxStorage is part of the [Premium Plugins](https://rxdb.info/premium.html) which must be purchased, it is recommended to use the [Dexie.js RxStorage](./rx-storage-dexie.md) while testing and prototyping your Capacitor app.

Expand Down
2 changes: 1 addition & 1 deletion docs-src/crdt.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ When any instances makes a write to the document, it is required to update the C

## Why not automerge.js or yjs?

There are already CRDT libraries out there that have been considered to be used with RxDB. The biggeste ones are [automerge](https://github.com/automerge/automerge) and [yjs](https://github.com/yjs/yjs). The decision was made to not use these but instead go for a more NoSQL way of designing the CRDT format because:
There are already CRDT libraries out there that have been considered to be used with RxDB. The biggest ones are [automerge](https://github.com/automerge/automerge) and [yjs](https://github.com/yjs/yjs). The decision was made to not use these but instead go for a more NoSQL way of designing the CRDT format because:

- Users do not have to learn a new syntax but instead can use the NoSQL operations which they already know.
- RxDB is often used to [replicate](./replication.md) data with any custom backend on an already existing infrastructure. Using NoSQL operators instead of binary data in CRDTs, makes it easy to implement the exact same logic on these backends so that the backend can also do document writes and still be compliant to the RxDB CRDT plugin.
Expand Down
4 changes: 2 additions & 2 deletions docs-src/electron-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ Because Electron runs on a desktop computer, you might think that it should be p

### Localstorage/IndexedDB/WebSQL

Because Electron uses a common Chrome web browser in the renderer process, you can access the common Web Storage APIs like Localstorage, IndexedDB and WebSQL. This is easy to setup and storing small sets of data can be archieved in a short span of time.
Because Electron uses a common Chrome web browser in the renderer process, you can access the common Web Storage APIs like Localstorage, IndexedDB and WebSQL. This is easy to setup and storing small sets of data can be achieved in a short span of time.

But as soon as your application goes beyond a simple TODO-app, there are multiple obstacles that come in your way. One thing is the bad multi-tab support. If you have more then one *renderer* process, it becomes hard to manage database writes between them. Each *browser tab* could modify the database state while the others do not know of the changes and keep an outdated UI.

Another thing is performance. [IndexedDB is slow](./slow-indexeddb.md) mostly because it has to go through layers of browser security and abstractions. Storing and querying much data might become your performance bottleneck. Localstorage and WebSQL are even slower by the way.

Using the Web Storage APIs is generally only recommend when you know for sure that there will be always only **one rendnering process** and performance is not that relevant.
Using the Web Storage APIs is generally only recommend when you know for sure that there will be always only **one rendering process** and performance is not that relevant.

### SQLite

Expand Down
6 changes: 3 additions & 3 deletions docs-src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ <h2>RxDB Basics</h2>
rel="noopener"
onclick="window.trigger('goto_code', 0.15)"
>
<div class="buy-option-action bg-top hover-shaddow-top">
<div class="buy-option-action bg-top hover-shadow-top">
Get the Code
</div>
</a>
Expand Down Expand Up @@ -838,7 +838,7 @@ <h2>Premium Plugins</h2>
href="/premium.html"
onclick="window.trigger('premium_request', 1)"
>
<div class="buy-option-action bg-middle hover-shaddow-middle">
<div class="buy-option-action bg-middle hover-shadow-middle">
Request Premium
</div>
</a>
Expand All @@ -865,7 +865,7 @@ <h2>Consulting Session</h2>
target="_blank"
onclick="window.trigger('consulting_session_request', 1.5)"
>
<div class="buy-option-action bg-bottom hover-shaddow-bottom">
<div class="buy-option-action bg-bottom hover-shadow-bottom">
Book Now
</div>
</a>
Expand Down
8 changes: 4 additions & 4 deletions docs-src/next-button.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

function runAddingNextButtons() {
function addNextButton() {
var id = 'rxdb-custon-next-button';
var id = 'rxdb-custom-next-button';

var alreadyThere = document.querySelector('#' + id);
if (alreadyThere) {
Expand Down Expand Up @@ -89,8 +89,8 @@ function setCallToActionOnce() {
}


var postitionReferenceElement = document.querySelector('.btn.pull-left.js-toolbar-action');
if (!postitionReferenceElement) {
var positionReferenceElement = document.querySelector('.btn.pull-left.js-toolbar-action');
if (!positionReferenceElement) {
// not loaded yet!
return;
}
Expand All @@ -105,7 +105,7 @@ function setCallToActionOnce() {
newElement.target = '_blank';


insertAfter(postitionReferenceElement, newElement);
insertAfter(positionReferenceElement, newElement);
}
function runSettingCallToActionButton() {
setCallToActionOnce();
Expand Down
6 changes: 3 additions & 3 deletions docs-src/nodejs-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<img src="./files/icons/nodejs.svg" alt="Node.js" width="70" />
</p>

## Persistend Database
## Persistent Database

To get a "normal" database where the data is persisted to a file system, RxDB provides multiple storage implementations.

Expand Down Expand Up @@ -106,7 +106,7 @@ node --max-old-space-size=8192 index.js

## Hybrid In-memory-persistence-synced storage

If you want to have the performance of an **in-memory database** but require persistency of the data, you can use the [memory-synced storage](./rx-storage-memory-synced.md). On database creation it will load all data into the memory and on writes it will first write the data into memory and later also write it to the persistend storage in the background. In the following example the FoundationDB storage is used, but any other RxStorage can be used as persistence layer.
If you want to have the performance of an **in-memory database** but require persistency of the data, you can use the [memory-synced storage](./rx-storage-memory-synced.md). On database creation it will load all data into the memory and on writes it will first write the data into memory and later also write it to the persistent storage in the background. In the following example the FoundationDB storage is used, but any other RxStorage can be used as persistence layer.


```typescript
Expand All @@ -125,7 +125,7 @@ const db = await createRxDatabase({
});
```

While this approach gives you a database with great performance and persistend, it has two major downsides:
While this approach gives you a database with great performance and persistent, it has two major downsides:
- The database size is limited to the memory size
- Writes can be lost when the Node.js process exists between a write to the memory state and the background persisting.

Expand Down
20 changes: 10 additions & 10 deletions docs-src/premium.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ <h2><b class="underline">RxDB</b> Premium Plugins</h2>
href="./rx-storage-indexeddb.html"
target="_blank"
>
<div class="premium-block hover-shaddow-middle bg-gradient-left-top">
<div class="premium-block hover-shadow-middle bg-gradient-left-top">
<div class="premium-block-inner">
<h4>RxStorage IndexedDB</h4>
<p>A really fast storage based on <b>IndexedDB</b>. Made to be used in browsers.</p>
Expand All @@ -140,7 +140,7 @@ <h4>RxStorage IndexedDB</h4>
href="./rx-storage-sqlite.html"
target="_blank"
>
<div class="premium-block hover-shaddow-middle bg-gradient-right-bottom">
<div class="premium-block hover-shadow-middle bg-gradient-right-bottom">
<div class="premium-block-inner">
<h4>RxStorage SQLite</h4>
<p>
Expand All @@ -156,7 +156,7 @@ <h4>RxStorage SQLite</h4>
href="./rx-storage-sharding.html"
target="_blank"
>
<div class="premium-block hover-shaddow-middle bg-gradient-left-top">
<div class="premium-block hover-shadow-middle bg-gradient-left-top">
<div class="premium-block-inner">
<h4>RxStorage Sharding</h4>
<p>
Expand All @@ -172,7 +172,7 @@ <h4>RxStorage Sharding</h4>
href="./storage-migration.html"
target="_blank"
>
<div class="premium-block hover-shaddow-middle bg-gradient-right-bottom">
<div class="premium-block hover-shadow-middle bg-gradient-right-bottom">
<div class="premium-block-inner">
<h4>Storage Migration</h4>
<p>
Expand All @@ -187,7 +187,7 @@ <h4>Storage Migration</h4>
href="./rx-storage-memory-synced.html"
target="_blank"
>
<div class="premium-block hover-shaddow-middle bg-gradient-left-top">
<div class="premium-block hover-shadow-middle bg-gradient-left-top">
<div class="premium-block-inner">
<h4>RxStorage Memory Synced</h4>
<p>
Expand All @@ -202,7 +202,7 @@ <h4>RxStorage Memory Synced</h4>
href="./query-optimizer.html"
target="_blank"
>
<div class="premium-block hover-shaddow-middle bg-gradient-right-bottom">
<div class="premium-block hover-shadow-middle bg-gradient-right-bottom">
<div class="premium-block-inner">
<h4>Query Optimizer</h4>
<p>
Expand All @@ -217,7 +217,7 @@ <h4>Query Optimizer</h4>
href="./rx-storage-localstorage-meta-optimizer.html"
target="_blank"
>
<div class="premium-block hover-shaddow-middle bg-gradient-left-top">
<div class="premium-block hover-shadow-middle bg-gradient-left-top">
<div class="premium-block-inner">
<h4>RxStorage Localstorage Meta Optimizer</h4>
<p>
Expand All @@ -232,7 +232,7 @@ <h4>RxStorage Localstorage Meta Optimizer</h4>
href="./rx-storage-shared-worker.html"
target="_blank"
>
<div class="premium-block hover-shaddow-middle bg-gradient-right-bottom">
<div class="premium-block hover-shadow-middle bg-gradient-right-bottom">
<div class="premium-block-inner">
<h4>RxStorage SharedWorker</h4>
<p>
Expand All @@ -246,7 +246,7 @@ <h4>RxStorage SharedWorker</h4>
href="./rx-storage-worker.html"
target="_blank"
>
<div class="premium-block hover-shaddow-middle bg-gradient-left-top">
<div class="premium-block hover-shadow-middle bg-gradient-left-top">
<div class="premium-block-inner">
<h4>RxStorage Worker</h4>
<p>
Expand All @@ -260,7 +260,7 @@ <h4>RxStorage Worker</h4>
href="./encryption.html"
target="_blank"
>
<div class="premium-block hover-shaddow-middle bg-gradient-right-bottom">
<div class="premium-block hover-shadow-middle bg-gradient-right-bottom">
<div class="premium-block-inner">
<h4>WebCrypto Encryption</h4>
<p>
Expand Down
2 changes: 1 addition & 1 deletion docs-src/premium.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ window.onload = async function () {


/**
* Prices are in percent of averagy salary.
* Prices are in percent of average salary.
*/
export const PACKAGE_PRICE: { [k: string]: number; } = {
browser: 0.55,
Expand Down
2 changes: 1 addition & 1 deletion docs-src/react-native-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ According to the roadmap, despite being essentially feature-complete, Watermelon
<img src="./files/alternatives/firebase.svg" alt="Firebase" width="80" />
</p>

Firestore is a cloud based database technologie that stores data on clients devices and replicates it with the Firebase cloud service that is run by google. It has many features like observability and authentication.
Firestore is a cloud based database technology that stores data on clients devices and replicates it with the Firebase cloud service that is run by google. It has many features like observability and authentication.
The main lacking feature is the non-complete offline first support because clients cannot start the application while being offline because then the authentication does not work. After they are authenticated, being offline is no longer a problem.
Also using firestore creates a vendor lock-in because it is not possible to replicate with a custom self hosted backend.

Expand Down
8 changes: 4 additions & 4 deletions docs-src/releases/11.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ The whole documentation about the worker plugin can be found [here](../rx-storag
The RxDB source-code is transpiled from TypeScript to es5/es6 JavaScript code via babel.
In the past we transpiled the `async` and `await` keywords with the babel plugin `plugin-transform-async-to-generator`.
Now we use the [babel-plugin-transform-async-to-promises](https://github.com/rpetrich/babel-plugin-transform-async-to-promises) plugin instead.
It transpiles `asnyc`/`await` into native `Promise`s instead of using JavaScript generators. This has shown to decrease build size by about 10% and also improves the performance.
It transpiles `async`/`await` into native `Promise`s instead of using JavaScript generators. This has shown to decrease build size by about 10% and also improves the performance.

## Removed deprecated `recieved` methods
## Removed deprecated `received` methods

In the past there was a typo in all getters and methods that are called `recieved`.
This was renamed to `received` and all misstyped methods have been deprecated.
In the past there was a typo in all getters and methods that are called `received`.
This was renamed to `received` and all mistyped methods have been deprecated.
We now removed all deprecated methods, so you have to use the correctly spelled methods instead.
[See #3392](https://github.com/pubkey/rxdb/pull/3392)

Expand Down
Loading

0 comments on commit 87c9c95

Please sign in to comment.