🎯 Live Database Playground
### 🚀 **Transform Your VS Code into a Powerful Database Playground**
*Advanced database playground with AI-powered query generation, inline results, and multi-database support*
[](https://marketplace.visualstudio.com/items?itemName=mzainulabideen.live-database-playground)
[](https://marketplace.visualstudio.com/items?itemName=mzainulabideen.live-database-playground)
[](https://github.com/ZainulabdeenOfficial/Live_Database_VSCode_Extention/blob/HEAD/LICENSE)
[](https://github.com/ZainulabdeenOfficial/Live_Database_VSCode_Extention)
[](https://github.com/ZainulabdeenOfficial/Live_Database_VSCode_Extention)
🚀 Features
🔌 Multi-Database Support
💡 AI-Powered Query Generation
Write natural language comments and let AI generate the perfect query:
// db: get all users with age greater than 25
// Press Ctrl+Shift+G to generate: SELECT * FROM users WHERE age > 25
⚡ Inline Query Execution
Execute queries directly from your code with instant results:
SELECT * FROM users WHERE status = 'active';
🎯 Smart IntelliSense
📊 Beautiful Results Display
🔄 Query History
🛠️ Installation
From VSIX (Recommended)
- Download the latest
.vsix file from releases
- In VS Code, go to Extensions (Ctrl+Shift+X)
- Click the "..." menu and select "Install from VSIX..."
- Choose the downloaded file
From Source
git clone https://github.com/ZainulabdeenOfficial/Live_Database_VSCode_Extention.git
cd Live_Database_VSCode_Extention
npm install
npm run compile
⚙️ Configuration
Database Connections
- Open Command Palette (Ctrl+Shift+P)
- Run "Live DB: Connect to Database"
- Follow the connection wizard
- Save connections for future use
AI Query Generation
- Get an OpenAI API key from OpenAI
- Open VS Code Settings (Ctrl+,)
- Search for "Live Database Playground"
- Enter your API key in
liveDB.openaiApiKey
🎮 Usage
Quick Start
- Connect to Database:
Ctrl+Shift+P → "Live DB: Connect to Database"
- Write a Query: Add a comment like
// db: get all users
- Generate SQL: Press
Ctrl+Shift+G to generate the query
- Execute Query: Press
Ctrl+Shift+Q to run and see results
Natural Language Queries
// db: find all active users who signed up in the last 30 days
// db: count total orders by customer
// db: get the top 10 products by sales
Direct SQL Execution
SELECT u.name, COUNT(o.id) as order_count
FROM users u
LEFT JOIN orders o ON u.id = o.user_id
WHERE u.status = 'active'
GROUP BY u.id, u.name
ORDER BY order_count DESC;
MongoDB Queries
// db: find all users with age greater than 25
db.users.find({ age: { $gt: 25 } })
// db: aggregate orders by month
db.orders.aggregate([
{ $group: { _id: { $month: "$date" }, total: { $sum: "$amount" } } }
])
⌨️ Keyboard Shortcuts
| Shortcut |
Action |
Ctrl+Shift+Q |
Run selected query or query on current line |
Ctrl+Shift+G |
Generate SQL from natural language comment |
Ctrl+Shift+R |
Show results panel |
Ctrl+Shift+P → "Live DB: Connect" |
Connect to database |
🎨 UI Components
Activity Bar
Inline Features
🔧 Advanced Features
Connection Management
Query Optimization
Export & Sharing
🐛 Troubleshooting
Connection Issues
- Verify database server is running
- Check firewall settings
- Ensure correct credentials
- Try SSL connection if needed
AI Generation Issues
- Verify OpenAI API key is set
- Check internet connection
- Ensure sufficient API credits
- Try rule-based generation as fallback
- Limit result set size in settings
- Use pagination for large datasets
- Optimize queries before execution
- Check database server performance
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
git clone https://github.com/ZainulabdeenOfficial/Live_Database_VSCode_Extention.git
cd Live_Database_VSCode_Extention
npm install
npm run watch
Testing
npm test
npm run lint
📁 Repository
GitHub Repository: https://github.com/ZainulabdeenOfficial/Live_Database_VSCode_Extention
📊 Repository Stats
- Language: TypeScript (91.3%), JavaScript (8.7%)
- Stars:

- Forks:

- Issues:

🔗 Quick Links
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
📞 Support
Made with ❤️ for the developer community