Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
fa91f73
Updated modules to latest on 5/2024 (eslint exception), removed unuse…
michaelma7 May 14, 2024
af629b5
add redux and redux toolkit
michaelma7 May 15, 2024
7b7c64d
update from render to createRoot and font import statement
michaelma7 May 15, 2024
1218b04
revert change of eslint to original config
michaelma7 May 15, 2024
92ed050
Merge pull request #1 from oslabs-beta/mma/moduleupdate
misterjoecool May 15, 2024
38c92cd
v 13
michaelma7 May 15, 2024
d046975
Merge branch 'dev' of github.com:oslabs-beta/SeeQR into dev
michaelma7 May 15, 2024
e9fc07f
chore:removed mention of codemirror, chore: changed electron/packager…
michaelma7 May 15, 2024
42f7446
updating configs since require deprecated on several dependencies
michaelma7 May 16, 2024
9881c66
can run program after changes
michaelma7 May 16, 2024
9505db2
revert fix-path to 3.0 for esm bug
michaelma7 May 18, 2024
da85ac9
y
May 18, 2024
2cd26e5
w
May 18, 2024
411a4c4
uiux commit
lovelyjoy1991 May 20, 2024
bb9406f
before changing types structure
michaelma7 May 20, 2024
55b3ab7
save before change stepper
lovelyjoy1991 May 20, 2024
f1633d4
chore: moved all repeated types to one file, chore: changed all impor…
michaelma7 May 20, 2024
ad52440
finished chore: moving types to one file, chore: update other import …
michaelma7 May 21, 2024
3b73fdd
btn revised on quickStartView
lovelyjoy1991 May 21, 2024
cdbbb52
add hover feature for steppers
lovelyjoy1991 May 21, 2024
b0076be
revise import
lovelyjoy1991 May 21, 2024
cac4036
Update settings.json
lovelyjoy1991 May 21, 2024
bdd759a
Merge pull request #2 from oslabs-beta/mma/debug
lovelyjoy1991 May 21, 2024
11d3139
chore
michaelma7 May 21, 2024
73c2a49
add and delete comments
lovelyjoy1991 May 21, 2024
2c9551d
Merge branch 'dev' into joy/newfrontend
misterjoecool May 21, 2024
8d984a4
Merge pull request #3 from oslabs-beta/joy/newfrontend
misterjoecool May 21, 2024
5dcdb65
fixed uncaught bugs with typescript
michaelma7 May 22, 2024
5c90b6b
Merge branch 'dev' into mma/debug
michaelma7 May 22, 2024
8f13e51
Merge pull request #4 from oslabs-beta/mma/debug
navaiva May 22, 2024
4fde1bd
working in testing
May 22, 2024
d9b0ff2
revise back btn display and delete unused css
lovelyjoy1991 May 22, 2024
f3d563d
Merge branch 'dev' into joy/newfrontend
lovelyjoy1991 May 22, 2024
68da099
fix back btn outline on step1 and move QSV styles inside this file
lovelyjoy1991 May 22, 2024
3cbbf2f
revise png declarations & eslint issues
lovelyjoy1991 May 22, 2024
72bec43
typo
lovelyjoy1991 May 22, 2024
b3aec5a
replace context api with redux
Tingg123 May 22, 2024
711e3fb
Merge branch 'dev' into ting/redux-toolkit
Tingg123 May 22, 2024
94e9dbf
Merge branch 'dev' of https://github.com/oslabs-beta/SeeQR into dev
May 22, 2024
0f2a3c9
fiished bugs
Tingg123 May 22, 2024
46d5fc6
testing
May 22, 2024
10d4e36
Update package.json
lovelyjoy1991 May 22, 2024
5cf78df
Update package.json
lovelyjoy1991 May 22, 2024
537489f
Delete shared/types/dbTypes.ts
lovelyjoy1991 May 22, 2024
20e8326
Update main.ts
Tingg-v1 May 22, 2024
0811fda
Merge pull request #7 from oslabs-beta/joy/newfrontend
Tingg-v1 May 22, 2024
4017c42
typo
lovelyjoy1991 May 23, 2024
5ce8428
work
May 23, 2024
6afec9e
Merge branch 'dev' of https://github.com/oslabs-beta/SeeQR into dev
May 23, 2024
e7f30b5
Merge branch 'dev' into devof/dev
May 23, 2024
90e5356
Merge remote-tracking branch 'origin/devof/dev' into devof/dev
May 23, 2024
b65c600
Merge pull request #6 from oslabs-beta/devof/dev
lovelyjoy1991 May 23, 2024
dd5dfda
Update App.tsx
michaelma7 May 24, 2024
68706b4
Update index.tsx
michaelma7 May 24, 2024
9474273
Update store.ts
michaelma7 May 24, 2024
35083e7
Merge branch 'dev' into ting/redux-toolkit
michaelma7 May 24, 2024
4bef71f
Merge pull request #5 from oslabs-beta/ting/redux-toolkit
michaelma7 May 24, 2024
7e2486d
testing
May 24, 2024
feee839
Merge branch 'dev' into joy/newfrontend
lovelyjoy1991 May 28, 2024
5c5284d
finish migrating from context to redux toolkit for appview, menu and …
Tingg123 May 28, 2024
15cfa6b
refactor code in app.tsx and appviewslice, menuslcie and queryslice
Tingg123 May 30, 2024
f960faa
save for work on frontend issue
lovelyjoy1991 May 30, 2024
4e5e350
started redux implementation
michaelma7 May 30, 2024
320964f
Merge branch 'ting' into mma/debug
michaelma7 May 30, 2024
edf25e2
Merge branch 'ting/redux-toolkit2' into joy/debugging
lovelyjoy1991 May 30, 2024
4177b09
save
lovelyjoy1991 May 30, 2024
aa5b38e
w
May 31, 2024
24f79d8
working on login bug
michaelma7 May 31, 2024
a457cf2
Merge branch 'dev' into ting/redux-toolkit
Tingg123 May 31, 2024
09c39a7
fixed typo
Tingg123 May 31, 2024
6c15107
testing
May 31, 2024
33bff94
fixed buttons
michaelma7 Jun 1, 2024
5c3ca9f
finished replacing context api with correct redux function call
Tingg123 Jun 3, 2024
7f24ac7
finished replacing context api with correct redux in app.tsx
Tingg123 Jun 3, 2024
5362042
fixed the state updated in ConfigView.tsx file
Tingg123 Jun 3, 2024
5b6eb10
Merge pull request #8 from oslabs-beta/ting/redux-toolkit
michaelma7 Jun 3, 2024
66cbc67
save before pull down new dev after ting's merge
lovelyjoy1991 Jun 3, 2024
a4a74c0
prevState used to fix login bug
michaelma7 Jun 3, 2024
72e853b
Co-authored-by: tyler-e-spicer <tyler-e-spicer@users.noreply.github.com>
michaelma7 Jun 3, 2024
5d7c01e
Merge branch 'dev' into joy/debugging
lovelyjoy1991 Jun 3, 2024
01512c5
Merge branch 'dev' into ivan/testing
Jun 3, 2024
336d068
fixed Login error: useEffect with prevState
michaelma7 Jun 3, 2024
d0b3e3b
save for checking dev
lovelyjoy1991 Jun 3, 2024
02aa0f6
Merge pull request #9 from oslabs-beta/mma/debug
lovelyjoy1991 Jun 3, 2024
282384c
testing
Jun 3, 2024
44ebddf
Merge branch 'dev' into ivan/testing
Jun 3, 2024
205d535
Merge branch 'dev' into ting/redux-toolkit
Tingg123 Jun 3, 2024
2697834
Merge branch 'joy/debugging' of https://github.com/oslabs-beta/SeeQR …
lovelyjoy1991 Jun 3, 2024
17f373b
resolve the conflict
lovelyjoy1991 Jun 3, 2024
bb4355b
add comments and clean code
lovelyjoy1991 Jun 4, 2024
f84d4dc
added comments to code
michaelma7 Jun 4, 2024
b5d3d37
added the comments on the related files regarding the migrating from …
Tingg123 Jun 4, 2024
d045ce7
Merge branch 'dev' into mma/debug
michaelma7 Jun 4, 2024
5db320e
Update App.tsx
lovelyjoy1991 Jun 4, 2024
de53839
Merge pull request #10 from oslabs-beta/ting/redux-toolkit
lovelyjoy1991 Jun 4, 2024
c25ba69
update the members in core team
Tingg123 Jun 4, 2024
b93bbe9
update the release version badge
Tingg123 Jun 4, 2024
c19a55e
add built with tech
Tingg123 Jun 4, 2024
9873212
Update DEV_ReadMe for V14.0.0
lovelyjoy1991 Jun 5, 2024
142d8ce
Merge branch 'dev' into joy/debugging
lovelyjoy1991 Jun 5, 2024
93c0a26
testing
Jun 5, 2024
0bb8526
revert some UI change on sidebar and bottom btn
lovelyjoy1991 Jun 5, 2024
c9887eb
Merge branch 'dev' into mma/debug
michaelma7 Jun 5, 2024
b38533f
Merge pull request #11 from oslabs-beta/mma/debug
Tingg-v1 Jun 5, 2024
10384a5
Merge branch 'dev' into joy/debugging
lovelyjoy1991 Jun 5, 2024
edca89a
Merge branch 'dev' into ting/redux-toolkit
Tingg123 Jun 5, 2024
1e89956
revise format in DevReadMe
lovelyjoy1991 Jun 5, 2024
686918f
revise format again
lovelyjoy1991 Jun 5, 2024
8f9d6c9
Update configModel.ts
misterjoecool Jun 5, 2024
34ce317
Update config.json
misterjoecool Jun 5, 2024
305a745
Update electron-builder.yml
misterjoecool Jun 5, 2024
4744246
Update App.tsx
misterjoecool Jun 5, 2024
4c2ab67
Update App.tsx
misterjoecool Jun 5, 2024
e30fbba
Update DbEntry.tsx
misterjoecool Jun 5, 2024
4a003f0
Update DbEntry.tsx
misterjoecool Jun 5, 2024
70f0f6a
Update Sidebar.tsx
misterjoecool Jun 5, 2024
86bdbf0
Merge pull request #12 from oslabs-beta/joy/debugging
misterjoecool Jun 5, 2024
09eb246
Merge branch 'dev' into ting/redux-toolkit
Tingg123 Jun 5, 2024
2ff1b4e
Merge pull request #13 from oslabs-beta/ting/redux-toolkit
navaiva Jun 5, 2024
2acf214
testing
Jun 5, 2024
8f5a82f
final touches
Jun 5, 2024
f482829
Merge pull request #14 from oslabs-beta/ivan/testing
michaelma7 Jun 5, 2024
4c1a24b
Merge pull request #15 from oslabs-beta/dev
lovelyjoy1991 Jun 5, 2024
850e642
fixing readme
michaelma7 Jun 5, 2024
e5c2088
Merge branch 'dev' into mma/debug
michaelma7 Jun 5, 2024
b9c3e19
consolidated roadmap to dev readme
michaelma7 Jun 5, 2024
b3c553c
Update README.md
misterjoecool Jun 5, 2024
699a22b
Update README.md
misterjoecool Jun 5, 2024
b4d9795
Merge pull request #16 from oslabs-beta/mma/debug
misterjoecool Jun 5, 2024
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
"rules": {
"react/jsx-filename-extension": [1, { "extensions": [".jsx", ".tsx"] }],

"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],

"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"],

