| # ############################################################## |
| # SQL Sub model provider configuration file |
| # ############################################################## |
| |
| |
| |
| |
| # ############################################################## |
| # Sub model provider configuration |
| |
| basyx.submodelID = SQLTestSubmodel |
| |
| |
| |
| # ############################################################## |
| # Database configuration |
| |
| basyx.sql.dbuser = postgres |
| basyx.sql.dbpass = admin |
| basyx.sql.dburl = //localhost/basyx-sample-vibrations? |
| |
| |
| |
| # ############################################################## |
| # SQL driver configuration |
| |
| basyx.sql.driver = org.postgresql.Driver |
| basyx.sql.prefix = jdbc:postgresql: |
| |
| |
| |
| # ############################################################## |
| # SQL sub model configuration |
| |
| basyx.sql.properties = sensorNames |
| basyx.sql.operations = sensorIDForName addSensorID |
| |
| |
| |
| # ############################################################## |
| # Properties |
| |
| # sensorNames property |
| sensorNames.type = Property |
| sensorNames.semanticsInternal = basys.semantics.internal.sensorNames |
| sensorNames.category = sensorNamesProperty |
| sensorNames.description = Sensor names property description |
| sensorNames.qualifier = basys.test.sensorNamesScope |
| |
| sensorNames.get = "SELECT * FROM vibrations.sensors" |
| sensorNames.get.type = STRING[] |
| sensorNames.get.result = "stringArray(sensorname:String)" |
| |
| sensorNames.delete = "DELETE FROM vibrations.sensors WHERE sensorid='$sensorid'" |
| |
| sensorNames.create = "INSERT INTO vibrations.sensors (sensorname, sensorid) VALUES ('$sensorname', '$sensorid')" |
| |
| sensorNames.set = "UPDATE vibrations.sensors SET sensorname='$sensorname' WHERE sensorid='$sensorid'" |
| |
| |
| |
| |
| # ############################################################## |
| # Operations |
| |
| |
| # sensorIDForName operation |
| sensorIDForName.operation.parameter = 1 |
| sensorIDForName.operation.kind = query |
| sensorIDForName.operation.type = OBJECT[] |
| sensorIDForName = "SELECT * FROM vibrations.sensors WHERE sensorname='$1'" |
| sensorIDForName.operation.result = "mapArray(sensorid:int, sensorname:String)" |
| |
| # addSensorID operation |
| addSensorID.operation.parameter = 2 |
| addSensorID.operation.kind = update |
| addSensorID.operation.type = void |
| addSensorID = "INSERT INTO vibrations.sensors ($1) VALUES ($2)" |
| addSensorID.operation.result = |
| |
| |