File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
lib/semmle/python/frameworks
test/library-tests/frameworks/stdlib Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -2435,9 +2435,14 @@ private module StdlibPrivate {
24352435 * against a database.
24362436 *
24372437 * See https://devdocs.io/python~3.9/library/sqlite3
2438+ * https://github.com/python/cpython/blob/3.11/Lib/sqlite3/dbapi2.py
24382439 */
24392440 class Sqlite3 extends PEP249:: PEP249ModuleApiNode {
2440- Sqlite3 ( ) { this = API:: moduleImport ( "sqlite3" ) }
2441+ Sqlite3 ( ) {
2442+ this = API:: moduleImport ( "sqlite3" )
2443+ or
2444+ this = API:: moduleImport ( "sqlite3" ) .getMember ( "dbapi2" )
2445+ }
24412446 }
24422447
24432448 // ---------------------------------------------------------------------------
Original file line number Diff line number Diff line change 66
77cursor = db .cursor ()
88cursor .execute ("some sql" , (42 ,)) # $ getSql="some sql"
9+
10+ import sqlite3 .dbapi2
11+ conn = sqlite3 .dbapi2 .connect ()
12+ cursor = conn .cursor ()
13+ cursor .execute ("some sql" ) # $ getSql="some sql"
You can’t perform that action at this time.
0 commit comments