Skip to content

Commit 25502ec

Browse files
committed
style: format documentation with Prettier
1 parent 700080b commit 25502ec

1 file changed

Lines changed: 11 additions & 14 deletions

File tree

docs/site/Executing-database-commands.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,42 +29,39 @@ Example use:
2929
```ts
3030
const result = await repository.execute('SELECT * FROM Products');
3131
```
32+
3233
## Examples
3334

3435
### MySQL
3536

3637
Use parameterized queries to avoid SQL injection attacks.
3738

3839
```ts
39-
const result = await repository.execute(
40-
'SELECT * FROM Products WHERE id = ?',
41-
[productId]
42-
);
40+
const result = await repository.execute('SELECT * FROM Products WHERE id = ?', [
41+
productId,
42+
]);
4343
```
4444

4545
### PostgreSQL
4646

4747
```ts
4848
const result = await repository.execute(
4949
'SELECT * FROM Products WHERE id = $1',
50-
[productId]
50+
[productId],
5151
);
5252
```
5353

5454
### MongoDB
5555

5656
```ts
57-
const result = await repository.execute(
58-
'MyCollection',
59-
'aggregate',
60-
[
61-
{$unwind: '$data'},
62-
{$out: 'tempData'},
63-
]
64-
);
57+
const result = await repository.execute('MyCollection', 'aggregate', [
58+
{$unwind: '$data'},
59+
{$out: 'tempData'},
60+
]);
6561
```
6662

67-
Use parameterized queries whenever possible instead of constructing SQL strings manually.
63+
Use parameterized queries whenever possible instead of constructing SQL strings
64+
manually.
6865

6966
See API docs for parameter reference, additional information and examples:
7067

0 commit comments

Comments
 (0)