Langskip | SQL Scripting Best Practices

SQL Scripting Best Practices | Details

Posted on 2020-04-22

About

WIP

I plan on copying or referring to this file for best practices. I admit I might break my own rules and if so, that's a bug!

Checklist

Example checks

theFile=path/to/file
grep -Iirn '^.\{71\}' ${theFile}
tail -c 1 ${theFile}
grep -Iirn '/\*\|\*/' ${theFile}
theFile=path/to/file
sqlformat \
\
--comma_first True\
--indent_columns \
--indent_width 4 \
--wrap_after 70 \
-k upper \
\
-o foo.sql \
\
${theFile}

War stories

See also