@@ -506,33 +506,58 @@ def path_ids_list(
506
506
if self == target_node :
507
507
return [[self .id ]]
508
508
509
+
510
+ downward_clauses , upward_clauses = ("" , "" )
511
+ query_parameters = {
512
+ "starting_node" : self .id ,
513
+ "ending_node" : target_node .id ,
514
+ "max_depth" : max_depth ,
515
+ "max_paths" : max_paths ,
516
+ }
517
+
518
+ limiting_fk_nodes_instance = kwargs .get ("limiting_fk_nodes_instance" , None )
519
+ limiting_fk_edges_instance = kwargs .get ("limiting_fk_edges_instance" , None )
520
+ excluded_nodes_queryset = kwargs .get ("excluded_nodes_queryset" , None )
521
+ excluded_edges_queryset = kwargs .get ("excluded_edges_queryset" , None )
522
+ required_nodes_queryset = kwargs .get ("required_nodes_queryset" , None )
523
+ required_edges_queryset = kwargs .get ("required_edges_queryset" , None )
524
+
525
+ if limiting_fk_nodes_instance is not None :
526
+ pass # Not implemented yet
527
+
528
+ if limiting_fk_edges_instance is not None :
529
+ pass # Not implemented yet
530
+
531
+ if excluded_nodes_queryset is not None :
532
+ pass # Not implemented yet
533
+
534
+ if excluded_edges_queryset is not None :
535
+ pass # Not implemented yet
536
+
537
+ if required_nodes_queryset is not None :
538
+ pass # Not implemented yet
539
+
540
+ if required_edges_queryset is not None :
541
+ pass # Not implemented yet
542
+
543
+
509
544
with connection .cursor () as cursor :
510
545
cursor .execute (
511
546
DOWNWARD_PATH_QUERY .format (
512
547
relationship_table = edge_model_table ,
513
- # downward_clauses=downward_clauses
548
+ downward_clauses = downward_clauses
514
549
),
515
- {
516
- "starting_node" : self .id ,
517
- "ending_node" : target_node .id ,
518
- "max_depth" : max_depth ,
519
- "max_paths" : max_paths ,
520
- },
550
+ query_parameters
521
551
)
522
552
path = [row [0 ] + [target_node .id ] for row in cursor .fetchall ()]
523
553
if not path and not directional :
524
554
with connection .cursor () as cursor :
525
555
cursor .execute (
526
556
UPWARD_PATH_QUERY .format (
527
557
relationship_table = edge_model_table ,
528
- # upward_clauses=upward_clauses
558
+ upward_clauses = upward_clauses
529
559
),
530
- {
531
- "starting_node" : self .id ,
532
- "ending_node" : target_node .id ,
533
- "max_depth" : max_depth ,
534
- "max_paths" : max_paths ,
535
- },
560
+ query_parameters
536
561
)
537
562
path = [
538
563
[target_node .id ] + row [0 ][::- 1 ] for row in cursor .fetchall ()
0 commit comments