Changeset: 56f5413f1196 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=56f5413f1196
Added Files:
        sql/backends/monet5/iot/Tests/bug05.sql
Modified Files:
        clients/iotapi/documentation/websockets_api.rst
        clients/iotapi/src/WebSockets/jsonschemas.py
        sql/backends/monet5/iot/Tests/All
Branch: iot
Log Message:

Merge with side branch


diffs (90 lines):

diff --git a/clients/iotapi/documentation/websockets_api.rst 
b/clients/iotapi/documentation/websockets_api.rst
--- a/clients/iotapi/documentation/websockets_api.rst
+++ b/clients/iotapi/documentation/websockets_api.rst
@@ -15,28 +15,28 @@ The client must always provide a JSON st
 
 The following sections explain the available :code:`request` fields.
 
-sub/subscribe
--------------
+subscribe
+---------
 
 Subscribes for new basket creations from a specific stream. Whenever a basket 
is created, the server sends a notification message indicating the number of 
inserted tuples in the new basket. The user has to specify the stream's name 
and schema. To subscribe to a temperature stream, the following would suffice:
 
 .. code-block:: json
 
     {
-        "request": "sub",
+        "request": "subscribe",
         "schema": "measures",
         "stream": "temperature"
     }
 
-unsub/unsubscribe
------------------
+unsubscribe
+-----------
 
 Unsubscribes a previous subscribed stream for a client. The user has to 
specify the stream's name and schema. The example is the same as above, just 
changing the request keyword.
 
 .. code-block:: json
 
     {
-        "request": "unsub",
+        "request": "unsubscribe",
         "schema": "measures",
         "stream": "temperature"
     }
diff --git a/clients/iotapi/src/WebSockets/jsonschemas.py 
b/clients/iotapi/src/WebSockets/jsonschemas.py
--- a/clients/iotapi/src/WebSockets/jsonschemas.py
+++ b/clients/iotapi/src/WebSockets/jsonschemas.py
@@ -1,5 +1,5 @@
-SUBSCRIBE_OPTS = ["sub", "subscribe"]
-UNSUBSCRIBE_OPTS = ["unsub", "unsubscribe"]
+SUBSCRIBE_OPTS = ["subscribe"]
+UNSUBSCRIBE_OPTS = ["unsubscribe"]
 INFO_OPTS = ["info"]
 READ_OPTS = ["read"]
 
diff --git a/sql/backends/monet5/iot/Tests/All 
b/sql/backends/monet5/iot/Tests/All
--- a/sql/backends/monet5/iot/Tests/All
+++ b/sql/backends/monet5/iot/Tests/All
@@ -2,6 +2,7 @@ bug01
 bug02
 bug03
 bug04
+bug05
 iot00
 iot02
 iot03
diff --git a/sql/backends/monet5/iot/Tests/bug05.sql 
b/sql/backends/monet5/iot/Tests/bug05.sql
new file mode 100644
--- /dev/null
+++ b/sql/backends/monet5/iot/Tests/bug05.sql
@@ -0,0 +1,25 @@
+SET optimizer = 'iot_pipe';
+
+CREATE STREAM TABLE testing (a timestamp, b int, c real);
+CALL iot.window('sys', 'testing', 3);
+CREATE TABLE testout (a timestamp, b int, c real);
+
+CREATE PROCEDURE cquery()
+BEGIN  
+       INSERT INTO testout SELECT * FROM testing;
+END;
+
+CALL iot.query('sys', 'cquery');
+CALL iot.resume();
+
+INSERT INTO testing VALUES (now(), 1, 1);
+INSERT INTO testing VALUES (now(), 2, 2);
+INSERT INTO testing VALUES (now(), 3, 3);
+
+CALL iot.show('sys', 'cquery');
+CALL iot.stop();
+
+DROP PROCEDURE cquery;
+DROP TABLE testout;
+DROP TABLE testing;
+
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to