mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
Python: Rename cursor => Cursor in PEP249
Notice that since this will be part of the same PR as 5cfc433, it is OK
to do this change without keeping `PEP249::cursor` for backwards
compatibility.
This commit is contained in:
@@ -28,9 +28,9 @@ deprecated class PEP249ModuleApiNode = PEP249::PEP249ModuleApiNode;
|
||||
deprecated module Connection = PEP249::Connection;
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `PEP249::cursor` instead.
|
||||
* DEPRECATED: Use `PEP249::Cursor` instead.
|
||||
*/
|
||||
deprecated module cursor = PEP249::cursor;
|
||||
deprecated module cursor = PEP249::Cursor;
|
||||
|
||||
/**
|
||||
* DEPRECATED: Use `PEP249::execute` instead.
|
||||
|
||||
@@ -78,7 +78,7 @@ module PEP249 {
|
||||
* These are are returned by the `cursor` method on a database connection.
|
||||
* See https://www.python.org/dev/peps/pep-0249/#cursor.
|
||||
*/
|
||||
module cursor {
|
||||
module Cursor {
|
||||
/**
|
||||
* A source of database cursors (following PEP 249), extend this class to model new instances.
|
||||
*
|
||||
@@ -148,7 +148,7 @@ module PEP249 {
|
||||
*/
|
||||
private DataFlow::LocalSourceNode execute(DataFlow::TypeTracker t) {
|
||||
t.startInAttr("execute") and
|
||||
result in [cursor::instance(), Connection::instance()]
|
||||
result in [Cursor::instance(), Connection::instance()]
|
||||
or
|
||||
exists(DataFlow::TypeTracker t2 | result = execute(t2).track(t2, t))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user