Skip to content

Commit 86f57fa

Browse files
authored
Merge pull request #82 from oslabs-beta/dev
Merge from oslabs-beta
2 parents 19750ee + 52ac6b3 commit 86f57fa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+3164
-11816
lines changed

README.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
### Key Features
2424

25-
1. **Database Connection:** Connect to a PostgreSQL database
25+
1. **Database Connection:** Connect to a SQL database
2626

2727
2. **Database File Upload:** Upload a database's SQL file
2828

@@ -38,6 +38,17 @@
3838

3939
8. **Time Travel:** Provides a history of edits for easier backtracking
4040

41+
9. **Exporting Queries:** Allows updated changes of queries to be saved as a SQL file for client imports to their database
42+
43+
10. **Log Modeling:** Provides a tool for admins to pull, view, modify, and export log settings from an existing database
44+
45+
11. **Compatible SQL Database:** Current dbSpy is compatible with PostgreSQL and MySQL database
46+
47+
12. **Dark Mode** Additional visual setting to provide a more comfortable viewing experience in low-light environements
48+
49+
13. **Database Integrity Assurance** Database Logic Check is performed as the client edits the database to ensure the integrity of the database
50+
51+
14. **Visualizing Individual Table Connections** Relationships of individual tables are now easily identified when clicking on a table.
4152
---
4253

4354
### Use Cases
@@ -52,6 +63,21 @@ Renders an ER diagram of the existing database and provides an interface for use
5263
Renders an ER diagram for the provided SQL file (db dump) and provides an interface for a user to both modify existing tables and create new tables. Changes are converted into the corresponding queries, which the user can view and execute on their own database outside of dbSpy.
5364
</ul>
5465
</details>
66+
<details><summary>Exporting executable SQL query with every modification to your schema</summary>
67+
<ul>
68+
After modifying/editing the database schemas, users are now able to generate executable queries isolated from their database which decreases security concerns. Users are able to append all the query changes at the end of the new file and save this in their local machines.
69+
</ul>
70+
</details>
71+
<details><summary>Logging modeling</summary>
72+
<ul>
73+
After connnection to the database is made the user can view, modify and save the current log settings. This will assist database administrators in keeping efficient log setup in mind during the early stages of DB modeling
74+
</ul>
75+
</details>
76+
<details><summary>Seamlessly visualize relational database</summary>
77+
<ul>
78+
After connecting database tables with one another, users are able to render the relationship connections of individual tables by clicking on the tables.
79+
</ul>
80+
</details>
5581
<details><summary>Starting an ER diagram from scratch</summary>
5682
<ul>
5783
Provides a canvas for users to create a database by using ER diagrams, thus creating a blueprint for engineering database structures.
@@ -97,10 +123,19 @@ Starting an ER diagram from scratch
97123

98124
Below is a list of features and improvements to which you can contribute. If you have any additional ideas, please raise the issue or implement them as well!
99125

100-
- Screenshot feature - The screenshot feature does presently does not capture the tables with the arrows. It would be best if the features captures everything as it is rendered on the canvas.
101-
- SQL File Export feature (for new databases) - After a user creates a database from scratch on dbSpy, this feature would create a SQL file with a list of executable queries for them to create that new database on their own.
102-
- SQL File Export feature (for existing databases) - After a user makes changes to their database's schema, this feature would create a SQL file with a list of executable queries for them to execute those changes on their existing database.
126+
- Screenshot feature - The screenshot feature does presently capture the tables but the arrows do not align correctly in the screenshot. It would be best if the features captures everything as it is rendered on the canvas.
127+
- Front-End Optimization - Sprite sheet does not render in browser.
128+
- Connecting to elephant SQL database - When connecting to elephant SQL to grab the data from the database, it takes a really long time to load (approximately 2 minutes), optimize the backend so pulling and parsing data doesn't take as long.
129+
- Logging needs a default settings list and direct reimport into live database. The SQL code to import has been placed into the DB_Schemas folder along with SQL Schema dumps. Also, log setting functionality is currently limited to Postgres databases and the code needs to be expanded to query and display log setting info from MySQL databases
130+
- Security setting models need to be put in place for database tables as well as log files.
131+
- Db-schemas - the schemas are saved under db_schemas and is saved in the server. Have a way to delete the schemas on the server from the front end. It would also be convenient to add these schemas to a list of existing schemas and be able to pull these schemas to display for the user to avoid having to make a new connection to the same database multiple times.
132+
- MySQL database connection - the connection feature currently is not compatible with MySQL database. During development phase, a MySQL database stored at the Google Cloud is used for testing. An authorization issue with Google is met when performing data dump. Suggests to try other MySQL server for development testing.
133+
- Expand compatibility with other SQL database such as Oracle SQL, Microsoft SQL, IBM Db2, etc
134+
-Scrollable Canvas - Able to edit tables and scroll on the right side of the canvas, scrolling does not work on the left side of the canvas. If tables are populated or pushed outside of the canvas on the left side, that table disappears, need to enable scrolling on left side.
135+
- Testing - The current result of the supertest could vary based on which mode it is tested on, development or production. When tested in development mode (commented out line 83-84 in server.js), the supertest result would pass with the expected content-type "text, html" returned from the server. However, when the supertest is tested in the production mode, it would fail with 404 Error.
136+
- The current unit test will fail due to ES module error. Have tried to reconfigure webpack by declaring "module: type", rebuild jest configure file...
103137
- Refactoring - We need help refactoring the codebase according to the Airbnb style guide.
138+
- Refactoring typescript - Right now, there are an abundance of any's in the types.
104139

105140
---
106141

@@ -148,6 +183,10 @@ $ npm run dev
148183
- John Paul Adigwu • [LinkedIn](https://www.linkedin.com/in/johnpaul-adigwu/)[Github](https://github.com/engineerous)
149184
- Kevin Park-Lee • [LinkedIn](https://www.linkedin.com/in/kevin38424/)[Github](https://github.com/kevin38424)
150185
- Tarik Mokhtech • [LinkedIn](http://linkedin.com/in/tarik-mokhtech)[Github](https://github.com/MockTech)
186+
- Brett Guidry • [LinkedIn](https://www.linkedin.com/in/brett-guidry-6b6085107/)[Github](https://github.com/Lurkbot9000)
187+
- Emil Mebasser• [LinkedIn](https://www.linkedin.com/in/emil-mebasser-a1a2a815/)[Github](https://github.com/ejmebasser)
188+
- Mimi Le • [LinkedIn](https://www.linkedin.com/in/my-le-a94575226/)[Github](https://github.com/kawaiiyummy14)
189+
- Samson Lam • [LinkedIn](https://www.linkedin.com/in/samson-lam-455846219/)[Github](https://github.com/sflam2013)
151190

152191
---
153192

client/App.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import Home from "./pages/Home";
44
import DBDisplay from "./pages/DBDisplay";
55
import Login from "./pages/Login";
66
import Signup from "./pages/Signup";
7+
import "./styles.css"
8+
9+
710

811
export default function App() {
912
/*

client/Store.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { query } from "express";
2+
13
/* Global State: Store - class object*/
24
class Store {
35
store: Map<{}, {}>;
@@ -7,7 +9,7 @@ class Store {
79
userDBInfo: object;
810
queryInd: number;
911
queries: Map<{}, {}[]>;
10-
queryList: {}[];
12+
queryList: any;
1113
counter: number;
1214

1315
/* Description for each global state:
@@ -59,7 +61,6 @@ class Store {
5961
this.loadedFile = false;
6062
this.connectedToDB = false;
6163
this.userDBInfo = {};
62-
6364
this.counter = 0;
6465
}
6566

@@ -128,8 +129,17 @@ class Store {
128129
getCounter() {
129130
return this.counter;
130131
}
131-
}
132132

133+
disconnect1() {
134+
this.connectedToDB = false;
135+
}
136+
137+
exportData() {
138+
const exportData = this.queryList.map((element: any) => element['query'])
139+
return (exportData)
140+
}
141+
142+
}
133143
//instance of Store object and assign it to "DataStore"
134144
const DataStore = new Store();
135145
export default DataStore;

client/assets/spritesheet.png

4.05 KB
Loading

0 commit comments

Comments
 (0)