Skip to content

[FORMATTING] Formatter inserts space in between @ operator in mariadb dialect #793

Open
@mariadb-ThienLy

Description

@mariadb-ThienLy

Input data

Which SQL and options did you provide as input?

CREATE USER newuser@localhost;

Expected Output

CREATE USER newuser@localhost;

Actual Output

CREATE USER newuser @localhost;

Having an extra space before the @ sign doesn't break the execution but it just doesn't look nice. The same thing happens even if I wrap it inside backticks. i.e.

CREATE USER `newuser` @`localhost`;

Usage

  • How are you calling / using the library?
import { formatDialect, mariadb } from 'sql-formatter'

export function formatSQL(v) {
  return formatDialect(v, { dialect: mariadb, tabWidth: 2, keywordCase: 'upper' })
}
  • What SQL language(s) does this apply to? mariadb
  • Which SQL Formatter version are you using? 15.3.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions