Spaces:
Sleeping
Sleeping
Download Backend_node/check_schema.js from VashuTheGreat2/ML-Learner: direct link, hf CLI and curl.
- Browser
- Download file 600 Bytes
-
https://huggingface.co/spaces/VashuTheGreat2/ML-Learner/resolve/main/Backend_node/check_schema.js
- Command line
-
hf download hf://spaces/VashuTheGreat2/ML-Learner/Backend_node/check_schema.js
-
curl -L -o check_schema.js https://huggingface.co/spaces/VashuTheGreat2/ML-Learner/resolve/main/Backend_node/check_schema.js
600 Bytes
| import mysql from 'mysql2/promise'; | |
| async function checkSchema() { | |
| let connection; | |
| try { | |
| connection = await mysql.createConnection({ | |
| host: 'localhost', | |
| user: 'root', | |
| password: "Vansh@1234mysql", | |
| database: "ml_learner" | |
| }); | |
| const [rows] = await connection.execute('DESCRIBE questions'); | |
| console.log("Table Schema:"); | |
| console.table(rows); | |
| } catch (error) { | |
| console.error("Error checking schema:", error); | |
| } finally { | |
| if (connection) await connection.end(); | |
| } | |
| } | |
| checkSchema(); | |