updated sp's
This commit is contained in:
parent
89ca063292
commit
a7d10c10a5
@ -22,10 +22,10 @@ export class OracleSpService {
|
|||||||
|
|
||||||
const result = await connection.execute(
|
const result = await connection.execute(
|
||||||
`BEGIN
|
`BEGIN
|
||||||
sp1(:res);
|
USCIB_Managed_Pkg.GetRegions(:p_cursor);
|
||||||
END;`,
|
END;`,
|
||||||
{
|
{
|
||||||
res: {
|
p_cursor: {
|
||||||
type: oracledb.CURSOR,
|
type: oracledb.CURSOR,
|
||||||
dir: oracledb.BIND_OUT
|
dir: oracledb.BIND_OUT
|
||||||
}
|
}
|
||||||
@ -35,8 +35,8 @@ export class OracleSpService {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if (result.outBinds && result.outBinds.res) {
|
if (result.outBinds && result.outBinds.p_cursor) {
|
||||||
const cursor = result.outBinds.res; // The OUT cursor
|
const cursor = result.outBinds.p_cursor; // The OUT cursor
|
||||||
let rowsBatch;
|
let rowsBatch;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@ -72,17 +72,17 @@ export class OracleSpService {
|
|||||||
|
|
||||||
const result = await connection.execute(
|
const result = await connection.execute(
|
||||||
`BEGIN
|
`BEGIN
|
||||||
sp1(:a,:b,:res);
|
sp1(:p_region,:p_name,:p_cursor);
|
||||||
END;`, {
|
END;`, {
|
||||||
a: {
|
p_region: {
|
||||||
val: "03",
|
val: "03",
|
||||||
type: oracledb.DB_TYPE_VARCHAR
|
type: oracledb.DB_TYPE_VARCHAR
|
||||||
},
|
},
|
||||||
b: {
|
p_name: {
|
||||||
val: 'indu1',
|
val: 'indu1',
|
||||||
type: oracledb.DB_TYPE_VARCHAR
|
type: oracledb.DB_TYPE_VARCHAR
|
||||||
},
|
},
|
||||||
res: {
|
p_cursor: {
|
||||||
type: oracledb.CURSOR,
|
type: oracledb.CURSOR,
|
||||||
dir: oracledb.BIND_OUT
|
dir: oracledb.BIND_OUT
|
||||||
}
|
}
|
||||||
@ -90,7 +90,7 @@ export class OracleSpService {
|
|||||||
outFormat: oracledb.OUT_FORMAT_OBJECT
|
outFormat: oracledb.OUT_FORMAT_OBJECT
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
let fres = await result.outBinds.res.getRows();
|
let fres = await result.outBinds.p_cursor.getRows();
|
||||||
|
|
||||||
return fres
|
return fres
|
||||||
|
|
||||||
@ -112,17 +112,17 @@ export class OracleSpService {
|
|||||||
|
|
||||||
const result = await connection.execute(
|
const result = await connection.execute(
|
||||||
`BEGIN
|
`BEGIN
|
||||||
sp1(:a,:b,:res);
|
sp1(:p_regionID,:p_name,:p_cursor);
|
||||||
END;`, {
|
END;`, {
|
||||||
a: {
|
p_regionID: {
|
||||||
val: 3,
|
val: 3,
|
||||||
type: oracledb.DB_TYPE_NUMBER
|
type: oracledb.DB_TYPE_NUMBER
|
||||||
},
|
},
|
||||||
b: {
|
p_name: {
|
||||||
val: 'indu1',
|
val: 'indu1',
|
||||||
type: oracledb.DB_TYPE_VARCHAR
|
type: oracledb.DB_TYPE_VARCHAR
|
||||||
},
|
},
|
||||||
res: {
|
p_cursor: {
|
||||||
type: oracledb.CURSOR,
|
type: oracledb.CURSOR,
|
||||||
dir: oracledb.BIND_OUT
|
dir: oracledb.BIND_OUT
|
||||||
}
|
}
|
||||||
@ -130,7 +130,7 @@ export class OracleSpService {
|
|||||||
outFormat: oracledb.OUT_FORMAT_OBJECT
|
outFormat: oracledb.OUT_FORMAT_OBJECT
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
let fres = await result.outBinds.res.getRows();
|
let fres = await result.outBinds.p_cursor.getRows();
|
||||||
|
|
||||||
return fres
|
return fres
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user