Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Single line for simple queries?#648

Unanswered
mhanberg asked this question inQ&A
Oct 12, 2023· 1 comments· 1 reply
Discussion options

Is it possible to format simple, short queries onto a single line?

Basically instead of

$ echo "select * from foo" | sql-formatter -l sqliteselect  *from  foo

i'd like it to output

$ echo "select * from foo" | sql-formatter -l sqliteselect * from foo
You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

nene
Oct 13, 2023
Maintainer

There is an old feature request for this:#360

But it's unlikely to happen as I've pretty much stopped any new feature development on sql-formatter.

Instead I've incorporated many of the ideas and addressed lots of the shortcomings of this inanother SQL pretty-printing tool that I've been developing. This one pretty much does what you're asking for: if the input SQL is on a single line and it's short enough, the formatter will keep it on a single line.

You must be logged in to vote
1 reply
@mhanberg
Comment options

Gotcha, I'll check out the new project

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@mhanberg@nene

[8]ページ先頭

©2009-2025 Movatter.jp