astradb
v2.0.1
Published
Fast NoSQL database with MongoDB-compatible API
Maintainers
Readme
AstraDB
Fast NoSQL database with MongoDB-compatible API.
New in 2.0.1 🎉
- ✅ Schema validation support
- ✅ Fixed duplicate insert bug
- ✅ Improved performance
- ✅ Better error handling
Install
```bash npm install astradb ```
Quick Start
```javascript const { AstraDB } = require('astradb');
const client = new AstraDB('astradb://localhost:8080'); await client.connect();
const users = client.db('myapp').collection('users'); await users.insertOne({ name: 'Alice', age: 25 }); ```
Schema Support (v2.0.0)
```javascript // Define schema via API const schema = { name: { type: 'string', required: true }, age: { type: 'number', min: 18, max: 120 } };
// Schema validated on insert automatically! ```
License
MIT
