Skip to content

Commit 9dfdd88

Browse files
authored
Fix spelling in documentation (porsager#45)
1 parent 758b5ee commit 9dfdd88

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ await sql`
143143

144144
## Cursor ```sql` `.cursor([rows = 1], fn) -> Promise```
145145

146-
Use cursors if you need to throttle the amount of rows being returned from a query. New results won't be requested until the promise / async callack function has resolved.
146+
Use cursors if you need to throttle the amount of rows being returned from a query. New results won't be requested until the promise / async callback function has resolved.
147147

148148
```js
149149

@@ -210,7 +210,7 @@ sql.notify('news', JSON.stringify({ no: 'this', is: 'news' }))
210210
## Tagged template function ``` sql`` ```
211211
[Tagged template functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#Tagged_templates) are not just ordinary template literal strings. They allow the function to handle any parameters within before interpolation. This means that they can be used to enforce a safe way of writing queries, which is what Postgres.js does. Any generic value will be serialized according to an inferred type, and replaced by a PostgreSQL protocol placeholders `$1, $2, ...` and then sent to the database as a parameter to let it handle any need for escaping / casting.
212212

213-
This also means you cannot write dynamic queryes or concat queries together by simple string manipulation. To enable dynamic queries in a safe way, the `sql` function doubles as a regular function which escapes any value properly. It also includes overloads for common cases of inserting, selecting, updating and querying.
213+
This also means you cannot write dynamic queries or concat queries together by simple string manipulation. To enable dynamic queries in a safe way, the `sql` function doubles as a regular function which escapes any value properly. It also includes overloads for common cases of inserting, selecting, updating and querying.
214214

215215
## Dynamic query helpers `sql() inside tagged template`
216216

@@ -522,7 +522,7 @@ There are also the following errors specifically for this library.
522522
##### UNDEFINED_VALUE
523523
> Undefined values are not allowed
524524
525-
Postgres.js won't accept `undefined` as values in tagged template queries since it becomes ambigious what to do with the value. If you want to set something to null, use `null` explicitly.
525+
Postgres.js won't accept `undefined` as values in tagged template queries since it becomes ambiguous what to do with the value. If you want to set something to null, use `null` explicitly.
526526

527527
##### MESSAGE_NOT_SUPPORTED
528528
> X (X) is not supported

0 commit comments

Comments
 (0)