mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
working on the docs
This commit is contained in:
parent
ce5973c917
commit
b53a481430
@ -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`
|
||||
|
||||
|
||||
@ -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:
|
||||
|
||||
|
||||
@ -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)
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user