alsmanager_lib 3.0.186 → 3.0.188
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/modules.js +26 -24
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -11570,30 +11570,28 @@ function queryDetailsByIdDevice(db_used,id_device) {
|
|
|
11570
11570
|
}
|
|
11571
11571
|
//End Get details by type
|
|
11572
11572
|
//Get visible groups by id
|
|
11573
|
-
function
|
|
11573
|
+
function queryVisibleGroupByTypeSQLite(dev_type) {
|
|
11574
11574
|
var query = "select pv.tipo, pv.group_name from properties_visible pv ";
|
|
11575
|
-
query += "
|
|
11576
|
-
query += "where d.id = " + id_device;
|
|
11575
|
+
query += "where pv.tipo = '" + dev_type + "'";
|
|
11577
11576
|
return query;
|
|
11578
11577
|
}
|
|
11579
|
-
function
|
|
11578
|
+
function queryVisibleGroupByTypeMySQL() {
|
|
11580
11579
|
var query = "select pv.tipo, pv.group_name from properties_visible pv ";
|
|
11581
|
-
query += "
|
|
11582
|
-
query += "where d.id = :id_device";
|
|
11580
|
+
query += "where pv.tipo = :dev_type";
|
|
11583
11581
|
return query;
|
|
11584
11582
|
}
|
|
11585
|
-
function
|
|
11583
|
+
function queryVisibleGroupByType(db_used, dev_type) {
|
|
11586
11584
|
var query = "";
|
|
11587
11585
|
if (db_used) {
|
|
11588
11586
|
switch (db_used) {
|
|
11589
11587
|
case 'SQLITE':
|
|
11590
|
-
query =
|
|
11588
|
+
query = queryVisibleGroupByTypeSQLite(dev_type);
|
|
11591
11589
|
break;
|
|
11592
11590
|
case 'MYSQL':
|
|
11593
|
-
query =
|
|
11591
|
+
query = queryVisibleGroupByTypeMySQL();
|
|
11594
11592
|
break;
|
|
11595
11593
|
case 'MYSQL2':
|
|
11596
|
-
query =
|
|
11594
|
+
query = queryVisibleGroupByTypeSQLite(dev_type);
|
|
11597
11595
|
break;
|
|
11598
11596
|
}
|
|
11599
11597
|
}
|
|
@@ -11601,30 +11599,34 @@ function queryVisibleGroupByIdDevice(db_used,id_device) {
|
|
|
11601
11599
|
}
|
|
11602
11600
|
//End Get visible groups by id
|
|
11603
11601
|
//Get hidden groups by id
|
|
11604
|
-
function
|
|
11605
|
-
var query = "select
|
|
11606
|
-
query += "
|
|
11607
|
-
query += "
|
|
11602
|
+
function queryHiddenGroupByTypeSQLite(dev_type) {
|
|
11603
|
+
var query = "select distinct group_name from properties_visible pv ";
|
|
11604
|
+
query += "where pv.tipo != '" + dev_type + "' ";
|
|
11605
|
+
query += "and group_name not in ";
|
|
11606
|
+
query += "(select group_name from properties_visible ";
|
|
11607
|
+
query += "where tipo = '" + dev_type + "')";
|
|
11608
11608
|
return query;
|
|
11609
11609
|
}
|
|
11610
|
-
function
|
|
11611
|
-
var query = "select
|
|
11612
|
-
query += "
|
|
11613
|
-
query += "
|
|
11610
|
+
function queryHiddenGroupByTypeMySQL() {
|
|
11611
|
+
var query = "select distinct group_name from properties_visible pv ";
|
|
11612
|
+
query += "where pv.tipo != :dev_type ";
|
|
11613
|
+
query += "and group_name not in ";
|
|
11614
|
+
query += "(select group_name from properties_visible ";
|
|
11615
|
+
query += "where tipo = :dev_type)";
|
|
11614
11616
|
return query;
|
|
11615
11617
|
}
|
|
11616
|
-
function
|
|
11618
|
+
function queryHiddenGroupByType(db_used,dev_type) {
|
|
11617
11619
|
var query = "";
|
|
11618
11620
|
if (db_used) {
|
|
11619
11621
|
switch (db_used) {
|
|
11620
11622
|
case 'SQLITE':
|
|
11621
|
-
query =
|
|
11623
|
+
query = queryHiddenGroupByTypeSQLite(dev_type);
|
|
11622
11624
|
break;
|
|
11623
11625
|
case 'MYSQL':
|
|
11624
|
-
query =
|
|
11626
|
+
query = queryHiddenGroupByTypeMySQL();
|
|
11625
11627
|
break;
|
|
11626
11628
|
case 'MYSQL2':
|
|
11627
|
-
query =
|
|
11629
|
+
query = queryHiddenGroupByTypeSQLite(dev_type);
|
|
11628
11630
|
break;
|
|
11629
11631
|
}
|
|
11630
11632
|
}
|
|
@@ -16422,8 +16424,8 @@ module.exports = {
|
|
|
16422
16424
|
getConnectionByIdSet,
|
|
16423
16425
|
getConnectionSetById,
|
|
16424
16426
|
queryDetailsByIdDevice,
|
|
16425
|
-
|
|
16426
|
-
|
|
16427
|
+
queryVisibleGroupByType,
|
|
16428
|
+
queryHiddenGroupByType,
|
|
16427
16429
|
//
|
|
16428
16430
|
queryDocumentsIdDevice,
|
|
16429
16431
|
insertDocumentoDevice,
|