Skip to content

Commit dce47b2

Browse files
committed
docs(sequelize): fix warning and hint
1 parent e319015 commit dce47b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/recipes/sql-sequelize.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
##### This chapter applies only to TypeScript
44

5-
> **Warning** In this article, you'll learn how to create a `DatabaseModule` based on the **Sequelize** package from scratch using custom components. As a consequence, this technique contains a lot of overhead that you can avoid by using the dedicated, out-of-the-box `@nestjs/sequelize` package. To learn more, see [here](/techniques/database#sequelize-integration).
5+
> warning **Warning** In this article, you'll learn how to create a `DatabaseModule` based on the **Sequelize** package from scratch using custom components. As a consequence, this technique contains a lot of overhead that you can avoid by using the dedicated, out-of-the-box `@nestjs/sequelize` package. To learn more, see [here](/techniques/database#sequelize-integration).
66
77
[Sequelize](https://github.com/sequelize/sequelize) is a popular Object Relational Mapper (ORM) written in a vanilla JavaScript, but there is a [sequelize-typescript](https://github.com/RobinBuschmann/sequelize-typescript) TypeScript wrapper which provides a set of decorators and other extras for the base sequelize.
88

@@ -42,7 +42,7 @@ export const databaseProviders = [
4242
];
4343
```
4444

45-
> warning **Hint** Following best practices, we declared the custom provider in the separated file which has a `*.providers.ts` suffix.
45+
> info **Hint** Following best practices, we declared the custom provider in the separated file which has a `*.providers.ts` suffix.
4646
4747
Then, we need to export these providers to make them **accessible** for the rest part of the application.
4848

@@ -94,7 +94,7 @@ export const catsProviders = [
9494
];
9595
```
9696

97-
> **Notice** In the real-world applications you should avoid **magic strings**. Both `CATS_REPOSITORY` and `SEQUELIZE` should be kept in the separated `constants.ts` file.
97+
> warning **Warning** In the real-world applications you should avoid **magic strings**. Both `CATS_REPOSITORY` and `SEQUELIZE` should be kept in the separated `constants.ts` file.
9898
9999
In Sequelize, we use static methods to manipulate the data, and thus we created an **alias** here.
100100

@@ -140,4 +140,4 @@ import { DatabaseModule } from '../database/database.module';
140140
export class CatsModule {}
141141
```
142142

143-
> warning **Hint** Do not forget to import the `CatsModule` into the root `ApplicationModule`.
143+
> info **Hint** Do not forget to import the `CatsModule` into the root `ApplicationModule`.

0 commit comments

Comments
 (0)