Expand Down Expand Up @@ -69,10 +72,7 @@
"react/jsx-props-no-spreading": "off",

"camelcase": "off"

// "import/no-extraneous-dependencies": ["error", { "devDependencies": true }], **trying to resolve the electron issue
},
// "settings": "import/core-modules: [ electron ]", **trying to resolve the electron issue
"settings": {
"react": {
"version": "detect"
Expand All @@ -84,7 +84,8 @@
"typescript": {
"alwaysTryTypes": true
}
}
},
"import/core-modules": ["electron"] // resolves "electron s/b listed in proj dep, not devDep https://github.com/SimulatedGREG/electron-vue/issues/423
},
"root": true
}
49 changes: 45 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,50 @@
// {
// // Use IntelliSense to learn about possible attributes.
// // Hover to view descriptions of existing attributes.
// // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
// "version": "0.2.0",
// "configurations": [
// {
// "type": "chrome",
// "request": "launch",
// "name": "Launch Chrome against localhost",
// "url": "http://localhost:8080",
// "webRoot": "${workspaceFolder}"
// }
// ]
// }

// New Electron tutorial launch.json code
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"compounds": [
{
"name": "Main + renderer",
"configurations": ["Main", "Renderer"],
"stopAll": true
}
],
"configurations": [
{
"name": "Renderer",
"port": 9222,
"request": "attach",
"type": "chrome",
"webRoot": "${workspaceFolder}"
},
{
"name": "Main",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
},
"args": [".", "--remote-debugging-port=9222"],
"outputCapture": "std",
"console": "integratedTerminal"
},
{
"type": "chrome",
"request": "launch",
Expand All @@ -12,4 +53,4 @@
"webRoot": "${workspaceFolder}"
}
]
}
}
143 changes: 111 additions & 32 deletions DEV_README.md

Large diffs are not rendered by default.

28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<img src="./assets/readmeImages/logo_readme.png" height=300/>

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/oslabs-beta/SeeQR)
![Release: 13.0.0](https://img.shields.io/badge/Release-13.0.0-red)
![Release: 14.0.0](https://img.shields.io/badge/Release-14.0.0-red)
![License: MIT](https://img.shields.io/badge/License-MIT-orange.svg)
![Contributions Welcome](https://img.shields.io/badge/Contributions-welcome-blue.svg)
[![Twitter](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Ftwitter.com%2Ftheseeqr)](https://twitter.com/theseeqr)
Expand All @@ -15,7 +15,7 @@

</div>

### For the latest in-depth docs for v13.0.0, please visit our [docs site](http://www.seeqrapp.com/docs).
### For the latest in-depth docs for v14.0.0, please visit our [docs site](http://www.seeqrapp.com/docs).

## Table of Contents

Expand All @@ -41,6 +41,7 @@ To get started on contributing and editing databases to this project:

- [Electron](https://www.electronjs.org/docs)
- [React](https://reactjs.org/)
- [React-Redux](https://react-redux.js.org/)
- [Typescript](https://www.typescriptlang.org/)
- [PostgreSQL](https://www.postgresql.org/)
- [MySQL](https://www.mysql.com/)
Expand Down Expand Up @@ -76,14 +77,14 @@ To get started on contributing and editing databases to this project:
- Databases

- In the 'DATABASES' view, an interactive Entity Relationship Diagram (`ER DIAGRAM`) is displayed for the selected database.

- Users can now save table layout in version 13.
<br>

<div align="center">
<img src="./assets/readmeImages/gifs/save_db_layout.gif" width=800/>
</div>


- Users can select `TABLE` to see selected database in tabular form.

- Users can select a table from a list of all the tables in the schema of the currently selected database.
Expand Down Expand Up @@ -126,11 +127,12 @@ To get started on contributing and editing databases to this project:
</div>

<br>

- Create/Edit Database

- Users can create a new database from scratch by clicking the `Create New Database` button at the bottom of the sidebar.
- Users can modify the newly created database as well as any existing databases using the `ER Diagram` to create/change/delete tables and columns.
- The `Export` button will write a .sql file on the user's desktop of the selected database.
- Users can create a new database from scratch by clicking the `Create New Database` button at the bottom of the sidebar.
- Users can modify the newly created database as well as any existing databases using the `ER Diagram` to create/change/delete tables and columns.
- The `Export` button will write a .sql file on the user's desktop of the selected database.

<br>
<div align="center">
Expand All @@ -146,11 +148,11 @@ To get started on contributing and editing databases to this project:
- To execute the query, simply select the 'RUN QUERY' button at the bottom of the panel or press 'Ctrl-Enter' on the keyboard.
- Users have the option to run multiple queries, allowing users to obtain more reliable testing results.
- Version 13 introduces a new feature that enables users to access and view previous queries. Upon selecting a previous query, it populates the query input field, allowing users to make edits before executing.
</br>
<br>
<div align="center">
</br>
<br>
<div align="center">

<img src="./assets/readmeImages/gifs/query.gif" width=800/>
<img src="./assets/readmeImages/gifs/query.gif" width=800/>

</div>
<br />
Expand Down Expand Up @@ -206,11 +208,13 @@ The outcome results from each query, both retrieved data and analytics, are stor

## Contributing

We've released SeeQR because it's a useful tool to help optimize SQL databases. Additional features, extensions, and improvements will continue to be introduced. We are thankful for any contributions from the community and we encourage you to try SeeQR out to make or suggest improvements where you see fit! If you encounter any issues with the application, please report them in the issues tab or submit a PR. Thank you for your interest!
We've released SeeQR because it's a useful tool to help optimize SQL databases. Additional features, extensions, and improvements will continue to be introduced. Please refer to the [DEV_README](https://github.com/open-source-labs/SeeQR/blob/main/DEV_README.md) for a list of improvements we are looking to implement and that are open to contributors.

We are thankful for any contributions from the community and we encourage you to try SeeQR out to make or suggest improvements where you see fit! If you encounter any issues with the application, please report them in the issues tab or submit a PR. Thank you for your interest!

## Core Team

[Kevin Chou](https://github.com/choukevin612) |[Zoren Labrador](https://github.com/zorenal) |[Elaine Wong](https://github.com/user-byte123) | [Cathy Luong](https://github.com/cyliang93) | [Derek Koh](https://github.com/derekoko) | [Peter Zepf](https://github.com/peterzepf) | [Tony Gao](https://github.com/tgao17) | [Ching-Yuan Lai (Eric)](https://github.com/paranoidFrappe) | [Jamie Zhang](https://github.com/haemie) | [Julian Macalalag](https://github.com/juzi3) | [Nathan Chong](https://github.com/nathanhchong) | [Junaid Ahmed](https://github.com/junaid-ahmed7) | [Chase Sizemore](https://github.com/ChaseSizemore) | [Oscar Romero](https://github.com/creaturenex) | [Anthony Deng](https://github.com/anthonyadeng) | [Aya Moosa](https://github.com/Hiya-its-Aya) | [Trevor Ferguson](https://github.com/TrevorJFerguson) | [Pauline Nguyen](https://github.com/paulinekpn) | [Utkarsh Uppal](https://github.com/utyvert) | [Fred Jeong](https://github.com/fred-jeong) | [Gabriel Kime](https://github.com/wizardbusiness) | [Chris Fryer](github.com/frynoceros) | [Ian Grepo](https://github.com/RadiantGH) | [Michelle Chang](https://github.com/mkchang168) | [Jake Bradbeer](https://github.com/JBradbeer) | [Bryan Santos](https://github.com/santosb93) | [William Trey Lewis](https://github.com/treyfrog128) | [Brandon Lee](https://github.com/BrandonW-Lee) | [Casey Escovedo](https://github.com/caseyescovedo) | [Casey Walker](https://github.com/cwalker3011) | [Catherine Chiu](https://github.com/catherinechiu) | [Chris Akinrinade](https://github.com/chrisakinrinade) | [Cindy Chau](https://github.com/cindychau) | [Claudio Santos](https://github.com/Claudiohbsantos) | [Eric Han](https://github.com/ericJH92) | [Faraz Akhtar](https://github.com/faraza22) | [Frank Norton](https://github.com/FrankNorton32) | [Harrison Nam](https://github.com/harrynam07) | [James Kolotouros](https://github.com/dkolotouros) | [Jennifer Courtner](https://github.com/jcourtner) | [John Wagner](https://github.com/jwagner988) | [Justin Dury-Agri](https://github.com/justinD-A) | [Justin Hicks](https://github.com/JuiceBawks) | [Katie Klochan](https://github.com/kklochan) | [May Wirapa Boonyasurat](https://github.com/mimiwrp) | [Mercer Stronck](https://github.com/mercerstronck) | [Muhammad Trad](https://github.com/muhammadtrad) | [Richard Guo](https://github.com/richardguoo) | [Richard Lam](https://github.com/rlam108) | [Sam Frakes](https://github.com/frakes413) | [Serena Kuo](https://github.com/serenackuo) | [Timothy Sin](https://github.com/timothysin) | [Vincent Trang](https://github.com/vincentt114)
[Zhijiao Li](https://github.com/lovelyjoy1991) | [Ting Li](https://github.com/Tingg-v1) | [Michael Ma](https://github.com/michaelma7) | [Ivan Navarro](https://github.com/navaiva) | [Joseph Cho](https://github.com/jocho5) | [Kevin Chou](https://github.com/choukevin612) |[Zoren Labrador](https://github.com/zorenal) |[Elaine Wong](https://github.com/user-byte123) | [Cathy Luong](https://github.com/cyliang93) | [Derek Koh](https://github.com/derekoko) | [Peter Zepf](https://github.com/peterzepf) | [Tony Gao](https://github.com/tgao17) | [Ching-Yuan Lai (Eric)](https://github.com/paranoidFrappe) | [Jamie Zhang](https://github.com/haemie) | [Julian Macalalag](https://github.com/juzi3) | [Nathan Chong](https://github.com/nathanhchong) | [Junaid Ahmed](https://github.com/junaid-ahmed7) | [Chase Sizemore](https://github.com/ChaseSizemore) | [Oscar Romero](https://github.com/creaturenex) | [Anthony Deng](https://github.com/anthonyadeng) | [Aya Moosa](https://github.com/Hiya-its-Aya) | [Trevor Ferguson](https://github.com/TrevorJFerguson) | [Pauline Nguyen](https://github.com/paulinekpn) | [Utkarsh Uppal](https://github.com/utyvert) | [Fred Jeong](https://github.com/fred-jeong) | [Gabriel Kime](https://github.com/wizardbusiness) | [Chris Fryer](github.com/frynoceros) | [Ian Grepo](https://github.com/RadiantGH) | [Michelle Chang](https://github.com/mkchang168) | [Jake Bradbeer](https://github.com/JBradbeer) | [Bryan Santos](https://github.com/santosb93) | [William Trey Lewis](https://github.com/treyfrog128) | [Brandon Lee](https://github.com/BrandonW-Lee) | [Casey Escovedo](https://github.com/caseyescovedo) | [Casey Walker](https://github.com/cwalker3011) | [Catherine Chiu](https://github.com/catherinechiu) | [Chris Akinrinade](https://github.com/chrisakinrinade) | [Cindy Chau](https://github.com/cindychau) | [Claudio Santos](https://github.com/Claudiohbsantos) | [Eric Han](https://github.com/ericJH92) | [Faraz Akhtar](https://github.com/faraza22) | [Frank Norton](https://github.com/FrankNorton32) | [Harrison Nam](https://github.com/harrynam07) | [James Kolotouros](https://github.com/dkolotouros) | [Jennifer Courtner](https://github.com/jcourtner) | [John Wagner](https://github.com/jwagner988) | [Justin Dury-Agri](https://github.com/justinD-A) | [Justin Hicks](https://github.com/JuiceBawks) | [Katie Klochan](https://github.com/kklochan) | [May Wirapa Boonyasurat](https://github.com/mimiwrp) | [Mercer Stronck](https://github.com/mercerstronck) | [Muhammad Trad](https://github.com/muhammadtrad) | [Richard Guo](https://github.com/richardguoo) | [Richard Lam](https://github.com/rlam108) | [Sam Frakes](https://github.com/frakes413) | [Serena Kuo](https://github.com/serenackuo) | [Timothy Sin](https://github.com/timothysin) | [Vincent Trang](https://github.com/vincentt114)

## License

Expand Down
50 changes: 50 additions & 0 deletions __tests__/backend/src/db/databaseConnection.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// import mysql from 'mysql2/promise';
import databaseConnections from '../../../../backend/src/db/databaseConnections';
const { PG_DBConnect, PG_DBDisconnect, MSQL_DBConnect, MSQL_DBQuery, RDS_PG_DBConnect, RDS_MSQL_DBConnect, RDS_MSQL_DBQuery, SQLite_DBConnect } = databaseConnections
// import { PoolConfig } from 'pg';




describe('Database Connection Tests', () => {
it('should fail to connect with invalid credentials', async () => {
try {
await PG_DBConnect('postgres://invalid:credentials@localhost/dbname', 'dbname');
} catch (error) {
expect(error).toBeDefined();
}
});
});

describe('MySQL', () => {
const MYSQL_CREDS = {
host: 'localhost',
user: 'username',
password: 'password',
database: 'dbname',
waitForConnections: true,
connectionLimit: 10,
queueLimit: 0,
multipleStatements: true,
};

it('should connect and perform a query successfully', async () => {
await MSQL_DBConnect(MYSQL_CREDS);
await MSQL_DBQuery('dbname');
});

it('should fail to connect with invalid credentials', async () => {
const invalidCreds = {...MYSQL_CREDS, user: 'invalid', password: 'credentials' };
try {
await MSQL_DBConnect(invalidCreds);
} catch (error) {
expect(error).toBeDefined();
}
});
});

describe('SQLite', () => {
it('should connect successfully', () => {
SQLite_DBConnect(':memory:');
});
});
1 change: 1 addition & 0 deletions __tests__/backend/src/mainMenu.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// tests for mainmenu file
2 changes: 2 additions & 0 deletions __tests__/backend/src/models/configModel.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// test for config file

1 change: 1 addition & 0 deletions __tests__/backend/src/models/connectionModel.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// tess for connection model file
Loading