Skip to content

xcy960815/sql-formatter-plush

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sql-formatter-plush

安装

npm install sql-formatter-plush -S

类型声明

export type FromatterConfig = {
    language: "db2"|'n1ql'|'pl/sql'|"plsql"|"redshift"|"spark"|"sql"|"hive" //支持的sql语言 必填
    indent?: string // 缩进多少个空格 默认两个空格
    uppercase?: boolean // 开启大写 默认 false
    linesBetweenQueries?: number  // 查询之间有多少换行符 默认为1
}

type Format = (sql: string, config?: FromatterConfig) => string

export declare const format: Format

使用

import {format} from "sql-formatter-plush"
const newSql = format(<sql语句>)

About

基于sql-formatter的改良版

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published