You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue
Closes #114
背景(Situation)
PostgreSQL 允许多个 schema 使用同一个表名。
db_query_table_exists原先只按数据库和表名查询,无法确认调用方需要的tenant_a.users,与表列表、表描述和代码生成路径的 schema 契约不一致。任务(Task)
为存在性检查增加可选 PostgreSQL
schema,保持 MySQL/SQLite 现有行为和成功 Raw Response 的 JSON 可解析性,并确保 schema 值始终通过驱动参数绑定。行动(Action)
schema。table_schema = %s条件。null。验证(Verification)
环境:Windows 11,Python 3.12.12 / PostgreSQL stub。
PYTHONPATH=src python -m pytest tests/unit/ -q:658 passed。ruff check src tests、变更文件格式检查和git diff --check:通过。实验与证据(Evidence)
stub 对未指定 schema 收到参数
("app", "users"),对tenant_a收到("app", "users", "tenant_a");schema 值不进入 SQL 文本。两种路径的 Raw Response 均可由json.loads解析,并回显字符串或 JSONnull。未建立真实 PostgreSQL 往返性能基准。兼容性、风险与回滚