On Fri, Apr 22, 2016 at 7:05 PM, Richard Hipp <drh at sqlite.org> wrote:

> In the next release, the ".schema" command will support a command-line
> option "--indent" which does pretty-printing of the schema, turning
> the above into the example shown below.  The pretty-printer is simple
> but it seems to work.


Sounds good. Why not simply --pretty-print? longish, but obvious. --DD

PS: Given that table defs can contain complex expressions in CHECK
constraints,
is it expected to format those expressions too? (I'd love an SQLite API to
format
SQL in general, FWIW. I wouldn't care about the format, or its evolution.)

PPS: Would it indent lines if one uses an inline FK and long CHECK
constraints, or put it all on one line?
I tend to embed newlines in my table defs, which SQLite preserves of
course, but having a canonical and
official way to print table defs, which "overrides" that formatting, sounds
like a good idea to me.

Reply via email to