Changeset: 12a303d540c3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=12a303d540c3
Added Files:
        clients/iotapi/documentation/about.rst
        clients/iotclient/documentation/about.rst
Removed Files:
        clients/iotapi/documentation/conclusion.rst
        clients/iotclient/documentation/conclusion.rst
Modified Files:
        clients/iotapi/documentation/index.rst
        clients/iotapi/documentation/introduction.rst
        clients/iotapi/documentation/websockets_api.rst
        clients/iotapi/src/Streams/streampolling.py
        clients/iotapi/src/Streams/streams.py
        clients/iotclient/documentation/index.rst
        clients/iotclient/documentation/introduction.rst
        clients/iotclient/documentation/restful_resources.rst
        clients/iotclient/documentation/streams_data_types.rst
        clients/iotclient/src/Flask/restresources.py
        clients/iotclient/src/Streams/datatypes.py
        clients/iotclient/src/Streams/jsonschemas.py
        clients/iotclient/src/Streams/streampolling.py
        clients/iotclient/src/Streams/streams.py
        clients/iotclient/src/Streams/streamscontext.py
Branch: iot
Log Message:

Updated documentation, fixed some output listings


diffs (truncated from 629 to 300 lines):

diff --git a/clients/iotapi/documentation/conclusion.rst 
b/clients/iotapi/documentation/about.rst
rename from clients/iotapi/documentation/conclusion.rst
rename to clients/iotapi/documentation/about.rst
--- a/clients/iotapi/documentation/conclusion.rst
+++ b/clients/iotapi/documentation/about.rst
@@ -1,18 +1,8 @@
-.. _future_work:
-
-**********************
-Final Acknowledgements
-**********************
-
-Future Work
-===========
-
-Currently the project is on a testing phase.
-
 .. _about-the-project:
 
+*****************
 About the Project
-=================
+*****************
 
 .. _Send questions and suggestions to e-mail.: [email protected]
 
diff --git a/clients/iotapi/documentation/index.rst 
b/clients/iotapi/documentation/index.rst
--- a/clients/iotapi/documentation/index.rst
+++ b/clients/iotapi/documentation/index.rst
@@ -16,4 +16,4 @@ Contents:
    introduction.rst
    api_server_arguments.rst
    websockets_api.rst
-   conclusion.rst
+   about.rst
diff --git a/clients/iotapi/documentation/introduction.rst 
b/clients/iotapi/documentation/introduction.rst
--- a/clients/iotapi/documentation/introduction.rst
+++ b/clients/iotapi/documentation/introduction.rst
@@ -1,4 +1,4 @@
-.. _instroduction:
+.. _introduction:
 
 ************
 Introduction
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
@@ -158,15 +158,18 @@ Response message for a read query. Conta
         "tuples": [
             {
                 "sensorid": "living room",
-                "temperature": 32.6
+                "temperature": 32.6,
+                "implicit_timestamp": "2016-06-17T09:23:22+00:00"
             },
             {
                 "sensorid": "kitchen",
-                "temperature": 34.2
+                "temperature": 34.2,
+                "implicit_timestamp": "2016-06-17T09:23:22+00:00"
             },
             {
                 "sensorid": "bathroom",
-                "temperature": 28.9
+                "temperature": 28.9,
+                "implicit_timestamp": "2016-06-17T09:23:22+00:00"
             }
         ]
     }
@@ -192,7 +195,14 @@ Message with details about a stream incl
             {
                 "name": "temperature",
                 "type": "real",
-                "nullable": false
+                "nullable": false,
+                "default": null
+            },
+            {
+                "name": "implicit_timestamp",
+                "type": "timestamp with time zone",
+                "nullable": false,
+                "default": null
             }
         ],
         "baskets_count": 3,
@@ -235,7 +245,14 @@ Returns a info message regarding all the
                 {
                     "name": "temperature",
                     "type": "real",
-                    "nullable": false
+                    "nullable": false,
+                    "default": null
+                },
+                {
+                    "name": "implicit_timestamp",
+                    "type": "timestamp with time zone",
+                    "nullable": false,
+                    "default": null
                 }
             ],
             "baskets_count": 3,
