From 040baa33ec4bec8e3fc7234f5e94678ba0c40ef0 Mon Sep 17 00:00:00 2001
From: stas-fomenko <36419533+stas-fomenko@users.noreply.github.com>
Date: Sun, 17 May 2020 12:49:57 +0300
Subject: [PATCH 1/5] Update component.json
---
component.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/component.json b/component.json
index 63d695a..2c66eb8 100644
--- a/component.json
+++ b/component.json
@@ -126,7 +126,7 @@
"viewClass": "TextAreaWithNoteView",
"placeholder": "INSERT INTO films (code,title,kind) VALUES (@code:number,@title:string,@kind:string)",
"help": {
- "description": "SQL query to execute. You can use parameters of message body as @value:number and type is :type"
+ "description": "SQL SELECT Statement to execute."
}
}
},
From 8c6d41aad84f3ab583cc55179d35eb8fab020530 Mon Sep 17 00:00:00 2001
From: stas-fomenko
Date: Sun, 17 May 2020 13:04:40 +0300
Subject: [PATCH 2/5] update component.json
---
component.json | 56 +++++++++++++++++++++++++-------------------------
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/component.json b/component.json
index 2c66eb8..aab83d0 100644
--- a/component.json
+++ b/component.json
@@ -10,7 +10,7 @@
"viewClass": "TextFieldView",
"placeholder": "localhost",
"help": {
- "description": "Server to connect to. You can use 'host\\\\instance' to connect to named instance."
+ "description": "Server to connect. You can use 'host\\\\instance' to connect to named instance."
}
},
"port": {
@@ -19,7 +19,7 @@
"viewClass": "TextFieldView",
"placeholder": "1433",
"help": {
- "description": "Port to connect to. If not provided default port 1433 is used. Don't set when connecting to named instance."
+ "description": "Port to connect. If not provided default port 1433 is used. Don't set when connecting to named instance."
}
},
"database": {
@@ -28,26 +28,10 @@
"viewClass": "TextFieldView",
"placeholder": "database",
"help": {
- "description": "Database to connect to. Default is dependent on server configuration."
+ "description": "Database to connect. Default is dependent on server configuration."
}
},
- "encrypt": {
- "label": "Encrypt",
- "viewClass": "CheckBoxView",
- "help": {
- "description": "Enable this option if you're using Windows Azure"
- }
- },
- "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."
- }
- },
- "username": {
+ "username": {
"label": "Username",
"required": true,
"viewClass": "TextFieldView",
@@ -64,6 +48,22 @@
"help": {
"description": "Password to use for authentication with the database."
}
+ },
+ "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"
+ }
}
}
},
@@ -80,9 +80,9 @@
"label": "SQL Query",
"required": true,
"viewClass": "TextAreaWithNoteView",
- "placeholder": "INSERT INTO films (code,title,kind) VALUES (@code:number,@title:string,@kind:string)",
+ "placeholder": "SELECT * FROM Employee WHERE EmpID = 322",
"help": {
- "description": "SQL query to execute. You can use parameters of message body as @value:number and type is :type"
+ "description": "SQL SELECT Statement to execute"
}
}
},
@@ -101,9 +101,9 @@
"properties": {
"query": {
"type": "string",
- "title": "SQL Query",
+ "title": "SQL SELECT Statement",
"required": true,
- "description": "SQL query to execute."
+ "description": "Executes a SELECT statement that fetches potentially multiple database rows from the database"
}
}
}
@@ -112,7 +112,7 @@
},
"triggers": {
"selectTrigger": {
- "title": "SELECT",
+ "title": "SQL SELECT Statement",
"main": "./lib/actions/select.js",
"type": "polling",
"help": {
@@ -121,12 +121,12 @@
},
"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)",
+ "placeholder": "SELECT * FROM Employee WHERE EmpID = 322",
"help": {
- "description": "SQL SELECT Statement to execute."
+ "description": "SQL SELECT Statement to execute"
}
}
},
From c28493f3dd281c5736cb444f98be3408a4e1a02e Mon Sep 17 00:00:00 2001
From: stas-fomenko
Date: Sun, 17 May 2020 13:07:57 +0300
Subject: [PATCH 3/5] upd
---
component.json | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/component.json b/component.json
index aab83d0..75f248b 100644
--- a/component.json
+++ b/component.json
@@ -13,16 +13,7 @@
"description": "Server to connect. You can use 'host\\\\instance' to connect to named instance."
}
},
- "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."
- }
- },
- "database": {
+ "database": {
"label": "Database Name",
"required": true,
"viewClass": "TextFieldView",
@@ -49,6 +40,15 @@
"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,
From 4bab4a9c5d62cdbfe141cc966f1e55d1c1353cc8 Mon Sep 17 00:00:00 2001
From: stas-fomenko
Date: Sun, 17 May 2020 13:15:30 +0300
Subject: [PATCH 4/5] upd
---
component.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/component.json b/component.json
index 75f248b..fac3185 100644
--- a/component.json
+++ b/component.json
@@ -80,9 +80,9 @@
"label": "SQL Query",
"required": true,
"viewClass": "TextAreaWithNoteView",
- "placeholder": "SELECT * FROM Employee WHERE EmpID = 322",
+ "placeholder": "INSERT INTO films (code,title,kind) VALUES (@code:number,@title:string,@kind:string)",
"help": {
- "description": "SQL SELECT Statement to execute"
+ "description": "SQL query to execute. You can use parameters of message body as '@value:number' and type is ':type'"
}
}
},
From 3149b92baab1b89d429a0cde3f81ecc4666eaaff Mon Sep 17 00:00:00 2001
From: stas-fomenko <36419533+stas-fomenko@users.noreply.github.com>
Date: Sun, 17 May 2020 16:42:57 +0300
Subject: [PATCH 5/5] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index aeacd3f..10313ad 100644
--- a/README.md
+++ b/README.md
@@ -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: