-
-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
I am calling stored procedure using mysql client and I am getting responses on every second request.
Please check below code and response.
import { Client } from "https://deno.land/x/mysql@v2.6.1/mod.ts";
import Dex from "https://deno.land/x/dex/mod.ts";
const database = "mysql";
let dex = Dex({ client: database });
const client = await new Client().connect({
hostname: "localhost",
username: "app",
password: "123456",
db: "test_db"
});
var query = dex.raw(" CALL test_getDataUsingSP(?, ?, ?, ?); ", [objParam.fromDate, objParam.toDate, objParam.loggedUserId, objParam.userTypeId]).toString();
const response: any = await client.query(query);
console.log(query)
console.log("response length : ", response.length)
Below are the response we got.
CALL APP_getDashboardInspection('2023-01-30', '2023-02-05', 3, 23);
response length : 3
POST /api/getDataUsingSP :- 361ms
CALL test_getDataUsingSP('2023-01-30', '2023-02-05', 3, 23);
response length : undefined
POST /api/getDataUsingSP :- 10ms
CALL test_getDataUsingSP('2023-01-30', '2023-02-05', 3, 23);
response length : 3
POST /api/getDataUsingSP :- 3ms
CALL test_getDataUsingSP('2023-01-30', '2023-02-05', 3, 23);
response length : undefined
POST /api/getDataUsingSP :- 1ms
CALL test_getDataUsingSP('2023-01-30', '2023-02-05', 3, 23);
response length : 3
POST /api/getDataUsingSP :- 2ms
CALL test_getDataUsingSP('2023-01-30', '2023-02-05', 3, 23);
response length : undefined
POST /api/getDataUsingSP :- 1ms
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels