Difference between revisions of "IoTGateway/DataProcess"

From ESS-WIKI
Jump to: navigation, search
(Created page with " {| style="border-spacing:0;width:17.477cm;" |- style="background-color:#ffffff;border:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-righ...")
 
Line 125: Line 125:
 
| style="background-color:#ffffff;border-top:none;border-bottom:0.5pt solid #00000a;border-left:none;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;"> </span>
 
| style="background-color:#ffffff;border-top:none;border-bottom:0.5pt solid #00000a;border-left:none;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;"> </span>
 
| style="background-color:#ffffff;border-top:0.5pt solid #00000a;border-bottom:0.5pt solid #00000a;border-left:none;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;">any type format</span>
 
| style="background-color:#ffffff;border-top:0.5pt solid #00000a;border-bottom:0.5pt solid #00000a;border-left:none;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;">any type format</span>
 +
|-
 +
|}
 +
 +
 +
 +
 +
{| style="border-spacing:0;width:17.477cm;"
 +
|- style="background-color:#ffffff;border:none;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;"
 +
| align=center style="color:#000000;" |
 +
| colspan="2"  align=center style="color:#000000;" |
 +
| align=center style="color:#000000;" |
 +
| align=center style="color:#000000;" |
 +
| style="color:#000000;" |
 +
|- style="background-color:#ffffff;border:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;"
 +
| colspan="6"  align=center| <span style="color:#000000;">'''SQLite Methods'''</span>
 +
|-
 +
| align=center style="background-color:#ffffff;border-top:none;border-bottom:0.5pt solid #00000a;border-left:0.5pt solid #00000a;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | Item
 +
| align=center style="background-color:#ffffff;border:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | Method
 +
| colspan="4"  style="background-color:#ffffff;border-top:0.5pt solid #00000a;border-bottom:0.5pt solid #00000a;border-left:none;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | Note
 +
|-
 +
| align=center style="background-color:#ffffff;border-top:none;border-bottom:0.5pt solid #00000a;border-left:0.5pt solid #00000a;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;">1</span>
 +
| align=center style="background-color:#ffffff;border-top:none;border-bottom:0.5pt solid #00000a;border-left:0.5pt solid #00000a;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;">'''Insert'''</span>
 +
| colspan="4"  style="background-color:#ffffff;border-top:none;border-bottom:0.5pt solid #00000a;border-left:none;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;"><nowiki>*by Primary key</nowiki></span>
 +
 +
<span style="color:#000000;"><nowiki>*by Second key ( ex: HandlerName ) ( primary key => auto index )</nowiki></span>
 +
|-
 +
| align=center style="background-color:#ffffff;border-top:none;border-bottom:0.5pt solid #00000a;border-left:0.5pt solid #00000a;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;">2</span>
 +
| align=center style="background-color:#ffffff;border-top:0.5pt solid #00000a;border-bottom:0.5pt solid #00000a;border-left:none;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;">'''Update'''</span>
 +
| colspan="4"  style="background-color:#ffffff;border-top:0.5pt solid #00000a;border-bottom:0.5pt solid #00000a;border-left:none;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;">by Primary key</span>
 +
|-
 +
| align=center style="background-color:#ffffff;border-top:none;border-bottom:0.5pt solid #000001;border-left:0.5pt solid #00000a;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;">3</span>
 +
| align=center style="background-color:#ffffff;border-top:0.5pt solid #00000a;border-bottom:0.5pt solid #000001;border-left:0.5pt solid #00000a;border-right:0.5pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;">'''Query'''</span>
 +
| colspan="4"  style="background-color:#ffffff;border-top:0.5pt solid #00000a;border-bottom:0.5pt solid #00000a;border-left:none;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;"><nowiki>* by Primary key</nowiki></span>
 +
 +
<span style="color:#000000;"><nowiki>* by Search rules ( like or updatetime or latest item / order by ? (time ...) )</nowiki></span>
 +
 +
<span style="color:#000000;"><nowiki>* All ( order by time )</nowiki></span>
 +
|-
 +
| align=center style="background-color:#ffffff;border-top:none;border-bottom:0.5pt solid #000001;border-left:0.5pt solid #00000a;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;">4</span>
 +
| align=center style="background-color:#ffffff;border-top:0.5pt solid #00000a;border-bottom:0.5pt solid #000001;border-left:0.5pt solid #00000a;border-right:0.5pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;">'''Clean'''</span>
 +
| colspan="4"  style="background-color:#ffffff;border-top:0.5pt solid #00000a;border-bottom:0.5pt solid #00000a;border-left:none;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;"><nowiki>*by Primary Key</nowiki></span>
 +
 +
<span style="color:#000000;"><nowiki>*by Search rules ( like or updatetime or latest item / order by ? (time ...) )</nowiki></span>
 +
 +
<span style="color:#000000;"><nowiki>*All items of Table</nowiki></span>
 +
|-
 +
| align=center style="background-color:#ffffff;border-top:none;border-bottom:0.5pt solid #000001;border-left:0.5pt solid #00000a;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;">5</span>
 +
| align=center style="background-color:#ffffff;border-top:0.5pt solid #00000a;border-bottom:0.5pt solid #000001;border-left:0.5pt solid #00000a;border-right:0.5pt solid #000001;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;">'''Create Table'''</span>
 +
| colspan="4"  style="background-color:#ffffff;border-top:0.5pt solid #00000a;border-bottom:0.5pt solid #00000a;border-left:none;border-right:0.5pt solid #00000a;padding-top:0cm;padding-bottom:0cm;padding-left:0.049cm;padding-right:0.049cm;" | <span style="color:#000000;"><nowiki>*AutoIndex</nowiki></span>
 +
 +
<span style="color:#000000;"><nowiki>*UniqueKey</nowiki></span>
 
|-
 
|-
 
|}
 
|}

Revision as of 11:30, 5 September 2016

SQLite Table Fields ( Auto Index)
Item Field Name Type Need Format Example
1 Key Unsigned Int Must   6886 (serial number)
2 SecondKey Text Optional   Default: Hanle Name: SUSHandler
3 Protocol_Param Text Optional JSON {"Type":"MQTT","TypeId":1, "QoS":0 }
4 Message Text Optional   {IoTGW { …. } )
5 Send Flag Optional 0 or 1 1 or 0
6 Time Unsigned Int Must   33325 ( UTC in sec )
7 General Text Optional   any type format



SQLite Table Fields ( User Assign Key )
Item Field Name Type Need Format Example
1 Key Text Must   /cagent/admin/infoack
2 SecondKey Text Optional   Default: Hanle Name: SUSHandler
3 Protocol_Param Text Optional JSON {"Type":"MQTT","TypeId":1, "QoS":0 }
4 Message Text Optional   {IoTGW { …. } )
5 Send Flag Optional 0 or 1 1 or 0
6 Time Unsigned Int Must   33325 ( UTC in sec )
7 General Text Optional   any type format



SQLite Methods
Item Method Note
1 Insert *by Primary key

*by Second key ( ex: HandlerName ) ( primary key => auto index )

2 Update by Primary key
3 Query * by Primary key

* by Search rules ( like or updatetime or latest item / order by ? (time ...) )

* All ( order by time )

4 Clean *by Primary Key

*by Search rules ( like or updatetime or latest item / order by ? (time ...) )

*All items of Table

5 Create Table *AutoIndex

*UniqueKey