|
|
@@ -0,0 +1,147 @@
|
|
|
+
|
|
|
+delete 性能备份AaB from /tmpp/性能AaB2 with version
|
|
|
+/**
|
|
|
+onerror(continue,`not exist`,`not find`,`not found`)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+delete 性能AaB from /tmpp/性能AaB2 with version
|
|
|
+/**
|
|
|
+onerror(continue,`not exist`,`not find`,`not found`)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+delete from /tmpp/性能AaB2 with version
|
|
|
+/**
|
|
|
+onerror(continue,`not exist`,`not find`,`not found`)
|
|
|
+sleep(3s)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+drop class if exists /tmpp/性能AaB2
|
|
|
+/**
|
|
|
+output()
|
|
|
+onerror(continue,`not exist`,`not find`,`not found`)
|
|
|
+sleep(3s)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+CREATE CLASS IF NOT EXISTS /tmpp() WITH autosearch=true, version=false, key=manu, alias='tmpp', namespace='tmpp';
|
|
|
+CREATE EDGE TYPE IF NOT EXISTS tmpp.connect "连接"
|
|
|
+/**
|
|
|
+output()
|
|
|
+onerror(continue,`not exist`,`not find`,`not found`)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+create class if not exists /tmpp/性能AaB2 (
|
|
|
+ 主机AaB varchar,
|
|
|
+ v_date date,
|
|
|
+ v_timestamp timestamp,
|
|
|
+ 性能备份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, v_date, v_timestamp )
|
|
|
+)with autosearch=true , version=false , key=manu, alias='性能测试' , nickname='性能AaB2'
|
|
|
+/**
|
|
|
+output()
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+insert into /tmpp/性能AaB2 (id,主机AaB,v_date,v_timestamp) values ('性能AaB2:test',"[服务器1]","2026-04-02","2026-04-02 15:55:55");
|
|
|
+insert into /tmpp/性能AaB2 (id,主机AaB,v_date,v_timestamp) values ('性能AaB2:test2',"*服务器2?","1754-08-31","1901-08-31 15:55:55");
|
|
|
+
|
|
|
+
|
|
|
+delete 性能备份AaB from /tmpp/性能AaB2 with version
|
|
|
+/**
|
|
|
+onerror(continue,`not exist`,`not find`,`not found`)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+delete 性能AaB from /tmpp/性能AaB2 with version
|
|
|
+/**
|
|
|
+onerror(continue,`not exist`,`not find`,`not found`)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+truncate namespace tmpp ;
|
|
|
+/**
|
|
|
+output()
|
|
|
+sleep(3s)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+drop class if exists /tmpp/性能AaB2
|
|
|
+/**
|
|
|
+output()
|
|
|
+sleep(3s)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+create class if not exists /tmpp/性能AaB2 (
|
|
|
+ 主机AaB varchar,
|
|
|
+ v_date date,
|
|
|
+ v_timestamp timestamp,
|
|
|
+ 性能备份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
|
|
|
+ },
|
|
|
+
|
|
|
+ true_name double,
|
|
|
+ false_name double,
|
|
|
+ class_name double,
|
|
|
+
|
|
|
+ keys(主机AaB),
|
|
|
+ indexes(主机AaB, v_date, v_timestamp )
|
|
|
+)with autosearch=true , version=false , key=manu, alias='性能测试' , nickname='性能AaB2'
|
|
|
+/**
|
|
|
+output()
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+insert into /tmpp/性能AaB2 (id,主机AaB,v_date,v_timestamp,true_name,false_name,class_name) values ('性能AaB2:test',"[服务器1]","2026-04-02","2026-04-02 15:55:55", 0.1, 0.2, 0.3);
|
|
|
+insert into /tmpp/性能AaB2 (id,主机AaB,v_date,v_timestamp,true_name,false_name,class_name) values ('性能AaB2:test2',"*服务器2?","1754-08-31","1901-08-31 15:55:55", 0.1, 0.2, 0.3);
|
|
|
+
|
|
|
+select true_name from /tmpp/性能AaB2 where v_date='1754-08-31' refresh
|
|
|
+/**
|
|
|
+output()
|
|
|
+matchcount("true_name", 0.1, 1)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+create ("性能AaB2:test")-[:connect]->("性能AaB2:test3")
|
|
|
+/**
|
|
|
+output()
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+select class from /tmpp/性能AaB2 where id='性能AaB2:test3'
|
|
|
+/**
|
|
|
+output()
|
|
|
+matchcount("class", "/tmpp/性能aab2", 1)
|
|
|
+**/
|
|
|
+;
|