Commit 4316715
committed
fastapi-sqlalchemy-pg-catalog: clarify simple-Query semantics on parameterized SQL
Copilot review noted (correctly) that the README + main.py docstring
described the pg_class probe as "parameter-less SQL", which conflicts
with the recorded mock carrying 7 bind values. psycopg2 in fact uses
the simple-Query protocol even when the source SQL is parameterized:
it substitutes %(param)s placeholders client-side and emits the
resulting inlined SQL as a single Q packet (no Bind/Execute frames).
The bind values exist at the application layer; the wire shape is
simple-Query.
Both docs now say so explicitly so a reader doesn't see the recorded
bind-value list and conclude the wire path must be extended-Query.
Signed-off-by: Akash Kumar <meakash7902@gmail.com>1 parent 3203a0a commit 4316715
2 files changed
Lines changed: 17 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
12 | 18 | | |
13 | 19 | | |
14 | 20 | | |
| |||
0 commit comments