Prechádzať zdrojové kódy

move 36prepare to basic

lizg 1 deň pred
rodič
commit
ab14f12dfe

+ 1 - 1
odbctest/mql/basic/36prepare/10class.mql

@@ -17,6 +17,6 @@ create class if not exists /test/prepare (
 	)
 ;
 
-
 delete from /test/prepare with version
 ;
+

+ 124 - 0
odbctest/mql/basic/36prepare/11data.mql

@@ -297,6 +297,130 @@ params("3", `{
 **/
 ;
 
+update /test/prepare set _group = nil where v_varchar == ?
+/**
+params("*abc*")
+**/
+;
+
+select _group from /test/prepare where v_varchar=='*abc*' refresh
+/**
+count(1)
+matchcount(_group, nil, 1)
+**/
+;
+
+update /test/prepare set _group = _group + ? where v_varchar == ?
+/**
+params("aa", "*abc*")
+**/
+;
+
+select _group from /test/prepare where v_varchar=='*abc*' refresh
+/**
+count(1)
+matchcount(_group, {
+  "_all": [
+    "aa"
+  ]
+}, 1)
+**/
+;
+
+update /test/prepare set _group = _group + ? where v_varchar == ?
+/**
+params(["bb"], "*abc*")
+**/
+;
+
+select _group from /test/prepare where v_varchar=='*abc*' refresh
+/**
+count(1)
+matchcount(_group, {
+  "_all": [
+    "aa",
+	"bb"
+  ]
+}, 1)
+**/
+;
+
+update /test/prepare set _group = _group + ? where v_varchar == ?
+/**
+params(["cc"], "*abc*")
+**/
+;
+
+select _group from /test/prepare where v_varchar=='*abc*' refresh
+/**
+count(1)
+matchcount(_group, {
+  "_all": [
+    "aa",
+	"bb",
+	"cc"
+  ]
+}, 1)
+**/
+;
+
+update /test/prepare set _group = _group + ? where v_varchar == ?
+/**
+params(["dd"], "*abc*")
+**/
+;
+
+select _group from /test/prepare where v_varchar=='*abc*' refresh
+/**
+count(1)
+matchcount(_group, {
+  "_all": [
+    "aa",
+	"bb",
+	"cc",
+	"dd"
+  ]
+}, 1)
+**/
+;
+
+update /test/prepare set _group = _group - ? where v_varchar == ?
+/**
+params(["bb"], "*abc*")
+**/
+;
+
+select _group from /test/prepare where v_varchar=='*abc*' refresh
+/**
+count(1)
+matchcount(_group, {
+  "_all": [
+    "aa",
+	"cc",
+	"dd"
+  ]
+}, 1)
+**/
+;
+
+update /test/prepare set _group = _group - ? where v_varchar == ?
+/**
+params("cc", "*abc*")
+**/
+;
+
+select _group from /test/prepare where v_varchar=='*abc*' refresh
+/**
+count(1)
+matchcount(_group, {
+  "_all": [
+    "aa",
+	"dd",
+  ]
+}, 1)
+**/
+;
+
 /**
 sleep(2s)
 **/

+ 34 - 1
odbctest/mql/basic/36prepare/12valid.mql

@@ -5,9 +5,42 @@ matchcount(v_varchar, "*abc*", v_text, `hello word 2003 123-456-789 中华人民
 **/
 ;
 
-select * from /test/prepare where v_varchar=='*abc*'
+select _group from /test/prepare where v_varchar=='*abc*' refresh
 /**
+output()
 count(1)
+matchcount(_group, {
+  "_all": [
+    "aa",
+	"dd"
+  ]
+}, 1)
+**/
+;
+
+select vvv._group from /test/prepare vvv where vvv.v_varchar=='*abc*'
+/**
+output()
+count(1)
+matchcount("vvv._group", {
+  "_all": [
+    "aa",
+	"dd"
+  ]
+}, 1)
+**/
+;
+
+select order._group from /test/prepare "order" where order.v_varchar=='*abc*'
+/**
+output()
+count(1)
+matchcount("order._group", {
+  "_all": [
+    "aa",
+	"dd"
+  ]
+}, 1)
 **/
 ;
 

odbctest/mql/problem/basic/36prepare/20class.mql → odbctest/mql/basic/36prepare/20class.mql


odbctest/mql/problem/basic/36prepare/21data.mql → odbctest/mql/basic/36prepare/21data.mql


odbctest/mql/problem/basic/36prepare/22valid.mql → odbctest/mql/basic/36prepare/22valid.mql


+ 0 - 22
odbctest/mql/problem/basic/36prepare/10class.mql

@@ -1,22 +0,0 @@
-
-create class if not exists /test/prepare (
-		
-		v_varchar		varchar,
-		v_text			text,
-		v_int			int,
-		v_bigint		bigint,
-		v_smalldouble	double,
-		v_double		double,
-		v_float			float,
-		v_bool			bool,
-		v_timestamp		timestamp,
-		v_blob			blob,
-		
-		indexes(v_varchar, v_text, v_int, v_bigint, v_double, v_float, v_smalldouble, v_bool, v_timestamp),
-		keys(v_varchar, v_text)
-	)
-;
-
-delete from /test/prepare with version
-;
-

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 427
odbctest/mql/problem/basic/36prepare/11data.mql


+ 0 - 64
odbctest/mql/problem/basic/36prepare/12valid.mql

@@ -1,64 +0,0 @@
-
-select * from /test/prepare
-/**
-matchcount(v_varchar, "*abc*", v_text, `hello word 2003 123-456-789 中华人民共和国是中国的唯一合法政府,台湾是中国一部分。  Mercury, Venus2,Earch%。Mars$Uranus CeresAndJupiterOrSaturn #Neptune Pluto_Charon"\""`, 1)
-**/
-;
-
-select _group from /test/prepare where v_varchar=='*abc*' refresh
-/**
-output()
-count(1)
-matchcount(_group, {
-  "_all": [
-    "aa",
-	"dd"
-  ]
-}, 1)
-**/
-;
-
-select vvv._group from /test/prepare vvv where vvv.v_varchar=='*abc*'
-/**
-output()
-count(1)
-matchcount("vvv._group", {
-  "_all": [
-    "aa",
-	"dd"
-  ]
-}, 1)
-**/
-;
-
-select order._group from /test/prepare "order" where order.v_varchar=='*abc*'
-/**
-output()
-count(1)
-matchcount("order._group", {
-  "_all": [
-    "aa",
-	"dd"
-  ]
-}, 1)
-**/
-;
-
-select class from / where id='3991197448023402669'
-/**
-count(1)
-**/
-;
-
-select class from /test/ where id='3991197448023402669'
-/**
-count(1)
-**/
-;
-
-select class from /test/ where id='3991197448023402669' limit ?
-/**
-params(10)
-count(1)
-**/
-;

+ 0 - 43
odbctest/mql/problem/basic/36prepare/13int.mql

@@ -1,43 +0,0 @@
-
-select count(*) as count from /test/prepare where v_int = 1
-/**
-matchcount("count", 3, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_int > 0
-/**
-matchcount("count", 3, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_int < 2
-/**
-matchcount("count", 3, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_int >= 1
-/**
-matchcount("count", 3, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_int <= 1
-/**
-matchcount("count", 3, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_int >= 1.1
-/**
-matchcount("count", 0, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_int > 1
-/**
-matchcount("count", 0, 1)
-**/
-;
-

+ 0 - 12
odbctest/mql/problem/basic/36prepare/14bool.mql

@@ -1,12 +0,0 @@
-
-select count(*) as count from /test/prepare where v_bool = true
-/**
-matchcount("count", 2, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_bool = false
-/**
-matchcount("count", 1, 1)
-**/
-;

+ 0 - 30
odbctest/mql/problem/basic/36prepare/15float.mql

@@ -1,30 +0,0 @@
-
-select count(*) as count from /test/prepare where v_float >= 1.1
-/**
-matchcount("count", 3, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_float > 1
-/**
-matchcount("count", 3, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_float = 1.1
-/**
-matchcount("count", 3, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_float < 2
-/**
-matchcount("count", 3, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_float <= 1.1
-/**
-matchcount("count", 3, 1)
-**/
-;

+ 0 - 36
odbctest/mql/problem/basic/36prepare/16double.mql

@@ -1,36 +0,0 @@
-
-select * from /test/prepare where v_double >= 1.1234567890123456
-/**
-count(3)
-**/
-;
-
-select * from /test/prepare where v_smalldouble >= 1.123456
-/**
-count(3)
-**/
-;
-
-select count(*) as count from /test/prepare where v_double > 1
-/**
-matchcount("count", 3, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_double = 1.1234567890123456
-/**
-matchcount("count", 3, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_double < 2
-/**
-matchcount("count", 3, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_double <= 1.1234567890123456
-/**
-matchcount("count", 3, 1)
-**/
-;

+ 0 - 30
odbctest/mql/problem/basic/36prepare/17prefix.mql

@@ -1,30 +0,0 @@
-
-select count(*) as count from /test/prepare where v_text=^'hell'
-/**
-matchcount("count", 1, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_text='*20*'
-/**
-matchcount("count", 1, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_text='*123-456*'
-/**
-matchcount("count", 1, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_text='*中*'
-/**
-matchcount("count", 1, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_text='*magni*'
-/**
-matchcount("count", 1, 1)
-**/
-;

+ 0 - 30
odbctest/mql/problem/basic/36prepare/18fullsearch.mql

@@ -1,30 +0,0 @@
-
-select count(*) as count from /test/prepare where v_text='hello'
-/**
-matchcount("count", 1, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_text='2003'
-/**
-matchcount("count", 1, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_text='123-456-789'
-/**
-matchcount("count", 1, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_text='中国'
-/**
-matchcount("count", 1, 1)
-**/
-;
-
-select count(*) as count from /test/prepare where v_text='magnitude'
-/**
-matchcount("count", 1, 1)
-**/
-;

+ 0 - 6
odbctest/mql/problem/basic/36prepare/19notin.mql

@@ -1,6 +0,0 @@
-
-select count(*) as count from /test/prepare where v_varchar not in('2', '3')
-/**
-matchcount("count", 1, 1)
-**/
-;