working on the docs

This commit is contained in:
Umed Khudoiberdiev 2022-03-21 22:39:48 +05:00
parent ce5973c917
commit b53a481430
4 changed files with 464 additions and 520 deletions

976
README.md

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@
- [`mongodb` data source options](#mongodb-data-source-options)
- [`sql.js` data source options](#sqljs-data-source-options)
- [`expo` data source options](#expo-data-source-options)
- [Connection options example](#data-source-options-example)
- [DataSource options example](#data-source-options-example)
## What is `DataSourceOptions`

View File

@ -2,7 +2,7 @@
- [What is `DataSource`](#what-is-datasource)
- [Creating a new DataSource](#creating-a-new-datasource)
- [Working with DataSource](#working-with-datasource)
- [How to use DataSource](#how-to-use-datasource)
## What is `DataSource`
@ -81,7 +81,7 @@ const PostgresDataSource = new DataSource({
})
```
## Working with DataSource
## How to use DataSource
Once you set your `DataSource`, you can use it anywhere in your app, for example:

View File

@ -15,5 +15,5 @@ const user = await myDataSource.manager.findOneBy(User, {
id: 1,
})
user.name = "Umed"
await entityManager.save(user)
await myDataSource.manager.save(user)
```