Skip to content

test(database) :: test that parameters reach the DB and are cached - #1501

Open
81reap wants to merge 1 commit into
mainfrom
81reap/ci-1474
Open

81reap wants to merge 1 commit into
mainfrom
81reap/ci-1474

Conversation

@81reap

@81reap 81reap commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Before a bound parameter had to survive a round trip in tests/transactions and in computed_projection_binding_order.sql, but nothing bound one variable twice in a single statement, and nothing asserted that a parameterized page runs as a prepared statement rather than through SQLExecDirect.

Now two tests cover both halves of sqlx-oldapi#57, one of wich covers the INSERT ... SELECT $x WHERE $x IS NOT NULL shape from #1474.


Stack created with GitHub Stacks CLI • Give Feedback 💬

@81reap
81reap added this pull request to stack #1502 September 25, 2026 22:42
Base automatically changed from 81reap/ci-duckdb to main September 26, 2026 12:32
@81reap
81reap force-pushed the 81reap/ci-1474 branch 2 times, most recently from 4159106 to 50d8484 Compare September 26, 2026 14:56
Before a bound parameter had to survive a round trip in `tests/transactions` and in `computed_projection_binding_order.sql`, but nothing bound one variable twice in a single statement, and nothing asserted that a parameterized page runs as a prepared statement rather than through `SQLExecDirect`.

Now two tests cover both halves of [sqlx-oldapi#57](sqlpage/sqlx-oldapi#57), one of wich covers the `INSERT ... SELECT $x WHERE $x IS NOT NULL` shape from #1474.
SupportedDatabase::Mssql => "/tests/parameter_binding/parameter_in_projection_mssql.sql",
SupportedDatabase::Oracle => return Ok(()), // no CREATE TEMPORARY TABLE
_ => "/tests/parameter_binding/parameter_in_projection.sql",
};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason we can't use the fully sql-based testing mechanism here ? do we need rust at all for these tests ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants