Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
igalklebanov authored Mar 22, 2024
1 parent 52f1892 commit 9481620
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,14 @@ Create a Kysely instance.
`src/kysely.ts`:

```ts
import {
CamelCasePlugin, // optional
Kysely,
PostgresAdapter,
PostgresIntrospector,
PostgresQueryCompiler
} from 'kysely'
import { KyselyTypeORMDialect } from 'kysely-typeorm'
import type {Database} from './types/database'
import {dataSource} from './typeorm'

Expand All @@ -217,6 +225,6 @@ export const kysely = new Kysely<Database>({
typeORMDataSource: dataSource,
}),
// `CamelCasePlugin` is used to align with `typeorm-naming-strategies`'s `SnakeNamingStrategy`.
plugins: [new CamelCasePlugin()],
plugins: [new CamelCasePlugin()], // optional
})
```

0 comments on commit 9481620

Please sign in to comment.