0.1.1 • Published 7 months ago

vilas.js v0.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

About my project

  • author: ViceMusic5
  • email: xarnudvilas@gmail.com
  • 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

  1. 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()
  1. change the method of disconnection

    Controller.Strategy.disConnect()

    swift

    Controller.disConnect()

1. api

  • constructor:

    FunctionIntroparametersreturn
    DBC(constructor)const DBC=require('vilas')Object of arguments({database , url, username, password, databaseName, port})DBC Object
  • properties of DBC

    FunctionIntroparameterreturn
    disConnectDBC.disConnect()---------
  • function of Strategy in DBC

    FunctionIntroparameterreturn
    queryDBC.Strategy.query()parameter:array, filter:array,tableName:stringpromise