metal-dao
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Data Access Decorator

import { init, query } from "metal-dao";

function callback (query: string, params:any[], target: object, propertyKey: string, context?: string){
    // will be called later
    return "data"
}
class DaoTEST {
	@query("select * from TEST","connection 2")
	async find(a: number, b: string):Promise<any> {
		throw -1;
	}
}

const daoTest = new DaoTest();
const rt = await daoTest.find(1, "2");

Readme

Keywords

none

Package Sidebar

Install

npm i metal-dao

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

4.99 kB

Total Files

10

Last publish

Collaborators

  • sunxufei