File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -66,41 +66,6 @@ void sqlQueryMenu(Database& db) {
6666 }
6767}
6868
69- void tableOperationsMenu (Database& db) {
70- while (true ) {
71- cout << " \n Table Operations Menu:\n " ;
72- cout << " 1. Create Table\n " ;
73- cout << " 2. Show Tables\n " ;
74- cout << " 3. Run SQL Query\n " ;
75- cout << " 4. Back to Main Menu\n " ;
76- int choice = readIntPrompt (" Enter your choice: " );
77-
78- switch (choice) {
79- case 1 :
80- {
81- cout << " Enter SQL CREATE TABLE query:\n " ;
82- string query = readLinePrompt (" SQL> " );
83- SQLParser::executeQuery (db, query);
84- }
85- break ;
86-
87- case 2 :
88- db.displayTables ();
89- break ;
90-
91- case 3 :
92- sqlQueryMenu (db); // Call SQL Query Menu
93- break ;
94-
95- case 4 :
96- return ; // Go back to Main Menu
97-
98- default :
99- cerr << " Invalid choice. Try again.\n " ;
100- }
101- }
102- }
103-
10469void mainMenu () {
10570 string dbName;
10671 Database db;
@@ -129,7 +94,7 @@ void mainMenu() {
12994 db = selectDatabase (dbName);
13095 if (db.isValid ()) {
13196 cout << " Database '" << dbName << " ' selected successfully." << endl;
132- tableOperationsMenu (db); // Enter Table Operations Menu
97+ sqlQueryMenu (db);
13398 } else {
13499 cerr << " Failed to select database '" << dbName << " '." << endl;
135100 }
Original file line number Diff line number Diff line change 3737 gap : 10px ;
3838 }
3939
40+ .disclaimer {
41+ position : fixed;
42+ left : 16px ;
43+ top : 42% ;
44+ width : 220px ;
45+ color : var (--muted );
46+ font-size : 13px ;
47+ line-height : 1.4 ;
48+ user-select : none;
49+ pointer-events : none;
50+ }
51+
4052 .title {
4153 color : var (--muted );
4254 font-size : 13px ;
91103 }
92104
93105 @media (max-width : 640px ) {
106+ .disclaimer {
107+ position : static;
108+ width : auto;
109+ padding : 10px ;
110+ }
111+
94112 .app {
95113 padding : 10px ;
96114 }
106124 </ style >
107125</ head >
108126< body >
127+ < div class ="disclaimer "> Disclaimer: The parser will run after a database is selected.</ div >
109128 < div class ="app ">
110129 < div class ="title "> SQL Parser</ div >
111130 < pre id ="terminal "> </ pre >
You can’t perform that action at this time.
0 commit comments