Thanks for using the TrueNAS Community Edition issue tracker! TrueNAS Enterprise users receive direct support for their reports from our support portal.

Expand `__[POSTCOMPILE_encrypted_provider_1` into valid SQL syntax

Description

PR: https://github.com/truenas/middleware/pull/8139

SQLAlchemy includes a variant on a bound parameter known as `BindParameter.expanding`,
which is a “late evaluated” parameter that is rendered in an intermediary state when
a SQL construct is compiled, which is then further processed at statement execution
time when the actual known values are passed. “Expanding” parameters are used for
`ColumnOperators.in_()` expressions by default so that the SQL string can be safely
cached independently of the actual lists of values being passed to a particular
invocation of `ColumnOperators.in_()`.

We need to render the `IN` clause with real bound parameter symbols as we store these
statements in HA database journal and execute them in a lower-level connection that
does not support these SQLAlchemy substitutions.

Problem/Justification

None

Impact

None

Activity

Show:
Complete

Details

Assignee

Reporter

Labels

Time remaining

0m

Components

Fix versions

Priority

Katalon Platform

Created January 15, 2022 at 12:04 AM
Updated August 19, 2022 at 1:00 PM
Resolved January 19, 2022 at 3:36 PM