Skip to content

how we can expose stored procedure of MySQL database in rest API using loopback4 #5408

Closed

Description

@kanusoni

Hello,
is there any library or any code available to get the stored procedure of MySQL database into Rest API using loopback4.

Activity

  1. dougal83 commented on May 13, 2020

    @dougal83
    Contributor

    Please see #5101 (comment)

  2. self-assigned this
    on May 14, 2020
  3. deepakrkris commented on May 14, 2020

    @deepakrkris
    Contributor

    @kanusoni please take a look at #3459

    constructor(
    @repository(MyRepository)
    public myRepo: MyRepository,
    ) {
    this.user_Profile = userProfile;
    }
    async testData(
    ): Promise {
    return await this.myRepo.dataSource.execute(EXEC Get_Customer(?), ['CUSTID01']);
    }
    and

    https://loopback.io/doc/en/lb4/apidocs.repository.connector.execute.html

  4. kanusoni commented on May 15, 2020

    @kanusoni
    Author

    @deepakrkris @dhmlau That code you mentioned in #3459 is working fine.
    But what i want is to get the list of stored procedure and execute the stored procedure of MySQL database using an API in loopback4 explorer.
    Thanks.

  5. deleted a comment from kanusoni on May 15, 2020
  6. Arathy-sivan commented on Jun 17, 2020

    @Arathy-sivan

    What is the use of " --save " in mysql loopback4 connector command??
    ( npm install --save loopback-connector-mysql )

  7. achrinza commented on Jun 17, 2020

    @achrinza
    Member

    @Arathy-sivan This is a question with regards to NPM and not specific to LoopBack 4.

    Please see https://stackoverflow.com/questions/19578796/what-is-the-save-option-for-npm-install

  8. locked and limited conversation to collaborators on Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions