This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--jam | |
DROP TABLE IF EXISTS emp; | |
CREATE TABLE emp ( | |
empno decimal(4,0) NOT NULL, | |
ename varchar(10) default NULL, | |
job varchar(9) default NULL, | |
mgr decimal(4,0) default NULL, | |
hiredate date default NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function() { | |
Cypress.Commands.add('sqlServer', (query) => { | |
if(!query) { | |
throw new Error('Query must be set'); | |
} | |
cy.task('sqlServer:execute', query).then(response => { | |
let result = []; | |
const flatten = r => Array.isArray(r) && r.length === 1 ? flatten(r[0]) : r; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function() { | |
Cypress.Commands.add('sqlServer', (query) => { | |
if(!query) { | |
throw new Error('Query must be set'); | |
} | |
cy.task('sqlServer:execute', query).then(response => { | |
let result = []; | |
const flatten = r => Array.isArray(r) && r.length === 1 ? flatten(r[0]) : r; |