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

Move SQL Query Out of serialReceiver.py Script #4

Open
PeiyuanQi opened this issue Mar 1, 2019 · 4 comments
Open

Move SQL Query Out of serialReceiver.py Script #4

PeiyuanQi opened this issue Mar 1, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@PeiyuanQi
Copy link
Collaborator

Leverage SQL Query code from serialReceiver.py into several functions in a new python file named sqlDriver.py, then serialReceiver.py should import related functions from sqlDriver.py and avoids duplicated code related to sql query in serialReceiver.py.

  • Database configuration (port, host, username, password) should be set in sqlDriver.py, when serialReceiver.py call functions in sqlDriver.py, it only passes parameters related to each table (database name, table name, query column head, etc.)
@PeiyuanQi PeiyuanQi added the enhancement New feature or request label Mar 1, 2019
@adamvnovak
Copy link

I am very interested in working on this task.
Adam

@PeiyuanQi
Copy link
Collaborator Author

I am very interested in working on this task.
Adam

Great Adam, you could first go through the file and understand how the connection is built and what are our query SQL sentences. Then you could try to abstract the code from serialReceiver and warp then with a class. The ultimate goal is create a class, providing some functions to do the same thing to avoid redundant code.

To start
Read the file. Figure out the interfaces to be implemented. Ask questions anytime when you read the file.

@adamvnovak
Copy link

adamvnovak commented Mar 22, 2019 via email

@PeiyuanQi
Copy link
Collaborator Author

This issue is still open to solve

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

No branches or pull requests

3 participants