1.0.9 • Published 4 months ago
@wdis/db v1.0.9
wdis-db

Help this library and ideia
Please, this library needs help to document and implement other features, if possible, help us.
If you need to understand how it works: see the unit tests, as they are very well structured;
Supported features
DB\Feature | Select | Insert | Delete | Update | Create | Drop | Native | Meta Model |
---|---|---|---|---|---|---|---|---|
SQlite | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
MySql | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
MariaDB | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
PostegreSql | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Oracle | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ |
MS SQL | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ |
CSV | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ |
JSON | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ |
XML | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ |
Property | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ | ⚠️ |
Table legend
✅ Working - 🔜 In progress - ⚠️ Project Intention
Install
npm install @wdis/db
Or
yarn install @wdis/db
Example
// const { WdisDb } = require('@wdis/db');
import { ConfResource, WdisDb } from "@wdis/db";
const confResource: ConfResource = {
resource: 'sqlite3',
url: 'C:\\enviroment\\tmp\\wdis\\db\\sqlite3.db'
};
const wdisDb = new WdisDb(confResource);
let promiseList = wdisDb
.model('user')
.select('id','name','email')
.list();
promiseList.then((userLst:any[]/*OR Type User[]*/)=>{
console.log(JSON.stringify(userLst));
});
Other Examples
Contributing
Pull requests are welcome! If you see something you'd like to add, please do. For drastic changes, please open an issue first.