@@ -54,15 +54,15 @@ module Connection {
5454 }
5555
5656 /** Gets a reference to an instance of `db.Connection`. */
57- private DataFlow:: Node instance ( DataFlow:: TypeTracker t ) {
57+ private DataFlow:: LocalSourceNode instance ( DataFlow:: TypeTracker t ) {
5858 t .start ( ) and
5959 result instanceof InstanceSource
6060 or
6161 exists ( DataFlow:: TypeTracker t2 | result = instance ( t2 ) .track ( t2 , t ) )
6262 }
6363
6464 /** Gets a reference to an instance of `db.Connection`. */
65- DataFlow:: Node instance ( ) { result = instance ( DataFlow:: TypeTracker:: end ( ) ) }
65+ DataFlow:: Node instance ( ) { instance ( DataFlow:: TypeTracker:: end ( ) ) . flowsTo ( result ) }
6666}
6767
6868/**
@@ -71,26 +71,26 @@ module Connection {
7171 */
7272module cursor {
7373 /** Gets a reference to the `cursor` method on a connection. */
74- private DataFlow:: Node methodRef ( DataFlow:: TypeTracker t ) {
74+ private DataFlow:: LocalSourceNode methodRef ( DataFlow:: TypeTracker t ) {
7575 t .startInAttr ( "cursor" ) and
7676 result = Connection:: instance ( )
7777 or
7878 exists ( DataFlow:: TypeTracker t2 | result = methodRef ( t2 ) .track ( t2 , t ) )
7979 }
8080
8181 /** Gets a reference to the `cursor` method on a connection. */
82- DataFlow:: Node methodRef ( ) { result = methodRef ( DataFlow:: TypeTracker:: end ( ) ) }
82+ DataFlow:: Node methodRef ( ) { methodRef ( DataFlow:: TypeTracker:: end ( ) ) . flowsTo ( result ) }
8383
8484 /** Gets a reference to a result of calling the `cursor` method on a connection. */
85- private DataFlow:: Node methodResult ( DataFlow:: TypeTracker t ) {
85+ private DataFlow:: LocalSourceNode methodResult ( DataFlow:: TypeTracker t ) {
8686 t .start ( ) and
8787 result .asCfgNode ( ) .( CallNode ) .getFunction ( ) = methodRef ( ) .asCfgNode ( )
8888 or
8989 exists ( DataFlow:: TypeTracker t2 | result = methodResult ( t2 ) .track ( t2 , t ) )
9090 }
9191
9292 /** Gets a reference to a result of calling the `cursor` method on a connection. */
93- DataFlow:: Node methodResult ( ) { result = methodResult ( DataFlow:: TypeTracker:: end ( ) ) }
93+ DataFlow:: Node methodResult ( ) { methodResult ( DataFlow:: TypeTracker:: end ( ) ) . flowsTo ( result ) }
9494}
9595
9696/**
@@ -101,7 +101,7 @@ module cursor {
101101 *
102102 * See https://www.python.org/dev/peps/pep-0249/#id15.
103103 */
104- private DataFlow:: Node execute ( DataFlow:: TypeTracker t ) {
104+ private DataFlow:: LocalSourceNode execute ( DataFlow:: TypeTracker t ) {
105105 t .startInAttr ( "execute" ) and
106106 result in [ cursor:: methodResult ( ) , Connection:: instance ( ) ]
107107 or
@@ -116,7 +116,7 @@ private DataFlow::Node execute(DataFlow::TypeTracker t) {
116116 *
117117 * See https://www.python.org/dev/peps/pep-0249/#id15.
118118 */
119- DataFlow:: Node execute ( ) { result = execute ( DataFlow:: TypeTracker:: end ( ) ) }
119+ DataFlow:: Node execute ( ) { execute ( DataFlow:: TypeTracker:: end ( ) ) . flowsTo ( result ) }
120120
121121/** A call to the `execute` method on a cursor (or on a connection). */
122122private class ExecuteCall extends SqlExecution:: Range , DataFlow:: CallCfgNode {
0 commit comments