File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import { Alert } from '/components/alert.tsx'
9
9
Escapes a string as a [ SQL identifier] ( https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS ) .
10
10
11
11
``` js
12
- const { escapeIdentifier } = require ( ' pg' )
12
+ import { escapeIdentifier } from ' pg' ;
13
13
const escapedIdentifier = escapeIdentifier (' FooIdentifier' )
14
14
console .log (escapedIdentifier) // '"FooIdentifier"'
15
15
```
@@ -27,7 +27,7 @@ console.log(escapedIdentifier) // '"FooIdentifier"'
27
27
Escapes a string as a [ SQL literal] ( https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS ) .
28
28
29
29
``` js
30
- const { escapeLiteral } = require ( ' pg' )
30
+ import { escapeLiteral } from ' pg' ;
31
31
const escapedLiteral = escapeLiteral (" hello 'world'" )
32
32
console .log (escapedLiteral) // "'hello ''world'''"
33
33
```
You can’t perform that action at this time.
0 commit comments