diff --git a/README.md b/README.md index ba7dfa4a0..b836a8c6b 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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};', { diff --git a/docs/paramTypes.md b/docs/paramTypes.md index 58758bc5c..c0170cdfa 100644 --- a/docs/paramTypes.md +++ b/docs/paramTypes.md @@ -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.