wecisecode vor 1 Woche
Ursprung
Commit
fb1b6311df

+ 10 - 0
odbctest/mql/basic/49mix/0100class.mql

@@ -34,6 +34,13 @@ create class if not exists /mix/mtz (
     zbigint         bigint,
     zdouble         double,
     ztext           text,
+    xprom           bucket {
+                        "type"   :  "promdb",
+                        "ttl"    :  9,
+                        "dict" 	 :	true,
+                        "version":	1,
+                        "slot"	 :  5
+                    },
     zprom           bucket {
                         "type"   :  "promdb",
                         "ttl"    :  7,
@@ -51,5 +58,8 @@ create class if not exists /mix/mtz (
 ) with nickname='mtz', core=memory
 ;
 
+alter /mix add column aprom bucket {"type":"promdb"}
+;
+
 create edge type  if not exists mix.mtx_mtz "xz"
 ;

+ 26 - 0
odbctest/mql/basic/49mix/0130insertbucket.mql

@@ -30,3 +30,29 @@ parallel(100)
 params("mtx:x{%d,filei}", [{"name": "mtx", "value": {%d,mqli}.{%d,mqli}, "timestamp": "{%2006-01-02 15:04:05,ct}", "label":"mtx{%d,filei}"}])
 **/
 ;
+
+
+insert into /mix/mtz (id, aprom) values (?,?)
+/**
+set(ct,"2025-01-01 00:02:34")
+beforerun(
+    add(ct,30,minute)
+)
+loop(48)
+parallel(100)
+params("mtz:z{%d,filei}", [{"name": "mtz", "value": {%d,mqli}.{%d,mqli}, "timestamp": "{%2006-01-02 15:04:05,ct}", "label":"mtz{%d,filei}"}])
+**/
+;
+
+
+insert into /mix/mtx (id, aprom) values (?,?)
+/**
+set(ct,"2025-01-01 00:04:56")
+beforerun(
+    add(ct,30,minute)
+)
+loop(48)
+parallel(100)
+params("mtx:x{%d,filei}", [{"name": "mtx", "value": {%d,mqli}.{%d,mqli}, "timestamp": "{%2006-01-02 15:04:05,ct}", "label":"mtx{%d,filei}"}])
+**/
+;

+ 10 - 0
odbctest/mql/basic/49mix/0151bucket.mql

@@ -30,3 +30,13 @@ output()
 match("id","mtz:z5","zprom.0.2",96)
 **/
 ;
+
+
+select id,aprom.time('2025-01-02','2025-01-04').count() from /mix/
+where aprom.time('2025-01-02','2025-01-04').count().assert($1=96)
+/**
+output()
+match("id","mtz:z5","aprom.0.2",96)
+**/
+;
+