SQLWriter

class felis.db.utils.SQLWriter(file=None)

Bases: object

Write SQL statements to stdout or a file.

Parameters:

file (Optional[IO[str]], default: None) – The file to write the SQL statements to. If None, the statements will be written to stdout.

Methods Summary

write(sql, *multiparams, **params)

Write the SQL statement to a file or stdout.

Methods Documentation

write(sql, *multiparams, **params)

Write the SQL statement to a file or stdout.

Statements with parameters will be formatted with the values inserted into the resultant SQL output.

Parameters:
  • sql (Any) – The SQL statement to write.

  • *multiparams (Any) – The multiparams to use for the SQL statement.

  • **params (Any) – The params to use for the SQL statement.

Return type:

None

Notes

The functions arguments are typed very loosely because this method in SQLAlchemy is untyped, amd we do not call it directly.