Skip to content

Instantly share code, notes, and snippets.

@jordic
Created May 22, 2020 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jordic/1e56456b5fc6ec4774e508824ec1b76b to your computer and use it in GitHub Desktop.
Save jordic/1e56456b5fc6ec4774e508824ec1b76b to your computer and use it in GitHub Desktop.
dedent
import textwrap
sql = textwrap.dedent("""
SELECT t1.field1,
t2.field2,
t3.field3
FROM table1 t1
INNER JOIN table2 t2 using(id_relation)
WHERE t1.pk = $1
""")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment