You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rather than executing a given query, `.describe` will return information utilized in the query process. This information can include the query identifier, column types, etc.
@@ -416,10 +416,10 @@ Using `.raw` will return rows as an array with `Buffer` values for each column,
416
416
417
417
This can be useful for specific performance/transformation reasons. The column definitions are still included on the result array, plus access to parsers for each column.
@@ -527,9 +527,9 @@ Do note that you can often achieve the same result using [`WITH` queries (Common
527
527
528
528
## Data Transformation
529
529
530
-
`postgres.js` comes with a number of built-in data transformation functions that can be used to transform the data returned from a query or when inserting data. They are available under `transformation` option in the `postgres()` function connection options.
530
+
Postgres.js comes with a number of built-in data transformation functions that can be used to transform the data returned from a query or when inserting data. They are available under `transform` option in the `postgres()` function connection options.
531
531
532
-
Like - `postgres('connectionURL', { transformation: {...} })`
532
+
Like - `postgres('connectionURL', { transform: {...} })`
533
533
534
534
### Parameters
535
535
* `to`: The function to transform the outgoing query column name to, i.e `SELECT ${ sql('aName') }` to `SELECT a_name` when using `postgres.toCamel`.
@@ -555,7 +555,7 @@ These functions can be passed in as options when calling `postgres()`. For examp
555
555
})();
556
556
```
557
557
558
-
> Note that if a column name is originally registered as snake_case in the database then to tranform it from camelCase to snake_case when querying or inserting, the column camelCase name must be put in `sql('columnName')` as it's done in the above example.
558
+
> Note that if a column name is originally registered as snake_case in the database then to tranform it from camelCase to snake_case when querying or inserting, the column camelCase name must be put in `sql('columnName')` as it's done in the above example, Postgres.js does not rewrite anything inside the static parts of the tagged templates.
0 commit comments