Skip to content

chore: fixed small error #828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ Or when using the VSCode extension: Settings -> SQL-Formatter-VSCode: SQLFlavour

### Module parse failed: Unexpected token

This typically happens when bundling an appication with Webpack.
This typically happens when bundling an application with Webpack.
The cause is that Babel (through `babel-loader`) is not configured
to support class properties syntax:

Expand Down Expand Up @@ -264,7 +264,7 @@ SELECT {col1}, {col2} FROM {tablename}

While templating is not directly supported by SQL Formatter, the workaround
is to use [paramTypes](docs/paramTypes.md) config option to treat these
occurances of templating constructs as prepared-statement parameter-placeholders:
occurrences of templating constructs as prepared-statement parameter-placeholders:

```js
format('SELECT {col1}, {col2} FROM {tablename};', {
Expand Down
2 changes: 1 addition & 1 deletion docs/paramTypes.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ An object with the following following optional fields:
- **`numbered`**: `Array<"?" | ":" | "$">`. To allow for `?1`, `:2` and/or `$3` syntax for numbered placholders.
- **`named`**: `Array<":" | "@" | "$">`. To allow for `:name`, `@name` and/or `$name` syntax for named placholders.
- **`quoted`**: `Array<":" | "@" | "$">`. To allow for `:"name"`, `@"name"` and/or `$"name"` syntax for quoted placholders.
Note that the type of quotes dependes on the quoted identifiers supported by a dialect.
Note that the type of quotes depends on the quoted identifiers supported by a dialect.
For example in MySQL using `paramTypes: {quoted: [':']}` would allow you to use `` :`name` `` syntax,
while in Transact-SQL `:"name"` and `:[name]` would work instead.
See [identifier syntax wiki page][] for information about differences in support quoted identifiers.
Expand Down