Browse Source

corr

pull/122/head
Zbynek Rybicka 6 years ago committed by Jeremy Nagel
parent
commit
5d7ceac779
  1. 1
      lib/xsql.js
  2. 3
      tests/sample.sql
  3. 2
      tests/tests.js

1
lib/xsql.js

@ -89,7 +89,6 @@ class Xsql {
} }
iterateToCacheRoutines(routineResults) { iterateToCacheRoutines(routineResults) {
console.log(JSON.stringify(routineResults))
for (let i = 0; i < routineResults.length; i++) { for (let i = 0; i < routineResults.length; i++) {
const routine = routineResults[i] const routine = routineResults[i]
const routineName = routine.routine_name const routineName = routine.routine_name

3
tests/sample.sql

@ -7924,8 +7924,9 @@ insert into `products`(`productCode`,`productName`,`productLine`,`productScale`
('S72_3212','Pont Yacht','Ships','1:72','Unimax Art Galleries','Measures 38 inches Long x 33 3/4 inches High. Includes a stand.\r\nMany extras including rigging, long boats, pilot house, anchors, etc. Comes with 2 masts, all square-rigged',414,'33.30','54.60'); ('S72_3212','Pont Yacht','Ships','1:72','Unimax Art Galleries','Measures 38 inches Long x 33 3/4 inches High. Includes a stand.\r\nMany extras including rigging, long boats, pilot house, anchors, etc. Comes with 2 masts, all square-rigged',414,'33.30','54.60');
DROP PROCEDURE IF EXISTS `set_credit_limit`;
DELIMITER // DELIMITER //
CREATE PROCEDURE Set_credit_limit(IN customerNumber INT(11), IN creditLimit decimal(10,2)) CREATE PROCEDURE set_credit_limit(IN customerNumber INT(11), IN creditLimit decimal(10,2))
BEGIN BEGIN
UPDATE `customers` c SET c.`creditLimit` = creditLimit WHERE c.`customerNumber` = customerNumber; UPDATE `customers` c SET c.`creditLimit` = creditLimit WHERE c.`customerNumber` = customerNumber;
END // END //

2
tests/tests.js

@ -2309,7 +2309,7 @@ describe("xmysql : tests", function() {
customeNumber: 103, customeNumber: 103,
creditLimit: 23134.00 creditLimit: 23134.00
} }
agent.post(apiPrefix + '/_proc/set_credit_limit') //enter url agent.post(apiPrefix + '/_proc/Set_credit_limit') //enter url
.send(obj) //postdata .send(obj) //postdata
.expect(200)//200 for success 4xx for failure .expect(200)//200 for success 4xx for failure
.end(function (err, res) { .end(function (err, res) {

Loading…
Cancel
Save