Skip to content

Commit e83cce0

Browse files
committed
add semicolons
1 parent 90a2d28 commit e83cce0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ pg.query(SQL`SELECT author FROM books WHERE name = ${book}`);
1818
This might not seem like a big deal, but when you do an INSERT with a lot columns writing all the placeholders becomes a nightmare:
1919

2020
```js
21-
db.query('INSERT INTO books (name, author, isbn, category, recommended_age, pages, price) VALUES (?, ?, ?, ?, ?, ?, ?)', [name, author, isbn, category, recommendedAge, pages, price])
21+
db.query('INSERT INTO books (name, author, isbn, category, recommended_age, pages, price) VALUES (?, ?, ?, ?, ?, ?, ?)', [name, author, isbn, category, recommendedAge, pages, price]);
2222
// is equivalent to
2323
db.query(SQL`
2424
INSERT
2525
INTO books
2626
(name, author, isbn, category, recommended_age, pages, price)
2727
VALUES (${name}, ${author}, ${isbn}, ${category}, ${recommendedAge}, ${pages}, ${price})
28-
`)
28+
`);
2929
```
3030

3131
Also template strings support line breaks.

0 commit comments

Comments
 (0)