File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 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'
99Escapes a string as a [ SQL identifier] ( https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS ) .
1010
1111``` js
12- const { escapeIdentifier } = require ( ' pg' )
12+ import { escapeIdentifier } from ' pg' ;
1313const escapedIdentifier = escapeIdentifier (' FooIdentifier' )
1414console .log (escapedIdentifier) // '"FooIdentifier"'
1515```
@@ -27,7 +27,7 @@ console.log(escapedIdentifier) // '"FooIdentifier"'
2727Escapes a string as a [ SQL literal] ( https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS ) .
2828
2929``` js
30- const { escapeLiteral } = require ( ' pg' )
30+ import { escapeLiteral } from ' pg' ;
3131const escapedLiteral = escapeLiteral (" hello 'world'" )
3232console .log (escapedLiteral) // "'hello ''world'''"
3333```
You can’t perform that action at this time.
0 commit comments