tdbc::tokenize

https://www.tcl-lang.org/man/tcl8.6/TdbcCmd/tdbc_tokenize.htm

tdbc::tokenize string

Splits apart some SQL to find the bound variables it includes while being aware of SQL quoting, string literals and comments. Returns a list consisting of some SQL text, an extracted variable, some SQL, a variable, etc.