Consider the following statement:
text("""
select
url,
(regexp_match(url, '(?<=comments/)([\w\d]{5,6})((/[\w\d]{0,}/)([\w\d]{5,6}))?'))[3] is not null as "isComment"
from submissions s
where
(regexp_match(s.url, '(?<=comments/)([\w\d]{5,6})((/[\w\d]{0,}/)([\w\d]{5,6}))?'))[1] = (regexp_match(lower('\:sqlurl'), '(?<=comments\/)([\w\d]{5,6})((?:\/[\w\d]{0,}\/)([\w\d]{5,6}))?'))[1]
""").bindparams(sqlurl=url).columns(url=String, isComment=Boolean)
When I go to execute it with execute I get
sqlalchemy.exc.ArgumentError: This text() construct doesn't define a bound parameter named 'sqlurl'
even though param :sqlurl is defined. thx