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 {
2435
2435
* against a database.
2436
2436
*
2437
2437
* See https://devdocs.io/python~3.9/library/sqlite3
2438
+ * https://github.com/python/cpython/blob/3.11/Lib/sqlite3/dbapi2.py
2438
2439
*/
2439
2440
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
+ }
2441
2446
}
2442
2447
2443
2448
// ---------------------------------------------------------------------------
Original file line number Diff line number Diff line change 6
6
7
7
cursor = db .cursor ()
8
8
cursor .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