Browse Source

add 88 local,cache,memdb

lizg 3 ngày trước cách đây
mục cha
commit
6175ddfc69

+ 10 - 0
odbctest/mql/basic/10index/88.mql

@@ -14,6 +14,7 @@ onerror(continue,`not exist`,`not find`,`not found`)
 delete from /test/性能AaB with version
 /**
 onerror(continue,`not exist`,`not find`,`not found`)
+sleep(3s)
 **/
 ;
 
@@ -41,6 +42,15 @@ create class if not exists /test/性能AaB (
 )with autosearch=true , version=false , key=manu, alias='性能测试' , nickname='性能AaB'
 ;
 
+insert into /test/性能AaB	 (id,主机AaB) values ('性能AaB:test',"服务器1");
+select count(*) from /test/性能AaB where 主机AaB='服务器1'
+/**
+output()
+count(1)
+**/
+;
+
+
 cql: select * from field where namespace='test' and name in ('主机aab','noindex')
 /**
 match("name", "主机aab", "isindex", 1)

+ 59 - 0
odbctest/mql/basic/10index/88_cache.mql

@@ -0,0 +1,59 @@
+
+delete 性能备份AaB from /test/性能AaB_Cache with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete 性能AaB from /test/性能AaB_Cache with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/性能AaB_Cache with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+drop class if exists /test/性能AaB_Cache;
+
+create class if not exists /test/性能AaB_Cache (
+    主机AaB					varchar,
+	性能备份AaB					bucket 		{
+            "dict": true,
+            "slot": 5,
+            "ttl": 2,
+            "type": "promdb",
+            "version": 1
+    },
+    noindex				varchar,
+    性能AaB				bucket 		{
+            "dict": true,
+            "slot": 5,
+            "ttl": 2,
+            "type": "promdb",
+            "version": 1
+    },
+    keys(主机AaB),
+    indexes(主机AaB )
+)with core=cacheonly, autosearch=true , version=false , key=manu, alias='性能测试' , nickname='性能AaB_Cache'
+;
+
+insert into /test/性能AaB_Cache	 (id,主机AaB) values ('性能AaB:test',"服务器1");
+select count(*) from /test/性能AaB_Cache where 主机AaB='服务器1'
+/**
+output()
+count(1)
+**/
+;
+
+cql: select * from field where namespace='test' and name in ('主机aab','noindex')
+/**
+match("name", "主机aab", "isindex", 1)
+match("name", "noindex", "isindex", 0)
+**/
+;
+
+drop class if exists /test/性能AaB_Cache;

+ 59 - 0
odbctest/mql/basic/10index/88_local.mql

@@ -0,0 +1,59 @@
+
+delete 性能备份AaB from /test/性能AaB_Local with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete 性能AaB from /test/性能AaB_Local with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/性能AaB_Local with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+drop class if exists /test/性能AaB_Local;
+
+create class if not exists /test/性能AaB_Local (
+    主机AaB					varchar,
+	性能备份AaB					bucket 		{
+            "dict": true,
+            "slot": 5,
+            "ttl": 2,
+            "type": "promdb",
+            "version": 1
+    },
+    noindex				varchar,
+    性能AaB				bucket 		{
+            "dict": true,
+            "slot": 5,
+            "ttl": 2,
+            "type": "promdb",
+            "version": 1
+    },
+    keys(主机AaB),
+    indexes(主机AaB )
+)with core=local, autosearch=true , version=false , key=manu, alias='性能测试' , nickname='性能AaB_Local'
+;
+
+insert into /test/性能AaB_Local	 (id,主机AaB) values ('性能AaB:test',"服务器1");
+select count(*) from /test/性能AaB_Local where 主机AaB='服务器1'
+/**
+output()
+count(1)
+**/
+;
+
+cql: select * from field where namespace='test' and name in ('主机aab','noindex')
+/**
+match("name", "主机aab", "isindex", 1)
+match("name", "noindex", "isindex", 0)
+**/
+;
+
+drop class if exists /test/性能AaB_Local;

+ 60 - 0
odbctest/mql/basic/10index/88_memdb.mql

@@ -0,0 +1,60 @@
+
+delete 性能备份AaB from /test/性能AaB_MemDB with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete 性能AaB from /test/性能AaB_MemDB with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/性能AaB_MemDB with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+sleep(3s)
+**/
+;
+
+drop class if exists /test/性能AaB_MemDB;
+
+create class if not exists /test/性能AaB_MemDB (
+    主机AaB					varchar,
+	性能备份AaB					bucket 		{
+            "dict": true,
+            "slot": 5,
+            "ttl": 2,
+            "type": "promdb",
+            "version": 1
+    },
+    noindex				varchar,
+    性能AaB				bucket 		{
+            "dict": true,
+            "slot": 5,
+            "ttl": 2,
+            "type": "promdb",
+            "version": 1
+    },
+    keys(主机AaB),
+    indexes(主机AaB )
+)with core=memory, autosearch=true , version=false , key=manu, alias='性能测试' , nickname='性能AaB_MemDB'
+;
+
+insert into /test/性能AaB_MemDB	 (id,主机AaB) values ('性能AaB:test',"服务器1");
+select count(*) from /test/性能AaB_MemDB where 主机AaB='服务器1'
+/**
+output()
+count(1)
+**/
+;
+
+cql: select * from field where namespace='test' and name in ('主机aab','noindex')
+/**
+match("name", "主机aab", "isindex", 1)
+match("name", "noindex", "isindex", 0)
+**/
+;
+
+drop class if exists /test/性能AaB_MemDB;