1.0.6 • Published 1 year ago

dk-typeorm-spcall v1.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

dk-typeorm-spcall

AIM: providing easy functionality for call SPs using typescript mainly for nestjs

Installation

Install package

npm i --save dk-typeorm-spcall

Configuration

In your module file import provider

import { SpCall } from "dk-typeorm-spcall";

In your @Module add SpCall as a providers

@Module({
    providers: [SpCall]
})

Usage

import { SpCall } from "dk-typeorm-spcall"; // for function call
import { Connection } from "typeorm";

// Inject the dependancy

constructor(
    private spCall: SpCall,
    private connection: Connection,
)

// create your parameters object

const parameters = {
    field1: "value1",
    field2: "value2"
}

const result = await this.spCall.CallMsSqlSp(connection, "spName", parameters);

Here "spName" is the name of storage procedure you want to call and parameters is optional if your storage procedure have any parameters then pass as a argument

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Note

currently support for only MsSql database, we will provide support for other databases very soon.

Thanks and Happy Coding.... 😊

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago