Skip to content

Commit 207e442

Browse files
Version bump
1 parent 13f58d4 commit 207e442

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

django_postgresql_dag/query_builders.py

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,9 @@ def _allow_edges(self):
151151

152152
@abstractmethod
153153
def raw_queryset(self):
154+
"""Returns the RawQueryset for this query. Should be extended in child classes"""
154155

155-
# Set the clases here, rather than in init so that we don't keep adding to the
156+
# Set the query clauses here, rather than in init so that we don't keep adding to the
156157
# clauses each time we check/utilize raw_queryset()
157158
self.where_clauses_part_1 = ""
158159
self.where_clauses_part_2 = ""
@@ -167,17 +168,22 @@ def raw_queryset(self):
167168
return
168169

169170
def id_list(self):
171+
"""Returns a list of ids in the resulting query"""
170172
return [item.pk for item in self.raw_queryset()]
171173

172174
def __str__(self):
175+
"""Returns a string representation of the RawQueryset"""
173176
return str(self.raw_queryset())
174177

175178
def __repr__(self):
179+
"""Returns a string representation of the RawQueryset"""
176180
return str(self.raw_queryset())
177181

178182

179183
class AncestorQuery(BaseQuery):
180-
"""Ancestor Query Class"""
184+
"""
185+
Ancestor Query Class
186+
"""
181187

182188
def __init__(self, **kwargs):
183189
super().__init__(**kwargs)
@@ -303,7 +309,9 @@ def raw_queryset(self):
303309

304310

305311
class DescendantQuery(BaseQuery):
306-
"""Descendant Query Class"""
312+
"""
313+
Descendant Query Class
314+
"""
307315

308316
def __init__(self, **kwargs):
309317
super().__init__(**kwargs)
@@ -423,7 +431,9 @@ def raw_queryset(self):
423431

424432

425433
class ConnectedGraphQuery(BaseQuery):
426-
"""Queries for the entire graph of nodes connected to the provided instance node"""
434+
"""
435+
Queries for the entire graph of nodes connected to the provided instance node
436+
"""
427437

428438
def __init__(self, **kwargs):
429439
super().__init__(**kwargs)
@@ -477,7 +487,9 @@ def raw_queryset(self):
477487

478488

479489
class UpwardPathQuery(BaseQuery):
480-
"""Upward Path Query Class"""
490+
"""
491+
Upward Path Query Class
492+
"""
481493

482494
def __init__(self, **kwargs):
483495
super().__init__(**kwargs)
@@ -586,7 +598,9 @@ def raw_queryset(self):
586598

587599

588600
class DownwardPathQuery(BaseQuery):
589-
"""Downward Path Query Class"""
601+
"""
602+
Downward Path Query Class
603+
"""
590604

591605
def __init__(self, **kwargs):
592606
super().__init__(**kwargs)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44
from setuptools import setup
55

6-
version = '0.1.1'
6+
version = '0.1.2'
77

88
classifiers = [
99
"Development Status :: 3 - Alpha",

0 commit comments

Comments
 (0)