bpo-36859: Use sqlite3_stmt_readonly API when possible to determine if statement is DML.K by coleifer · Pull Request #13216 · python/cpython · GitHub

github.com

GitHub CopilotWrite better code with AI | MCP RegistryIntegrate external tools | ActionsAutomate any workflow | CodespacesInstant dev environments | IssuesPlan and track work | Code ReviewManage code changes | Code QualityEnforce quality at merge | Why GitHub | Marketplace | View all features | Enterprises | Small and medium teams | Startups | View all use cases | View all industries | View all solutions | AI | Software Development | DevOps | Security | View all topics | Customer stories | Events & webinars | Ebooks & reports | Business insights | Trust center | Partners | View all resources

Tin mới

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

Code ReviewManage code changes

Code QualityEnforce quality at merge

GitHub Advanced SecurityFind and fix vulnerabilities

Code securitySecure your code as you build

Secret protectionStop leaks before they start

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

Use sqlite3_stmt_readonly API to determine is statement is DML.

Skip dml detection + sql comment for old sqlite.

Are UPSERT statements DML statements? coleifer/pysqlite3#4

View reviewed changes

View reviewed changes

Learn more about hiding disruptive comments

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

Address review comments, additional regression test.

awaiting change review

awaiting change review

View reviewed changes

Ensure all non-DML statements that write are covered.

cpython/Lib/sqlite3/test/transactions.py

Move DML detection tests into transactions test module.

bpo-35398: Improve DDL statement detection for SQLite #10913

Fix version-check for sqlite3_stmt_readonly availability.

[WIP] gh-81040: use sqlite3_stmt_readonly() to detect DML statements #24492

sqlite3 dml statement detection does not account for CTEs #81040