Comments (3)
when I format your example, I get:
select emp_id, name, dept,
from employees
;
What would you like to see? Do you want to enforce the presence of a trailing comma? Or treat it like black's magic trailing comma (to prevent collapsing onto one line)?
from sqlfmt.
mostly just curious if anything needs to be changed from sqlfmt's perspective to support this. didn't want the trailing comma to be removed because it's now valid.
and yeah, i saw the same result and that's why i wasn't certain if anything needs to be done.
from sqlfmt.
I don't think we need to change anything, but I'll leave this open as a feature request for a "magic trailing comma" feature
from sqlfmt.
Related Issues (20)
- integer division // operator reformatted as comment HOT 2
- for...else...endfor statement does not work HOT 1
- Column formatting breaks with unary operators HOT 2
- Parsing error on valid SQL using string literals with single quotes HOT 1
- One specific BQ-DBT SQL file gets wrongly formatted and becomes unusable
- Support formatting stdin? HOT 2
- Support pg-promise Query Files with Named Parameters HOT 2
- Case-sentitive identifiers within object navigation expressions are lowercased HOT 2
- Request: Support leading commas HOT 1
- sqlfmt incorrect reformatted JSON access path, breaking all accesses. HOT 1
- parsing error for postgress set HOT 3
- sqlfmt adds an extra space to PostgreSQL double tilda operators (`LIKE` alias) HOT 3
- Support Python format/f-string as templater
- PostgreSQL formatting of extensions is broken HOT 2
- Request: Implement in compiled language HOT 1
- Support for formatting SQL code blocks in Markdown HOT 2
- Table name containing the restricted keyword "case" triggers an error HOT 4
- Unstable indentation in jinja `set` tag with triple-quoted, multiline strings HOT 2
- exists inside select when select items are on separate lines HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlfmt.