Skip to content
Merged
158 changes: 3 additions & 155 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,159 +1,7 @@
'use strict';

const ERROR = 'error';
const WARN = 'warn';
const ALWAYS = 'always';
const NEVER = 'never';

module.exports = {
'extends': 'airbnb-base',
'env': {
es6: true,
node: true,
mocha: true
},
plugins: [
"json",
"mocha"
],
'extends': 'eslint:recommended',
'rules': {
'indent': [
ERROR,
4,
{
SwitchCase: 1
}
],
'linebreak-style': ERROR,
'quotes': [
WARN,
'single'
],
'semi': [
ERROR,
ALWAYS
],
'func-names': ERROR,
'no-empty': ERROR,
'no-empty-function': ERROR,
'brace-style': [
ERROR,
'1tbs',
{allowSingleLine: true}
],
'no-multiple-empty-lines': ERROR,
'no-multi-spaces': ERROR,
'one-var': [
ERROR,
NEVER
],
'quote-props': [
WARN,
'consistent-as-needed'
],
'key-spacing': ERROR,
'space-unary-ops': [
ERROR,
{
words: true,
nonwords: false
}
],
'no-spaced-func': ERROR,
'space-before-function-paren': [
ERROR,
{
anonymous: ALWAYS,
named: NEVER
}
],
'arrow-body-style': [
WARN,
'as-needed'
],
'array-bracket-spacing': ERROR,
'space-in-parens': ERROR,
'comma-dangle': ERROR,
'no-trailing-spaces': ERROR,
'yoda': ERROR,
'max-len': [
ERROR,
120
],
'camelcase': [
ERROR,
{
properties: 'never'
}
],
'new-cap': [
WARN,
{
capIsNewExceptions: ['Q']
}
],
'comma-style': ERROR,
'curly': ERROR,
'object-curly-spacing': [
WARN,
ALWAYS
],
'object-curly-newline': [
ERROR,
{
ObjectExpression: {
minProperties: 1
},
ObjectPattern: {
minProperties: 5
}
}
],
'object-property-newline': ERROR,
'template-curly-spacing': ERROR,
'dot-notation': ERROR,
'dot-location': [
ERROR,
'property'
],
'func-style': [
ERROR,
'declaration',
{
allowArrowFunctions: true
}
],
'eol-last': ERROR,
'space-infix-ops': ERROR,
'keyword-spacing': ERROR,
'space-before-blocks': ERROR,
'no-invalid-this': ERROR,
'consistent-this': ERROR,
'no-this-before-super': ERROR,
'no-unreachable': ERROR,
'no-sparse-arrays': ERROR,
'array-callback-return': ERROR,
'strict': [
WARN,
'global'
],
'eqeqeq': ERROR,
'no-use-before-define': WARN,
'no-undef': ERROR,
'no-unused-vars': WARN,
'no-mixed-spaces-and-tabs': ERROR,
'operator-linebreak': [
ERROR,
'before'
],
'no-console': [
WARN,
{
'allow': [
'warn',
'error'
]
}
]
'mocha': true,
'node': true,
}
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
coverage
.idea
.env
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- v8
- v7
- v6
- v14
- v13
- v12
script: npm test && npm run integration-test
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.1 (May 11, 2020)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## 1.1.1 (May 11, 2020)
## 1.1.1 (May 19, 2020)


* Update sailor version to 2.6.7

## 1.1.0 (January 30, 2020)

* Update sailor version to 2.6.1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ where just before executing the statement the ``%%EIO_LAST_POLL%%`` will be repl

You may use this action to do the operations that are not producing output rows but do the database manipulations,
e.g. ``INSERT``, ``UPDATE`` or ``DELETE`` statements. Internally we use prepared statements, so all incoming data is
validated against SQL injetion, however we had to build a connection from JavaSscript types to the MSSQL data types
validated against SQL injetion, however we had to build a connection from JavaScript types to the MSSQL data types
therefore when doing a prepared statements you would need to add ``:type`` to **each prepared statement variable**.

For example if you have a following SQL statement:
Expand Down
101 changes: 68 additions & 33 deletions component.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,75 +5,105 @@
"credentials": {
"fields": {
"server": {
"label": "Server (you can use 'host\\\\instance' to connect to named instance)",
"label": "Server",
"required": true,
"viewClass": "TextFieldView",
"placeholder": "localhost"
},
"port": {
"label": "Port (don't set when connecting to named instance)",
"required": false,
"viewClass": "TextFieldView",
"placeholder": "1433"
"placeholder": "localhost",
"help": {
"description": "Server to connect. You can use 'host\\\\instance' to connect to named instance."
}
},
"database": {
"database": {
"label": "Database Name",
"required": true,
"viewClass": "TextFieldView",
"placeholder": "database"
},
"encrypt": {
"label": "Encrypt (check this option if you're using Windows Azure)",
"viewClass": "CheckBoxView"
},
"domain": {
"label": "Domain (driver will connect to SQL Server using domain login)",
"required": false,
"viewClass": "TextFieldView",
"placeholder": "domain"
"placeholder": "database",
"help": {
"description": "Database to connect. Default is dependent on server configuration."
}
},
"username": {
"username": {
"label": "Username",
"required": true,
"viewClass": "TextFieldView",
"placeholder": "username"
"placeholder": "username",
"help": {
"description": "User name to use for authentication with the database."
}
},
"password": {
"label": "Password",
"required": true,
"viewClass": "PasswordFieldView",
"placeholder": "password"
"placeholder": "password",
"help": {
"description": "Password to use for authentication with the database."
}
},
"port": {
"label": "Port",
"required": false,
"viewClass": "TextFieldView",
"placeholder": "1433",
"help": {
"description": "Port to connect. If not provided default port 1433 is used. Don't set when connecting to named instance."
}
},
"domain": {
"label": "Domain",
"required": false,
"viewClass": "TextFieldView",
"placeholder": "domain",
"help": {
"description": "If domain is provided, the connection to SQL Server will be done using domain login."
}
},
"encrypt": {
"label": "Encrypt",
"viewClass": "CheckBoxView",
"help": {
"description": "Enable this option if you're using Windows Azure"
}
}
}
},
"actions": {
"insert": {
"title": "INSERT/UPDATE/DELETE",
"description": "Executes a single SQL statement that causes database data update and returns a number of affected records, like INSERT, UPDATE or DELETE",
"main": "./lib/actions/insert.js",
"help": {
"description": "Executes a single SQL statement that causes database data update and returns a number of affected records, like INSERT, UPDATE or DELETE",
"link": "/components/mssql/index.html#insertdeleteupdate-action"
},
"fields": {
"query": {
"label": "SQL Query",
"required": true,
"viewClass": "TextAreaWithNoteView",
"placeholder": "INSERT INTO films (code,title,kind) VALUES (@code:number,@title:string,@kind:string)",
"note": "You can use parameters of message body as <i>@value:number</i> and type is <i>:type</i>"
"help": {
"description": "SQL query to execute. You can use parameters of message body as '@value:number' and type is ':type'"
}
}
},
"dynamicMetadata": true
},
"selectAction": {
"title": "SELECT",
"description": "Executes a SELECT statement that fetches potentially multiple database rows from the database",
"main": "./lib/actions/select.js",
"help": {
"description": "Executes a SELECT statement that fetches potentially multiple database rows from the database",
"link": "/components/mssql/index.html#select-action"
},
"metadata": {
"in": {
"type": "object",
"properties": {
"query": {
"type": "string",
"title": "SQL Query",
"required": true
"title": "SQL SELECT Statement",
"required": true,
"description": "Executes a SELECT statement that fetches potentially multiple database rows from the database"
}
}
}
Expand All @@ -82,17 +112,22 @@
},
"triggers": {
"selectTrigger": {
"title": "SELECT",
"description": "Executes a SELECT statement that fetches potentially multiple database rows from the database",
"title": "SQL SELECT Statement",
"main": "./lib/actions/select.js",
"type": "polling",
"help": {
"description": "Executes a SELECT statement that fetches potentially multiple database rows from the database",
"link": "/components/mssql/index.html#select-trigger-and-action"
},
"fields": {
"query": {
"label": "SQL Query",
"label": "SQL SELECT Statement",
"required": true,
"viewClass": "TextAreaWithNoteView",
"placeholder": "INSERT INTO films (code,title,kind) VALUES (@code:number,@title:string,@kind:string)",
"note": "You can use parameters of message body as <i>@value:number</i> and type is <i>:type</i>"
"placeholder": "SELECT * FROM Employee WHERE EmpID = 322",
"help": {
"description": "SQL SELECT Statement to execute"
}
}
},
"metadata": {
Expand Down
Loading