Skip to content

Commit 755191e

Browse files
authored
docs: Some sentence updated for datasource doc (typeorm#11182)
1 parent 1465773 commit 755191e

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

docs/data-source.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
Your interaction with the database is only possible once you setup a `DataSource`.
1010
TypeORM's `DataSource` holds your database connection settings and
11-
establishes initial database connection or connection pool depending on the RDBMS you use.
11+
establishes the initial database connection or connection pool depending on the RDBMS you use.
1212

13-
In order to establish initial connection / connection pool you must call `initialize` method of your `DataSource` instance.
13+
To establish the initial connection/connection pool, you must call the `initialize` method of your `DataSource` instance.
1414

15-
Disconnection (closing all connections in the pool) is made when `destroy` method is called.
15+
Disconnection (closing all connections in the pool) occurs when the `destroy` method is called.
1616

17-
Generally, you call `initialize` method of the `DataSource` instance on application bootstrap,
18-
and `destroy` it after you completely finished working with the database.
17+
Generally, you call the `initialize` method of the `DataSource` instance on the application bootstrap,
18+
and `destroy` it after you finished working with the database.
1919
In practice, if you are building a backend for your site and your backend server always stays running -
2020
you never `destroy` a DataSource.
2121

@@ -45,11 +45,10 @@ AppDataSource.initialize()
4545
})
4646
```
4747

48-
It's a good idea to make `AppDataSource` globally available by `export`-ing it, since you'll
49-
use this instance across your application.
48+
It's a good idea to make `AppDataSource` globally available by `export`-ing it since you'll use this instance across your application.
5049

51-
`DataSource` accepts `DataSourceOptions` and those options vary depend on database `type` you use.
52-
For different database types there are different options you can specify.
50+
`DataSource` accepts `DataSourceOptions` and those options vary depending on the database `type` you use.
51+
For different database types, there are different options you can specify.
5352

5453
You can define as many data sources as you need in your application, for example:
5554

@@ -97,6 +96,6 @@ export class UserController {
9796
}
9897
```
9998

100-
Using `DataSource` instance you can execute database operations with your entities,
99+
Using the `DataSource` instance you can execute database operations with your entities,
101100
particularly using `.manager` and `.getRepository()` properties.
102101
For more information about them see [Entity Manager and Repository](working-with-entity-manager.md) documentation.

0 commit comments

Comments
 (0)