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

Behavioral Pattern(Iterator) #203

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

timsoriano3
Copy link

Implemented Iterator Behavioral Design Pattern for the for loop in the file temporary_cron.py. This loop originally iterates through a list of query / command to execute.

By implementing this pattern here, instead of using a for loop to iterate over a list of queries, i used the iterator pattern to iterate the queries in the list one by one by using the pattern method has_next(). By using this pattern here, this pattern can also be used anywhere else in the code base that deals with executing a list of queries / commands

Since this the code base deals heavily in manipulating information in databases, this pattern can be used many times in the code base where the action is to execute a list of commands therefore also making it easier to implement in the future when more databases are added in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant