siddharth23 / cypress-postgres

Use this plugin to query Postgres database and use response in cypress tests
https://github.com/siddharth23/cypress-postgres
7 stars 10 forks source link

pass multiple dburi #1

Closed falguncontractor closed 4 years ago

falguncontractor commented 4 years ago

Hi , is there any way , i can pass the databaseUri to connect and query. with this setup i can connect a single database instance only

siddharth23 commented 4 years ago

Hi Falgun, Thanks for your feedback. Have updated the plugin and readme to support multiple DBS. Let me know if any more features you expecting or facing any issues. With Regards Siddharth Kala

On Fri, Aug 14, 2020 at 1:15 PM falgun2411 notifications@github.com wrote:

Hi , is there any way , i can pass the databaseUri to connect and query. with this setup i can connect a single database instance only

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/siddharth23/cypress-postgres/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXJNQVFDNVKDHNDLNEA6EDSATTTFANCNFSM4P7HKKEA .

falguncontractor commented 4 years ago

HI Siddharth,

Thanks a lot , checked in my current code and it works fine. saved lot of time. I really appreciate this quick support . Note: If the result as multiple rows then there is array of rows , perfect.

        cy.task("dbQuery", {"query":postgres_query_getStatus,"connection":connection}).then(queryResponse => {
            console.log(queryResponse)
            cy.log(queryResponse[0].event_id)

        });

Thanks a lot.

siddharth23 commented 4 years ago

Closing the issue as been fixed now