alsmanager_lib 3.0.185 → 3.0.186
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 +64 -0
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -11569,6 +11569,68 @@ function queryDetailsByIdDevice(db_used,id_device) {
|
|
|
11569
11569
|
return query;
|
|
11570
11570
|
}
|
|
11571
11571
|
//End Get details by type
|
|
11572
|
+
//Get visible groups by id
|
|
11573
|
+
function queryVisibleGroupByIdDeviceSQLite(id_device) {
|
|
11574
|
+
var query = "select pv.tipo, pv.group_name from properties_visible pv ";
|
|
11575
|
+
query += "join devices d on d.type = pv.tipo ";
|
|
11576
|
+
query += "where d.id = " + id_device;
|
|
11577
|
+
return query;
|
|
11578
|
+
}
|
|
11579
|
+
function queryVisibleGroupByIdDeviceMySQL(id_device) {
|
|
11580
|
+
var query = "select pv.tipo, pv.group_name from properties_visible pv ";
|
|
11581
|
+
query += "join devices d on d.type = pv.tipo ";
|
|
11582
|
+
query += "where d.id = :id_device";
|
|
11583
|
+
return query;
|
|
11584
|
+
}
|
|
11585
|
+
function queryVisibleGroupByIdDevice(db_used,id_device) {
|
|
11586
|
+
var query = "";
|
|
11587
|
+
if (db_used) {
|
|
11588
|
+
switch (db_used) {
|
|
11589
|
+
case 'SQLITE':
|
|
11590
|
+
query = queryVisibleGroupByIdDeviceSQLite(id_device);
|
|
11591
|
+
break;
|
|
11592
|
+
case 'MYSQL':
|
|
11593
|
+
query = queryVisibleGroupByIdDeviceMySQL(id_device);
|
|
11594
|
+
break;
|
|
11595
|
+
case 'MYSQL2':
|
|
11596
|
+
query = queryVisibleGroupByIdDeviceSQLitez(id_device);
|
|
11597
|
+
break;
|
|
11598
|
+
}
|
|
11599
|
+
}
|
|
11600
|
+
return query;
|
|
11601
|
+
}
|
|
11602
|
+
//End Get visible groups by id
|
|
11603
|
+
//Get hidden groups by id
|
|
11604
|
+
function queryHiddenGroupByIdDeviceSQLite(id_device) {
|
|
11605
|
+
var query = "select pv.tipo, pv.group_name from properties_visible pv ";
|
|
11606
|
+
query += "join devices d on d.type <> pv.tipo ";
|
|
11607
|
+
query += "where d.id = " + id_device;
|
|
11608
|
+
return query;
|
|
11609
|
+
}
|
|
11610
|
+
function queryHiddenGroupByIdDeviceMySQL(id_device) {
|
|
11611
|
+
var query = "select pv.tipo, pv.group_name from properties_visible pv ";
|
|
11612
|
+
query += "join devices d on d.type <> pv.tipo ";
|
|
11613
|
+
query += "where d.id = :id_device";
|
|
11614
|
+
return query;
|
|
11615
|
+
}
|
|
11616
|
+
function queryHiddenGroupByIdDevice(db_used,id_device) {
|
|
11617
|
+
var query = "";
|
|
11618
|
+
if (db_used) {
|
|
11619
|
+
switch (db_used) {
|
|
11620
|
+
case 'SQLITE':
|
|
11621
|
+
query = queryHiddenGroupByIdDeviceSQLite(id_device);
|
|
11622
|
+
break;
|
|
11623
|
+
case 'MYSQL':
|
|
11624
|
+
query = queryHiddenGroupByIdDeviceMySQL(id_device);
|
|
11625
|
+
break;
|
|
11626
|
+
case 'MYSQL2':
|
|
11627
|
+
query = queryHiddenGroupByIdDeviceSQLite(id_device);
|
|
11628
|
+
break;
|
|
11629
|
+
}
|
|
11630
|
+
}
|
|
11631
|
+
return query;
|
|
11632
|
+
}
|
|
11633
|
+
//End Get hidden groups by id
|
|
11572
11634
|
// Define getConnectionSetById
|
|
11573
11635
|
function getConnectionSetByIdSQLite(id_conn_set) {
|
|
11574
11636
|
var query = "select id, id_set, id_conn, id_adapter, verse from set_connections ";
|
|
@@ -16360,6 +16422,8 @@ module.exports = {
|
|
|
16360
16422
|
getConnectionByIdSet,
|
|
16361
16423
|
getConnectionSetById,
|
|
16362
16424
|
queryDetailsByIdDevice,
|
|
16425
|
+
queryVisibleGroupByIdDevice,
|
|
16426
|
+
queryHiddenGroupByIdDevice,
|
|
16363
16427
|
//
|
|
16364
16428
|
queryDocumentsIdDevice,
|
|
16365
16429
|
insertDocumentoDevice,
|