We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b5f380 commit 211e148Copy full SHA for 211e148
README.md
@@ -49,23 +49,25 @@ Currently just two SQL dialects are supported:
49
50
```js
51
// Named placeholders
52
-sqlFormatter.format("SELECT @foo FROM table1", {
53
- params: {foo: "bar"}
+sqlFormatter.format("SELECT * FROM tbl WHERE foo = @foo", {
+ params: {foo: "'bar'"}
54
}));
55
56
// Indexed placeholders
57
-sqlFormatter.format("SELECT ? FROM table1", {
58
- params: ["bar"]
+sqlFormatter.format("SELECT * FROM tbl WHERE foo = ?", {
+ params: ["'bar'"]
59
60
```
61
62
Both result in:
63
64
65
SELECT
66
- bar
+ *
67
FROM
68
- table1
+ tbl
69
+WHERE
70
+ foo = 'bar'
71
72
73
## Usage without NPM
0 commit comments