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

Refactor docker #16

Merged
merged 9 commits into from
Aug 27, 2020
Merged

Conversation

mstronck
Copy link
Member

Types of changes

  • Bugfix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Refactor (change which changes the codebase without affecting its external behavior)
  • Non-breaking change (fix or feature that would causes existing functionality to work as expected)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Purpose

-Previous version could not access multiple databases
-Previous version did not use the pg package which lead to a lot of extra code
-Previous version did not return query data in row format

Approach

  1. Npm installed 'pg' package
  2. Added modal.ts in backend directory, and created and exported a pool
  3. Required the export from the modal.ts into the main.ts
  4. Changed what happens in the 'execute-query' channel, reduced code.
  5. Altered the docker-compose file to include hostname, networks, and proper ports
  6. Added script to reset docker containers in package.json called containerReset
  7. Altered the 'return-execute-query' channel in MainPanel.tsx to just console log the result it receives from the backend , which is now the return data in the rows format
  8. Added comments to 'upload-file' channel in main.tsx
  9. Added a changeDB function to the modal export that changes the PG_URI to route to the desired database
  10. Made it so if a person queries "\c defaultDB" it will connect them to the proper database
  11. Added automatic route connecting when a database file is imported so that the user does not need to type in '\c dbName' in order to connect to their newly imported database.

Learning

-https://docs.docker.com/compose/networking/
-https://medium.com/coderbunker/rapid-api-development-tutorial-with-docker-postgresql-postgraphile-e387c1c73dd8

Screenshot(s)

RowFormat

modal

docker-compose

execute-query

Copy link
Contributor

@catherinechiu catherinechiu left a comment

Choose a reason for hiding this comment

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

amazing job, mercer!

Copy link
Contributor

@muhammadtrad muhammadtrad left a comment

Choose a reason for hiding this comment

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

Looks great!

@muhammadtrad muhammadtrad merged commit efa6b8d into open-source-labs:staging Aug 27, 2020
Copy link
Contributor

@FrankNorton32 FrankNorton32 left a comment

Choose a reason for hiding this comment

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

After testing, and local debugging, it works.

frakes413 pushed a commit to frakes413/SeeQR that referenced this pull request Oct 3, 2020
Added a Dummy Data Modal Component (front-end functionality)
chrisakinrinade pushed a commit that referenced this pull request Jan 7, 2021
cindychau added a commit that referenced this pull request Feb 25, 2021
Create database modal and edit colors
JBradbeer pushed a commit that referenced this pull request Apr 28, 2022
Frynoceros pushed a commit that referenced this pull request Aug 4, 2022
Hiya-its-Aya pushed a commit that referenced this pull request Feb 23, 2023
derekoko added a commit that referenced this pull request Aug 24, 2023
lovelyjoy1991 pushed a commit that referenced this pull request Jun 5, 2024
docs: updated dev readme to include roadmap info, deleted roadmap
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.

5 participants