diff --git a/clients/iotapi/src/Streams/streampolling.py 
b/clients/iotapi/src/Streams/streampolling.py
--- a/clients/iotapi/src/Streams/streampolling.py
+++ b/clients/iotapi/src/Streams/streampolling.py
@@ -27,6 +27,7 @@ Switcher = [{'types': ['clob', 'url'], '
 Types_Preferences = [['boolean', 'tinyint'], ['smallint'], ['int', 'real', 
'date', 'time', 'timetz', 'month_interval'],
                      ['bigint', 'sec_interval', 'double', 'timestamp', 
'timestamptz', 'inet'], ['decimal'], ['uuid'],
                      ['clob', 'url', 'char', 'varchar']]
+DEFAULT_PREFERENCE_INDEX = len(Types_Preferences)
 
 
 def polling_add_hugeint_type():
@@ -64,10 +65,10 @@ def stream_polling(arguments):
                 retrieved_columns = grouped_columns[entry[0]]
                 built_columns = OrderedDict()  # dictionary of name -> 
data_types
                 errors = OrderedDict()
-                current_index = 7  # preference index to calculate the baskets 
sizes
+                current_index = DEFAULT_PREFERENCE_INDEX  # preference index 
to calculate the baskets sizes
                 for column in retrieved_columns:
                     if column[5] is not None:
-                        default_value = column[5][1:-1]
+                        default_value = column[5][1:-1]  # remove the ''
                     else:
                         default_value = None
                     kwargs_dic = {'name': column[1], 'type': column[2], 
'default': default_value, 'nullable': column[6],
diff --git a/clients/iotapi/src/Streams/streams.py 
b/clients/iotapi/src/Streams/streams.py
--- a/clients/iotapi/src/Streams/streams.py
+++ b/clients/iotapi/src/Streams/streams.py
@@ -80,7 +80,7 @@ class IOTStream:
         listing = [OrderedDict((('number', k), ('count', v))) for k, v in 
self._baskets.items()]
         self._baskets_lock.release()
         return (('schema', self._schema_name), ('stream', self._stream_name),
-                ('columns', [OrderedDict(value.to_json_representation()) for 
value in self._columns.values()]),
+                ('columns', [OrderedDict((value.to_json_representation())) for 
value in self._columns.values()]),
                 ('baskets_count', count), ('baskets_listing', listing))
 
     def append_basket(self, path):
diff --git a/clients/iotclient/documentation/conclusion.rst 
b/clients/iotclient/documentation/about.rst
rename from clients/iotclient/documentation/conclusion.rst
rename to clients/iotclient/documentation/about.rst
--- a/clients/iotclient/documentation/conclusion.rst
+++ b/clients/iotclient/documentation/about.rst
@@ -1,18 +1,8 @@
-.. _future_work:
-
-**********************
-Final Acknowledgements
-**********************
-
-Future Work
-===========
-
-Currently the project is on a testing phase.
-
 .. _about-the-project:
 
+*****************
 About the Project
-=================
+*****************
 
 .. _Send questions and suggestions to e-mail.: [email protected]
 
diff --git a/clients/iotclient/documentation/index.rst 
b/clients/iotclient/documentation/index.rst
--- a/clients/iotclient/documentation/index.rst
+++ b/clients/iotclient/documentation/index.rst
@@ -17,4 +17,4 @@ Contents:
    iot_server_arguments.rst
    restful_resources.rst
    streams_data_types.rst
-   conclusion.rst
+   about.rst
diff --git a/clients/iotclient/documentation/introduction.rst 
b/clients/iotclient/documentation/introduction.rst
--- a/clients/iotclient/documentation/introduction.rst
+++ b/clients/iotclient/documentation/introduction.rst
@@ -1,4 +1,4 @@
-.. _instroduction:
+.. _introduction:
 
 ************
 Introduction
diff --git a/clients/iotclient/documentation/restful_resources.rst 
b/clients/iotclient/documentation/restful_resources.rst
--- a/clients/iotclient/documentation/restful_resources.rst
+++ b/clients/iotclient/documentation/restful_resources.rst
@@ -20,33 +20,40 @@ The administration server provides resou
 
 **GET**
 
-Returns a JSON file with details about all the streams currently created on 
the webserver. For each stream besides its schema, name and if has the hostname 
column, it provides the currently number of tuples inserted on the baskets per 
column, description of columns (`See data types 
<streams_data_types.html#data_types>`__), the flushing method (`See streams 
creation for details <streams_creation.html#creating_streams>`__). An example 
is shown bellow:
+Returns a JSON file with details about all the streams currently created on 
the webserver. For each stream besides its schema, name, if has the hostname 
column and and an implicit timestamp (streams created in MonetDB don't have 
this timestamp), it provides the currently number of tuples inserted on the 
baskets per column, description of columns (`See data types 
<streams_data_types.html#data_types>`__), the flushing method (`See streams 
creation for details <streams_creation.html#creating_streams>`__). An example 
is shown bellow:
 
 .. code-block:: json
 
-       [
-         {
-           "tuples_inserted_per_basket": 1,
-           "hostname": false,
-           "columns": [
-        {
-                   "type": "real",
-                   "name": "temperature",
-                   "nullable": false
-        },
-        {
-                   "type": "text",
-                   "name": "sensorid",
-                   "nullable": false
-        }],
-           "flushing": {
-             "base": "tuple",
-             "number": 50
-           },
-           "stream": "temperature",
-           "schema": "measures"
-         }
-       ]
+       {
+           "streams_count": 1,
+        "streams_listing": [
+          {
+            "schema": "measures",
+            "stream": "temperature",
+            "has_timestamp": true,
+            "has_hostname": false,
+            "columns": [
+                {
+                    "name": "temperature",
+                    "type": "real",
+                    "default": null,
+                    "nullable": false
+                },
+                {
+                    "name": "sensorid",
+                    "type": "text",
+                    "default": null,
+                    "nullable": false
+                }
+            ],
+            "flushing": {
+              "base": "tuple",
+              "interval": 50
+              "tuples_inserted_per_basket": 0
+            }
+          }
+           ]
+    }
 
 /context
 --------
@@ -69,13 +76,13 @@ Bellow is the JSON used to create the st
       },
          "columns": [
            {
+             "name": "temperature",
              "type": "real",
-             "name": "temperature",
              "nullable": false
            },
            {
+             "name": "sensorid",
              "type": "text",
-             "name": "sensorid",
              "nullable": false
            }
          ]
@@ -102,7 +109,7 @@ The application server provides resource
 
 **GET**
 
-Same resource as streams_ .
+Provides the details of a single stream displayed in streams_ .
 
 /stream/<schema_name>/<stream_name>
 -----------------------------------
diff --git a/clients/iotclient/documentation/streams_data_types.rst 
b/clients/iotclient/documentation/streams_data_types.rst
--- a/clients/iotclient/documentation/streams_data_types.rst
+++ b/clients/iotclient/documentation/streams_data_types.rst
@@ -72,6 +72,8 @@ Tinyint, Smallint, Int, Integer, Bigint,
 
 Signed integers. The type name specifies its bit capacity. If the value is 
grater than the bit capacity, it will be truncated. The insertion must be 
provided as a JSON integer.
 
+.. warning:: At the initiation of the server, is checked if Hugeint type is 
supported. If not then it can't be used to create new streams.
+
 +--------------+----------+
 | **Type**     | **Size** |
 +--------------+----------+
@@ -86,15 +88,15 @@ Signed integers. The type name specifies
 | Hugeint      | 128      |
 +--------------+----------+
 
-Real, Float, Double
--------------------
+Real, Float, Double, Double precision
+-------------------------------------
 
 Floating point numbers. The type name specifies its bit capacity. If the value 
is grater than the bit capacity, it will be truncated. Real is 32 bit, while 
Float and Double are 64 bit. The insertion must be provided as a JSON float.
 
-Decimal, Numeric
-----------------
+Decimal, Dec, Numeric
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to