Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[develop < T0005-GA] Add execute option to query builder #92

Merged
merged 4 commits into from
Mar 9, 2022

Conversation

g-despot
Copy link
Contributor

@g-despot g-despot commented Feb 14, 2022

  • Save a list of clauses that are used when constructing queries with the query builder
  • Check if the RETURN clause was used in the query builder to call execute() instead of execute_and_fetch()

@g-despot g-despot added the status: ready PR is ready for review label Feb 23, 2022
@g-despot g-despot self-assigned this Feb 23, 2022
@@ -372,28 +372,33 @@ class DeclarativeBase(ABC):
def __init__(self, connection: Optional[Union[Connection, Memgraph]] = None):
self._query: List[Any] = []
self._connection = connection if connection is not None else Memgraph()
self._clauses: List[DeclarativeBaseTypes] = []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we planning some extensive use of this list of clauses? It seems to me that as of now it is being read from only to check if there is "RETURN" statement. If we have some plans around this list, then ok, otherwise, i would replace it with simple boolean

Copy link
Contributor

@BorisTasevski BorisTasevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self._clauses in DeclarativeBase seem overengineered as of now. Let's iterate on it a bit

@g-despot g-despot requested a review from BorisTasevski March 2, 2022 06:33
@g-despot g-despot merged commit b34c162 into develop Mar 9, 2022
@g-despot g-despot deleted the T0005-GA-add-execute-to-query-builder branch March 9, 2022 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants