vilas.js
v0.1.1
Published
a simple orm framework
Downloads
2
Maintainers
Readme
About my project
- author: ViceMusic5
- email: [email protected]
- version:0.1.1
just a simple project developed and maintained by a undergraduate
0. The changelog in Usage and How to use this orm frame work
In the 0.1.1 version,we define the methods of introducing:
//import by destructing from vilas const {DBC}=require('vilas') //create Database connection object const Controller=new DBC({ database:'MySQL', url:'127.0.0.1', username: 'root', password:'123456', databaseName: 'deliver_system', port:3306 //optional }) //operate the database by Controller.Strategy.query([],[],'comment').then((result)=>{}) //消除链接,释放对应的资源 Controller.disConnect()
change the method of disconnection
Controller.Strategy.disConnect()
swift
Controller.disConnect()
1. api
constructor:
| Function | Intro | parameters | return | | ---------------- | -------------------------- | ------------------------------------------------------------ | ---------- | | DBC(constructor) | const DBC=require('vilas') | Object of arguments({database , url, username, password, databaseName, port}) | DBC Object |
properties of DBC
| Function | Intro | parameter | return | | ---------- | ---------------- | --------- | ------ | | disConnect | DBC.disConnect() | ----- | ---- |
function of Strategy in DBC
| Function | Intro | parameter | return | | -------- | -------------------- | ---------------------------------------------- | ------- | | query | DBC.Strategy.query() | parameter:array, filter:array,tableName:string | promise |