Browse Source

odbctest mql

wecisecode 1 week ago
parent
commit
ec34f1ccd3
100 changed files with 6440 additions and 3 deletions
  1. 3 3
      go.mod
  2. 4 0
      go.sum
  3. 12 0
      odbctest/mql/0/0.mql
  4. 14 0
      odbctest/mql/0/1001.mql
  5. 8 0
      odbctest/mql/0/11/1201drop.mql
  6. 3 0
      odbctest/mql/0/11/1210create.mql
  7. 43 0
      odbctest/mql/0/11/1211create.mql
  8. 40 0
      odbctest/mql/0/11/1212create.mql
  9. 161 0
      odbctest/mql/0/11/1213create.mql
  10. 36 0
      odbctest/mql/0/11/1214create.mql
  11. 5 0
      odbctest/mql/0/11/1219wait.mql
  12. 7 0
      odbctest/mql/0/11/1220check.mql
  13. 6 0
      odbctest/mql/0/12/1200init.mql
  14. 24 0
      odbctest/mql/0/12/1201delete.mql
  15. 10 0
      odbctest/mql/0/12/1201drop.mql
  16. 3 0
      odbctest/mql/0/12/1210create.mql
  17. 43 0
      odbctest/mql/0/12/1211create.mql
  18. 40 0
      odbctest/mql/0/12/1212create.mql
  19. 161 0
      odbctest/mql/0/12/1213create.mql
  20. 36 0
      odbctest/mql/0/12/1214create.mql
  21. 5 0
      odbctest/mql/0/12/1219wait.mql
  22. 8 0
      odbctest/mql/0/12/1220check.mql
  23. 3 0
      odbctest/mql/0/12/1231insert.mql
  24. 4 0
      odbctest/mql/0/12/1232insert.mql
  25. 3 0
      odbctest/mql/0/12/1233insert.mql
  26. 3 0
      odbctest/mql/0/12/1234insert.mql
  27. 6 0
      odbctest/mql/0/12/1239sleep.mql
  28. 11 0
      odbctest/mql/0/12/1240select.mql
  29. 23 0
      odbctest/mql/0/610delete.mql
  30. 8 0
      odbctest/mql/0/612drop.mql
  31. 21 0
      odbctest/mql/0/614create.mql
  32. 10 0
      odbctest/mql/0/616insert.mql
  33. 28 0
      odbctest/mql/0/617select.mql
  34. 35 0
      odbctest/mql/0/724.1230.data2.mql
  35. 9 0
      odbctest/mql/0/771.mql
  36. 8 0
      odbctest/mql/0/772.mql
  37. 35 0
      odbctest/mql/0/773.mql
  38. 65 0
      odbctest/mql/0/774.authinfo.mql
  39. 61 0
      odbctest/mql/0/775.promdb.statis.mql
  40. 40 0
      odbctest/mql/0/776.between.mql
  41. 15 0
      odbctest/mql/0/776.delete.mql
  42. 40 0
      odbctest/mql/0/777.uino.test.mql
  43. 61 0
      odbctest/mql/0/779desc.mql
  44. 61 0
      odbctest/mql/0/801.cassdb.like.mql
  45. 59 0
      odbctest/mql/0/801.memdb.like.mql
  46. 14 0
      odbctest/mql/0/901keyspace.mql
  47. 121 0
      odbctest/mql/0/901schema.mql
  48. 30 0
      odbctest/mql/0/902.updaterelation.mql
  49. 7 0
      odbctest/mql/0/911.mql
  50. 2408 0
      odbctest/mql/0/991import.mql
  51. 54 0
      odbctest/mql/0/999help.mql
  52. 73 0
      odbctest/mql/0/aggr/1.mql
  53. 49 0
      odbctest/mql/0/cast/1.mql
  54. 4 0
      odbctest/mql/0/connect/1.mql
  55. 62 0
      odbctest/mql/0/json/1.mql
  56. 6 0
      odbctest/mql/0/json/2.mql
  57. 35 0
      odbctest/mql/0/search/1.mql
  58. 8 0
      odbctest/mql/0/timeout/1.mql
  59. 6 0
      odbctest/mql/auth/0.mql
  60. 76 0
      odbctest/mql/auth/1.mql
  61. 27 0
      odbctest/mql/auth/2.mql
  62. 9 0
      odbctest/mql/auth/3.mql
  63. 5 0
      odbctest/mql/basic/00init/00init.mql
  64. 5 0
      odbctest/mql/basic/01clear/00init.mql
  65. 600 0
      odbctest/mql/basic/01clear/1_delete_all_test_data.mql
  66. 124 0
      odbctest/mql/basic/01clear/2_drop_all_test_class.mql
  67. 12 0
      odbctest/mql/basic/10basic/00init.mql
  68. 42 0
      odbctest/mql/basic/10basic/10class.mql
  69. 317 0
      odbctest/mql/basic/10basic/11data.mql
  70. 34 0
      odbctest/mql/basic/10basic/12data.mql
  71. 5 0
      odbctest/mql/basic/10basic/14sleep.mql
  72. 35 0
      odbctest/mql/basic/10basic/15.valid.mql
  73. 23 0
      odbctest/mql/basic/10basic/16.vfieldicase.mql
  74. 49 0
      odbctest/mql/basic/10basic/17.int.mql
  75. 9 0
      odbctest/mql/basic/10basic/18.bigint.mql
  76. 12 0
      odbctest/mql/basic/10basic/19.bool.mql
  77. 37 0
      odbctest/mql/basic/10basic/21.float.mql
  78. 36 0
      odbctest/mql/basic/10basic/23.double.mql
  79. 6 0
      odbctest/mql/basic/10basic/25.notin.mql
  80. 30 0
      odbctest/mql/basic/10basic/27.prefix.mql
  81. 30 0
      odbctest/mql/basic/10basic/29.fullsearch.mql
  82. 20 0
      odbctest/mql/basic/10basic/31.aggr.mql
  83. 13 0
      odbctest/mql/basic/10basic/33.privatefield.mql
  84. 33 0
      odbctest/mql/basic/10basic/33update.mql
  85. 43 0
      odbctest/mql/basic/10basic/34multilines.mql
  86. 18 0
      odbctest/mql/basic/10basic/35offset.mql
  87. 39 0
      odbctest/mql/basic/10basic/36between.mql
  88. 33 0
      odbctest/mql/basic/10basic/39init.mql
  89. 14 0
      odbctest/mql/basic/10basic/40delete.mql
  90. 55 0
      odbctest/mql/basic/10basic/41.insert.mql
  91. 19 0
      odbctest/mql/basic/10basic/42.aggr.mql
  92. 12 0
      odbctest/mql/basic/10cachedb/00init.mql
  93. 32 0
      odbctest/mql/basic/10cachedb/10class.mql
  94. 302 0
      odbctest/mql/basic/10cachedb/12data2.mql
  95. 5 0
      odbctest/mql/basic/10cachedb/14sleep.mql
  96. 30 0
      odbctest/mql/basic/10cachedb/16.valid2.mql
  97. 49 0
      odbctest/mql/basic/10cachedb/18.int2.mql
  98. 12 0
      odbctest/mql/basic/10cachedb/20.bool2.mql
  99. 30 0
      odbctest/mql/basic/10cachedb/22.float2.mql
  100. 0 0
      odbctest/mql/basic/10cachedb/24.double2.mql

+ 3 - 3
go.mod

@@ -5,14 +5,14 @@ go 1.23.0
 toolchain go1.24.5
 
 require (
-	git.wecise.com/wecise/odb-go v0.0.0-20250905072406-e0b4d1274a21
-	gitee.com/wecisecode/util v0.6.8
+	git.wecise.com/wecise/odb-go v0.0.0-20251201102355-039f9bcd8863
+	gitee.com/wecisecode/util v0.7.1
 	github.com/scylladb/go-set v1.0.3-0.20200225121959-cc7b2070d91e
 	github.com/spf13/cast v1.7.1
 )
 
 require (
-	git.wecise.com/wecise/util v0.0.0-20250905072004-03c62a4f8b4f // indirect
+	git.wecise.com/wecise/util v0.0.0-20251201044419-16d23ba20272 // indirect
 	github.com/bluele/gcache v0.0.2 // indirect
 	github.com/cespare/xxhash/v2 v2.2.0 // indirect
 	github.com/coreos/go-semver v0.3.0 // indirect

+ 4 - 0
go.sum

@@ -1,9 +1,13 @@
 git.wecise.com/wecise/odb-go v0.0.0-20250905072406-e0b4d1274a21 h1:eOgzuB0eu5wOyDYUtjLGmg/eDi/eOr+YdyWQAngZFSM=
 git.wecise.com/wecise/odb-go v0.0.0-20250905072406-e0b4d1274a21/go.mod h1:r9fQ/IV3E2jYTEyvbkl/KmFov7NdJsfZ0A8LJeSaci0=
+git.wecise.com/wecise/odb-go v0.0.0-20251201102355-039f9bcd8863 h1:iEnleVsKZxmynB2fOJhsW4emmRSpz7crSLK3uKYixVs=
+git.wecise.com/wecise/odb-go v0.0.0-20251201102355-039f9bcd8863/go.mod h1:lnHE+OhtLDzkPzGWj2rbdDVQ52QzYY4WV8Sueso7/DA=
 git.wecise.com/wecise/util v0.0.0-20250905072004-03c62a4f8b4f h1:h2Dfz8JZXksHzxkh6bGZ3de9soUMOFJIE3UtkPoTC94=
 git.wecise.com/wecise/util v0.0.0-20250905072004-03c62a4f8b4f/go.mod h1:QKWJa70rL4bA4SWuH5sS3QAraETdUyVetNtBYmM1Vgo=
+git.wecise.com/wecise/util v0.0.0-20251201044419-16d23ba20272/go.mod h1:KmBNTlrqY5IH6gkuQ9cr43g7stJWNJ7VhIv1Faod5Z0=
 gitee.com/wecisecode/util v0.6.8 h1:vFwHrBvws5EmPKiDmdBKWYaucPNtca/Ahs9e+ucNVXc=
 gitee.com/wecisecode/util v0.6.8/go.mod h1:da49ZLqcSfpA+zYJhhc67Xw0sKVw8dCaaZSTzzr513s=
+gitee.com/wecisecode/util v0.7.1/go.mod h1:da49ZLqcSfpA+zYJhhc67Xw0sKVw8dCaaZSTzzr513s=
 github.com/bluele/gcache v0.0.2 h1:WcbfdXICg7G/DGBh1PFfcirkWOQV+v077yF1pSy3DGw=
 github.com/bluele/gcache v0.0.2/go.mod h1:m15KV+ECjptwSPxKhOhQoAFQVtUFjTVkc3H8o0t/fp0=
 github.com/bsm/ginkgo/v2 v2.7.0 h1:ItPMPH90RbmZJt5GtkcNvIRuGEdwlBItdNVoyzaNQao=

+ 12 - 0
odbctest/mql/0/0.mql

@@ -0,0 +1,12 @@
+
+
+
+
+MATCH (:/matrix/oo/automobile/)-[*]->(:/matrix/oo/ where brand = '普利司通' or brand = '立中车轮')
+/**
+output()
+match("graph.nodes.len", 65)
+match("graph.edges.len", 60)
+**/
+;
+

+ 14 - 0
odbctest/mql/0/1001.mql

@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+createclassif not exists/test/001(001 int,002 varchar);
+insertinto/test/001(001,002)values(1,'1');
+select*from/test/001/**output()**/;
+deletefrom/test/001 withversion;
+dropclass/test/001;
+

+ 8 - 0
odbctest/mql/0/11/1201drop.mql

@@ -0,0 +1,8 @@
+
+drop class if exists /mingdao1/case;
+drop class if exists /mingdao1/contract;
+drop class if exists /mingdao1/project;
+drop class if exists /mingdao1/staff;
+
+drop class if exists /mingdao1;
+

+ 3 - 0
odbctest/mql/0/11/1210create.mql

@@ -0,0 +1,3 @@
+
+create class if not exists /mingdao1 () with namespace='mingdao1'
+;

+ 43 - 0
odbctest/mql/0/11/1211create.mql

@@ -0,0 +1,43 @@
+
+create class if not exists /mingdao1/case ( 
+		attr0				varchar	"Case编号",
+		attr1				varchar	"Case类型",
+		attr10			varchar	"Case标签(必填,方案提供人填写)",
+		attr11			varchar	"Case解决方式(必填,方案提供人填写)",
+		attr14			varchar	"问题现象描述",
+		attr15			varchar	"Case发生根本原因(必填,方案提供人填写)",
+		attr16			varchar	"选择故障原因(可多选)",
+		attr19			varchar	"提交时间",
+		attr2				varchar	"Case来源",
+		attr20			varchar	"最新处理时间",
+		attr21			int	"已经历时长(小时)",
+		attr22			varchar	"初次响应时间",
+		attr24			varchar	"初次提交方案时间",
+		attr3				varchar	"Case状态",
+		attr30			varchar	"关闭时间",
+		attr32			varchar	"流转到下一团队",
+		attr33			varchar	"内部小组",
+		attr34			varchar	"问题初次处理小组",
+		attr4				varchar	"Case技术分类",
+		attr6				varchar	"故障现象(查看已发生的故障现象,查看现象发生原因及排查步骤解决方法)",
+		attr7				varchar	"级别(更新频率)",
+		attr8				varchar	"Case主题",
+		attr9				varchar	"Case/漏洞的详细描述(复现问题操作+解决什么问题)(有的Case描述需要有前后对比判断哪个正常哪个不正常)(信息的完整、清楚、正确有助于排查解决)",
+		attr12			varchar	"修复状态(漏洞类问题修复完成必填)",
+		attr13			varchar	"修复版本/补丁路径(漏洞类问题修复完成必填)",
+		attr17			varchar	"Case关闭总结(故障问题需填写排查步骤和解决方案)(必填,方案提供人填写)",
+		attr18			int	"Case总结对排查手册价值",
+		attr23			int	"初次响应经历时长(分钟)",
+		attr25			int	"初次提交方案时长(分钟)",
+		attr26			int	"提交方案累积时长(分钟)",
+		attr27			int	"响应次数",
+		attr28			int	"提交方案次数",
+		attr29			int	"打回次数",
+		attr31			int	"关闭时长(小时)",
+		attr5				date	"期望解决时间"
+
+		)with autosearch=true , version=false , key=manu, alias='CASE信息' , nickname='mingdao1_case' 
+/**
+fork(a)
+**/;
+

+ 40 - 0
odbctest/mql/0/11/1212create.mql

@@ -0,0 +1,40 @@
+
+create class if not exists /mingdao1/contract ( 
+		attr0				varchar	"合同总表-优-id",
+		attr1				varchar	"合同总表-优",
+		attr10			varchar	"校企合作项目",
+		attr11			varchar	"主题场景",
+		attr14			varchar	"所在省份",
+		attr19			varchar	"地区",
+		attr2				varchar	"合同编号-优",
+		attr20			varchar	"事业部",
+		attr22			varchar	"部门",
+		attr23			varchar	"销售小组",
+		attr24			varchar	"组别",
+		attr25			varchar	"项目需求描述",
+		attr3				varchar	"所属行业",
+		attr30			varchar	"合同归档状态-优",
+		attr4				varchar	"客户全称",
+		attr5				varchar	"渠道全称",
+		attr6				varchar	"城市",
+		attr7				varchar	"集成总包项目金额(元)",
+		attr8				varchar	"合同类别",
+		attr9				varchar	"是否重点关注",
+		attr12			varchar	"项目成本",
+		attr13			varchar	"行业",
+		attr15			double	"机会总额",
+		attr16			double	"不含税额",
+		attr17			double	"外包金额(元)",
+		attr18			double	"净合同额",
+		attr21			varchar	"销售类别",
+		attr26			double	"总成本(POC+售前+售后+差旅+总部)不含提货",
+		attr27			double	"不含税总金额",
+		attr28			double	"项目毛利率:(不含税总额-总成本-外包不含税额)/(不含税-外包/1.06)",
+		attr29			double	"赚钱(利润)",
+		attr31			double	"回款完成比例-U"
+
+		)with autosearch=true , version=false , key=manu, alias='合同信息' , nickname='mingdao1_contract' 
+/**
+fork(a)
+**/;
+

+ 161 - 0
odbctest/mql/0/11/1213create.mql

@@ -0,0 +1,161 @@
+
+create class if not exists /mingdao1/project ( 
+		attr0				varchar	"项目ID",
+		attr1				varchar	"合同编号",
+		attr10			varchar	"产品信息(合同)",
+		attr100			double	"实施人员成本",
+		attr101			double	"开发人员工时",
+		attr102			double	"开发人员成本",
+		attr103			double	"项目经理工时",
+		attr104			double	"项目经理成本",
+		attr105			double	"设计人员工时",
+		attr106			double	"设计人员成本",
+		attr107			double	"模型人员工时",
+		attr108			double	"模型人员成本",
+		attr109			double	"实习人员工时",
+		attr11			varchar	"采纳的技术平台",
+		attr110			double	"实习人员成本",
+		attr111			double	"其他人员工时(需修改)",
+		attr112			double	"其他人员成本(需修改)",
+		attr113			double	"总部定制开发总工时",
+		attr114			double	"总部定制开发总工时成本",
+		attr115			double	"总部建模工时",
+		attr116			double	"总部建模成本",
+		attr117			double	"总部开发-北京工时",
+		attr118			double	"总部开发-北京成本",
+		attr119			double	"总部开发-南京武汉工时",
+		attr120			double	"总部开发-南京武汉成本",
+		attr121			double	"总部开发-EA工时",
+		attr122			double	"总部开发-EA成本",
+		attr123			double	"总部开发-设计工时",
+		attr124			double	"总部开发-设计成本",
+		attr125			double	"总部开发-森学院工时",
+		attr126			double	"总部开发-森学院成本",
+		attr127			double	"总部开发-U产品研发部开发工时",
+		attr128			double	"总部开发-U产品研发部开发工时成本",
+		attr129			double	"总部开发-实习人员工时",
+		attr13			date	"授权到期日期-1",
+		attr130			double	"总部开发-实习人员成本",
+		attr131			varchar	"格式调整-2",
+		attr132			double	"差旅成本-手工记录(元)",
+		attr133			double	"提货成本",
+		attr134			double	"外包成本(不含税)",
+		attr135			double	"项目总工时",
+		attr136			double	"项目总工时成本",
+		attr137			double	"其中:项目售后工时",
+		attr138			double	"售后工时占比",
+		attr139			double	"项目总成本(包含:总工时成本+差旅成本+提货成本)",
+		attr140			double	"项目实际公司毛利率",
+		attr141			double	"预审事业部毛利率",
+		attr142			double	"预审公司毛利率",
+		attr143			double	"实际工时VS.预审工时",
+		attr144			double	"超额工时占比",
+		attr145			double	"实际毛利率VS.预审毛利率",
+		attr146			double	"实际毛利率VS.预审毛利率【数值】(%)",
+		attr147			varchar	"毛利率说明",
+		attr148			date	"毛利差首次低于0%",
+		attr149			varchar	"记录rowId",
+		attr150			varchar	"里程碑",
+		attr151			timestamp	"创建时间",
+		attr152			timestamp	"最近修改时间",
+		attr19			varchar	"项目机会名称",
+		attr2				varchar	"签约客户名称",
+		attr20			varchar	"阶段名称",
+		attr22			varchar	"责任销售(售前)",
+		attr23			varchar	"部门(售前)",
+		attr24			varchar	"事业部(售前)",
+		attr25			varchar	"项目经理(售前)",
+		attr28			varchar	"售前项目是否可在今年验收",
+		attr29			varchar	"售前项目可在今年验收状态",
+		attr3				varchar	"项目名称",
+		attr30			varchar	"项目经理*",
+		attr31			varchar	"非我司交付类型",
+		attr32			varchar	"支持售前",
+		attr33			varchar	"所属事业部",
+		attr34			varchar	"所属部门(销售)",
+		attr35			varchar	"销售所在部门",
+		attr36			varchar	"TAPD链接(应用交付项目敏捷研发协作地址)",
+		attr37			varchar	"是否为大项目",
+		attr38			date	"周报更新日期",
+		attr39			varchar	"项目活跃度",
+		attr40			varchar	"项目状态",
+		attr41			date	"项目启动时间",
+		attr42			date	"项目承诺完成时间",
+		attr43			int	"项目完成百分比(%)",
+		attr44			date	"项目计划完成时间",
+		attr45			date	"项目实际完成时间",
+		attr46			date	"进场时间(入场通知书)",
+		attr47			int	"延期天数(天)",
+		attr48			varchar	"是否延期",
+		attr49			int	"checklist提交情况",
+		attr5				varchar	"行业",
+		attr50			varchar	"计划延期情况说明",
+		attr51			int	"提前启动至今天数(天)",
+		attr52			int	"提前启动至签约天数(天)",
+		attr53			varchar	"验收报告提醒",
+		attr54			date	"【PM】预计验收报告签回时间",
+		attr55			varchar	"(PM)收入承诺状态",
+		attr56			date	"【销售】预计签回验收报告日期",
+		attr57			varchar	"(销售)收入承诺状态",
+		attr58			date	"项目验收报告时间",
+		attr59			varchar	"是否跨期调整",
+		attr6				varchar	"合同归档状态",
+		attr60			date	"项目完工报告时间",
+		attr61			date	"发送预计完成时间",
+		attr62			date	"内部启动评审时间",
+		attr63			date	"内部结项评审时间",
+		attr64			date	"取消/终止时间",
+		attr65			varchar	"合同终止/取消原因",
+		attr66			double	"合同总金额",
+		attr67			double	"不含税总金额",
+		attr68			double	"外包实际金额",
+		attr69			double	"净合同额",
+		attr7				varchar	"原售前项目编号",
+		attr70			double	"回款金额",
+		attr71			double	"回款比例",
+		attr72			int	"剩余未回款金额(元)",
+		attr73			varchar	"收入认列依据",
+		attr74			date	"收入确认年月",
+		attr75			varchar	"已完成里程碑",
+		attr76			varchar	"财务回款目标",
+		attr77			varchar	"已完成财务目标",
+		attr78			double	"预估工时汇总",
+		attr79			double	"预估人天汇总",
+		attr8				varchar	"项目密级",
+		attr80			double	"预估成本汇总",
+		attr81			double	"PM-预计工时",
+		attr82			double	"实施-预计工时",
+		attr83			double	"区域开发-预计工时",
+		attr84			double	"设计-预计工时",
+		attr85			double	"其他-预计工时",
+		attr86			double	"模型-预计工时",
+		attr87			double	"总部开发-预计工时",
+		attr88			double	"实习-预计工时",
+		attr89			int	"PM-预计人天",
+		attr9				varchar	"省份",
+		attr90			int	"实施-预计人天",
+		attr91			int	"区域开发-预计人天",
+		attr92			int	"设计-预计人天",
+		attr93			int	"其他-预计人天",
+		attr94			int	"模型-预计人天",
+		attr95			int	"总部开发-预计人天",
+		attr96			int	"实习-预计人天",
+		attr97			double	"BU交付总工时",
+		attr98			double	"BU交付总工时成本",
+		attr99			double	"实施人员工时",
+		attr12			varchar	"产品版本",
+		attr14			date	"授权到期日期-2",
+		attr15			date	"授权到期日期-3",
+		attr16			date	"授权到期日期-4",
+		attr17			varchar	"项目整体需求概况",
+		attr18			varchar	"干系人管理",
+		attr21			double	"机会总额",
+		attr26			date	"申请提前入场时间",
+		attr27			date	"预计签约时间",
+		attr4				date	"签约日期"
+
+		)with autosearch=true , version=false , key=manu, alias='项目信息' , nickname='mingdao1_project' 
+/**
+fork(a)
+**/;
+

+ 36 - 0
odbctest/mql/0/11/1214create.mql

@@ -0,0 +1,36 @@
+
+create class if not exists /mingdao1/staff ( 
+		attr0				varchar	"工号",
+		attr1				varchar	"员工姓名",
+		attr10			varchar	"职位",
+		attr11			varchar	"部门主管",
+		attr12			double	"手机号码",
+		attr13			date	"入职日期",
+		attr14			varchar	"在职状态",
+		attr15			varchar	"HR接口人",
+		attr16			varchar	"辅助HR接口人",
+		attr17			date	"转正日期",
+		attr18			date	"离职日期",
+		attr19			varchar	"岗位名称",
+		attr2				varchar	"系统账号ID",
+		attr20			varchar	"职能侧",
+		attr21			int	"人天成本(元)",
+		attr22			varchar	"工时填报类型",
+		attr23			varchar	"事业部",
+		attr24			varchar	"部门(三级)",
+		attr25			varchar	"归属小组(四级)",
+		attr26			varchar	"城市",
+		attr27			varchar	"邮箱",
+		attr3				varchar	"base地",
+		attr4				varchar	"一级部门",
+		attr5				varchar	"二级部门",
+		attr6				varchar	"三级部门",
+		attr7				varchar	"四级部门",
+		attr8				varchar	"五级部门",
+		attr9				varchar	"成本中心"
+
+		)with autosearch=true , version=false , key=manu, alias='员工信息' , nickname='mingdao1_staff' 
+/**
+fork(a)
+**/;
+

+ 5 - 0
odbctest/mql/0/11/1219wait.mql

@@ -0,0 +1,5 @@
+
+/**
+wait(a)
+**/;
+

+ 7 - 0
odbctest/mql/0/11/1220check.mql

@@ -0,0 +1,7 @@
+
+select name,colname from /system/field where namespace='mingdao1' and name in ('attr18','mingdao1_contract:attr18','mingdao1_project:attr18','mingdao1_staff:attr18')
+/**
+output()
+count(4)
+**/
+;

+ 6 - 0
odbctest/mql/0/12/1200init.mql

@@ -0,0 +1,6 @@
+
+/**
+scope(dir)
+loop(100)
+**/
+;

+ 24 - 0
odbctest/mql/0/12/1201delete.mql

@@ -0,0 +1,24 @@
+
+
+
+delete from /mingdao1/case with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+delete from /mingdao1/contract with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+delete from /mingdao1/project with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+delete from /mingdao1/staff with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+

+ 10 - 0
odbctest/mql/0/12/1201drop.mql

@@ -0,0 +1,10 @@
+
+
+ 
+drop class if exists /mingdao1/case;
+drop class if exists /mingdao1/contract;
+drop class if exists /mingdao1/project;
+drop class if exists /mingdao1/staff;
+
+drop class if exists /mingdao1;
+

+ 3 - 0
odbctest/mql/0/12/1210create.mql

@@ -0,0 +1,3 @@
+
+create class if not exists /mingdao1 () with namespace='mingdao1'
+;

+ 43 - 0
odbctest/mql/0/12/1211create.mql

@@ -0,0 +1,43 @@
+
+create class if not exists /mingdao1/case ( 
+		attr0				varchar	"Case编号",
+		attr1				varchar	"Case类型",
+		attr10			varchar	"Case标签(必填,方案提供人填写)",
+		attr11			varchar	"Case解决方式(必填,方案提供人填写)",
+		attr14			varchar	"问题现象描述",
+		attr15			varchar	"Case发生根本原因(必填,方案提供人填写)",
+		attr16			varchar	"选择故障原因(可多选)",
+		attr19			varchar	"提交时间",
+		attr2				varchar	"Case来源",
+		attr20			varchar	"最新处理时间",
+		attr21			int	"已经历时长(小时)",
+		attr22			varchar	"初次响应时间",
+		attr24			varchar	"初次提交方案时间",
+		attr3				varchar	"Case状态",
+		attr30			varchar	"关闭时间",
+		attr32			varchar	"流转到下一团队",
+		attr33			varchar	"内部小组",
+		attr34			varchar	"问题初次处理小组",
+		attr4				varchar	"Case技术分类",
+		attr6				varchar	"故障现象(查看已发生的故障现象,查看现象发生原因及排查步骤解决方法)",
+		attr7				varchar	"级别(更新频率)",
+		attr8				varchar	"Case主题",
+		attr9				varchar	"Case/漏洞的详细描述(复现问题操作+解决什么问题)(有的Case描述需要有前后对比判断哪个正常哪个不正常)(信息的完整、清楚、正确有助于排查解决)",
+		attr12			varchar	"修复状态(漏洞类问题修复完成必填)",
+		attr13			varchar	"修复版本/补丁路径(漏洞类问题修复完成必填)",
+		attr17			varchar	"Case关闭总结(故障问题需填写排查步骤和解决方案)(必填,方案提供人填写)",
+		attr18			int	"Case总结对排查手册价值",
+		attr23			int	"初次响应经历时长(分钟)",
+		attr25			int	"初次提交方案时长(分钟)",
+		attr26			int	"提交方案累积时长(分钟)",
+		attr27			int	"响应次数",
+		attr28			int	"提交方案次数",
+		attr29			int	"打回次数",
+		attr31			int	"关闭时长(小时)",
+		attr5				date	"期望解决时间"
+
+		)with autosearch=true , version=false , key=manu, alias='CASE信息' , nickname='mingdao1_case' 
+/**
+fork(a)
+**/;
+

+ 40 - 0
odbctest/mql/0/12/1212create.mql

@@ -0,0 +1,40 @@
+
+create class if not exists /mingdao1/contract ( 
+		attr0				varchar	"合同总表-优-id",
+		attr1				varchar	"合同总表-优",
+		attr10			varchar	"校企合作项目",
+		attr11			varchar	"主题场景",
+		attr14			varchar	"所在省份",
+		attr19			varchar	"地区",
+		attr2				varchar	"合同编号-优",
+		attr20			varchar	"事业部",
+		attr22			varchar	"部门",
+		attr23			varchar	"销售小组",
+		attr24			varchar	"组别",
+		attr25			varchar	"项目需求描述",
+		attr3				varchar	"所属行业",
+		attr30			varchar	"合同归档状态-优",
+		attr4				varchar	"客户全称",
+		attr5				varchar	"渠道全称",
+		attr6				varchar	"城市",
+		attr7				varchar	"集成总包项目金额(元)",
+		attr8				varchar	"合同类别",
+		attr9				varchar	"是否重点关注",
+		attr12			varchar	"项目成本",
+		attr13			varchar	"行业",
+		attr15			double	"机会总额",
+		attr16			double	"不含税额",
+		attr17			double	"外包金额(元)",
+		attr18			double	"净合同额",
+		attr21			varchar	"销售类别",
+		attr26			double	"总成本(POC+售前+售后+差旅+总部)不含提货",
+		attr27			double	"不含税总金额",
+		attr28			double	"项目毛利率:(不含税总额-总成本-外包不含税额)/(不含税-外包/1.06)",
+		attr29			double	"赚钱(利润)",
+		attr31			double	"回款完成比例-U"
+
+		)with autosearch=true , version=false , key=manu, alias='合同信息' , nickname='mingdao1_contract' 
+/**
+fork(a)
+**/;
+

+ 161 - 0
odbctest/mql/0/12/1213create.mql

@@ -0,0 +1,161 @@
+
+create class if not exists /mingdao1/project ( 
+		attr0				varchar	"项目ID",
+		attr1				varchar	"合同编号",
+		attr10			varchar	"产品信息(合同)",
+		attr100			double	"实施人员成本",
+		attr101			double	"开发人员工时",
+		attr102			double	"开发人员成本",
+		attr103			double	"项目经理工时",
+		attr104			double	"项目经理成本",
+		attr105			double	"设计人员工时",
+		attr106			double	"设计人员成本",
+		attr107			double	"模型人员工时",
+		attr108			double	"模型人员成本",
+		attr109			double	"实习人员工时",
+		attr11			varchar	"采纳的技术平台",
+		attr110			double	"实习人员成本",
+		attr111			double	"其他人员工时(需修改)",
+		attr112			double	"其他人员成本(需修改)",
+		attr113			double	"总部定制开发总工时",
+		attr114			double	"总部定制开发总工时成本",
+		attr115			double	"总部建模工时",
+		attr116			double	"总部建模成本",
+		attr117			double	"总部开发-北京工时",
+		attr118			double	"总部开发-北京成本",
+		attr119			double	"总部开发-南京武汉工时",
+		attr120			double	"总部开发-南京武汉成本",
+		attr121			double	"总部开发-EA工时",
+		attr122			double	"总部开发-EA成本",
+		attr123			double	"总部开发-设计工时",
+		attr124			double	"总部开发-设计成本",
+		attr125			double	"总部开发-森学院工时",
+		attr126			double	"总部开发-森学院成本",
+		attr127			double	"总部开发-U产品研发部开发工时",
+		attr128			double	"总部开发-U产品研发部开发工时成本",
+		attr129			double	"总部开发-实习人员工时",
+		attr13			date	"授权到期日期-1",
+		attr130			double	"总部开发-实习人员成本",
+		attr131			varchar	"格式调整-2",
+		attr132			double	"差旅成本-手工记录(元)",
+		attr133			double	"提货成本",
+		attr134			double	"外包成本(不含税)",
+		attr135			double	"项目总工时",
+		attr136			double	"项目总工时成本",
+		attr137			double	"其中:项目售后工时",
+		attr138			double	"售后工时占比",
+		attr139			double	"项目总成本(包含:总工时成本+差旅成本+提货成本)",
+		attr140			double	"项目实际公司毛利率",
+		attr141			double	"预审事业部毛利率",
+		attr142			double	"预审公司毛利率",
+		attr143			double	"实际工时VS.预审工时",
+		attr144			double	"超额工时占比",
+		attr145			double	"实际毛利率VS.预审毛利率",
+		attr146			double	"实际毛利率VS.预审毛利率【数值】(%)",
+		attr147			varchar	"毛利率说明",
+		attr148			date	"毛利差首次低于0%",
+		attr149			varchar	"记录rowId",
+		attr150			varchar	"里程碑",
+		attr151			timestamp	"创建时间",
+		attr152			timestamp	"最近修改时间",
+		attr19			varchar	"项目机会名称",
+		attr2				varchar	"签约客户名称",
+		attr20			varchar	"阶段名称",
+		attr22			varchar	"责任销售(售前)",
+		attr23			varchar	"部门(售前)",
+		attr24			varchar	"事业部(售前)",
+		attr25			varchar	"项目经理(售前)",
+		attr28			varchar	"售前项目是否可在今年验收",
+		attr29			varchar	"售前项目可在今年验收状态",
+		attr3				varchar	"项目名称",
+		attr30			varchar	"项目经理*",
+		attr31			varchar	"非我司交付类型",
+		attr32			varchar	"支持售前",
+		attr33			varchar	"所属事业部",
+		attr34			varchar	"所属部门(销售)",
+		attr35			varchar	"销售所在部门",
+		attr36			varchar	"TAPD链接(应用交付项目敏捷研发协作地址)",
+		attr37			varchar	"是否为大项目",
+		attr38			date	"周报更新日期",
+		attr39			varchar	"项目活跃度",
+		attr40			varchar	"项目状态",
+		attr41			date	"项目启动时间",
+		attr42			date	"项目承诺完成时间",
+		attr43			int	"项目完成百分比(%)",
+		attr44			date	"项目计划完成时间",
+		attr45			date	"项目实际完成时间",
+		attr46			date	"进场时间(入场通知书)",
+		attr47			int	"延期天数(天)",
+		attr48			varchar	"是否延期",
+		attr49			int	"checklist提交情况",
+		attr5				varchar	"行业",
+		attr50			varchar	"计划延期情况说明",
+		attr51			int	"提前启动至今天数(天)",
+		attr52			int	"提前启动至签约天数(天)",
+		attr53			varchar	"验收报告提醒",
+		attr54			date	"【PM】预计验收报告签回时间",
+		attr55			varchar	"(PM)收入承诺状态",
+		attr56			date	"【销售】预计签回验收报告日期",
+		attr57			varchar	"(销售)收入承诺状态",
+		attr58			date	"项目验收报告时间",
+		attr59			varchar	"是否跨期调整",
+		attr6				varchar	"合同归档状态",
+		attr60			date	"项目完工报告时间",
+		attr61			date	"发送预计完成时间",
+		attr62			date	"内部启动评审时间",
+		attr63			date	"内部结项评审时间",
+		attr64			date	"取消/终止时间",
+		attr65			varchar	"合同终止/取消原因",
+		attr66			double	"合同总金额",
+		attr67			double	"不含税总金额",
+		attr68			double	"外包实际金额",
+		attr69			double	"净合同额",
+		attr7				varchar	"原售前项目编号",
+		attr70			double	"回款金额",
+		attr71			double	"回款比例",
+		attr72			int	"剩余未回款金额(元)",
+		attr73			varchar	"收入认列依据",
+		attr74			date	"收入确认年月",
+		attr75			varchar	"已完成里程碑",
+		attr76			varchar	"财务回款目标",
+		attr77			varchar	"已完成财务目标",
+		attr78			double	"预估工时汇总",
+		attr79			double	"预估人天汇总",
+		attr8				varchar	"项目密级",
+		attr80			double	"预估成本汇总",
+		attr81			double	"PM-预计工时",
+		attr82			double	"实施-预计工时",
+		attr83			double	"区域开发-预计工时",
+		attr84			double	"设计-预计工时",
+		attr85			double	"其他-预计工时",
+		attr86			double	"模型-预计工时",
+		attr87			double	"总部开发-预计工时",
+		attr88			double	"实习-预计工时",
+		attr89			int	"PM-预计人天",
+		attr9				varchar	"省份",
+		attr90			int	"实施-预计人天",
+		attr91			int	"区域开发-预计人天",
+		attr92			int	"设计-预计人天",
+		attr93			int	"其他-预计人天",
+		attr94			int	"模型-预计人天",
+		attr95			int	"总部开发-预计人天",
+		attr96			int	"实习-预计人天",
+		attr97			double	"BU交付总工时",
+		attr98			double	"BU交付总工时成本",
+		attr99			double	"实施人员工时",
+		attr12			varchar	"产品版本",
+		attr14			date	"授权到期日期-2",
+		attr15			date	"授权到期日期-3",
+		attr16			date	"授权到期日期-4",
+		attr17			varchar	"项目整体需求概况",
+		attr18			varchar	"干系人管理",
+		attr21			double	"机会总额",
+		attr26			date	"申请提前入场时间",
+		attr27			date	"预计签约时间",
+		attr4				date	"签约日期"
+
+		)with autosearch=true , version=false , key=manu, alias='项目信息' , nickname='mingdao1_project' 
+/**
+fork(a)
+**/;
+

+ 36 - 0
odbctest/mql/0/12/1214create.mql

@@ -0,0 +1,36 @@
+
+create class if not exists /mingdao1/staff ( 
+		attr0				varchar	"工号",
+		attr1				varchar	"员工姓名",
+		attr10			varchar	"职位",
+		attr11			varchar	"部门主管",
+		attr12			double	"手机号码",
+		attr13			date	"入职日期",
+		attr14			varchar	"在职状态",
+		attr15			varchar	"HR接口人",
+		attr16			varchar	"辅助HR接口人",
+		attr17			date	"转正日期",
+		attr18			date	"离职日期",
+		attr19			varchar	"岗位名称",
+		attr2				varchar	"系统账号ID",
+		attr20			varchar	"职能侧",
+		attr21			int	"人天成本(元)",
+		attr22			varchar	"工时填报类型",
+		attr23			varchar	"事业部",
+		attr24			varchar	"部门(三级)",
+		attr25			varchar	"归属小组(四级)",
+		attr26			varchar	"城市",
+		attr27			varchar	"邮箱",
+		attr3				varchar	"base地",
+		attr4				varchar	"一级部门",
+		attr5				varchar	"二级部门",
+		attr6				varchar	"三级部门",
+		attr7				varchar	"四级部门",
+		attr8				varchar	"五级部门",
+		attr9				varchar	"成本中心"
+
+		)with autosearch=true , version=false , key=manu, alias='员工信息' , nickname='mingdao1_staff' 
+/**
+fork(a)
+**/;
+

+ 5 - 0
odbctest/mql/0/12/1219wait.mql

@@ -0,0 +1,5 @@
+
+/**
+wait(a)
+**/;
+

+ 8 - 0
odbctest/mql/0/12/1220check.mql

@@ -0,0 +1,8 @@
+
+select name,colname from /system/field where namespace='mingdao1' and name in ('attr18','mingdao1_case:attr18','mingdao1_contract:attr18','mingdao1_project:attr18','mingdao1_staff:attr18')
+/**
+output()
+count(4)
+**/
+;
+

+ 3 - 0
odbctest/mql/0/12/1231insert.mql

@@ -0,0 +1,3 @@
+
+
+insert into /mingdao1/case (attr18) values (1);

+ 4 - 0
odbctest/mql/0/12/1232insert.mql

@@ -0,0 +1,4 @@
+
+
+insert into /mingdao1/contract (attr18) values (1.2);
+

+ 3 - 0
odbctest/mql/0/12/1233insert.mql

@@ -0,0 +1,3 @@
+
+
+insert into /mingdao1/project (attr18) values ('a');

+ 3 - 0
odbctest/mql/0/12/1234insert.mql

@@ -0,0 +1,3 @@
+
+
+insert into /mingdao1/staff (attr18) values ('2025-06-30');

+ 6 - 0
odbctest/mql/0/12/1239sleep.mql

@@ -0,0 +1,6 @@
+
+
+/**
+sleep(2s)
+**/
+;

+ 11 - 0
odbctest/mql/0/12/1240select.mql

@@ -0,0 +1,11 @@
+
+
+select attr18 from /mingdao1/case where attr18=1;
+select attr18 from /mingdao1/contract where attr18=1.2;
+select attr18 from /mingdao1/project where attr18='a';
+select attr18 from /mingdao1/staff where attr18='2025-06-30';
+
+/**
+sleep(2s)
+**/
+;

+ 23 - 0
odbctest/mql/0/610delete.mql

@@ -0,0 +1,23 @@
+
+delete from /test/c1 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+delete from /test/c2 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+delete from /test/c3 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+delete from /test/c4 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+ 

+ 8 - 0
odbctest/mql/0/612drop.mql

@@ -0,0 +1,8 @@
+
+
+drop class if exists /test/c1;
+drop class if exists /test/c2;
+drop class if exists /test/c3;
+drop class if exists /test/c4;
+
+ 

+ 21 - 0
odbctest/mql/0/614create.mql

@@ -0,0 +1,21 @@
+ 
+create class if not exists /test/c1 ( 
+		attr			int	"整数", 
+)with autosearch=true , version=false , key=manu, alias='CASE信息' , nickname='mingdao1_case' 
+;
+
+create class if not exists /test/c2 ( 
+		attr            double	"实数", 
+)with autosearch=true , version=false , key=manu, alias='合同信息' , nickname='mingdao1_contract' 
+;
+
+create class if not exists /test/c3 (
+		attr 			varchar	"字符串",
+)with autosearch=true , version=false , key=manu, alias='项目信息' , nickname='mingdao1_project' 
+;
+
+create class if not exists /test/c4 ( 
+		attr  			date	"日期",
+)with autosearch=true , version=false , key=manu, alias='员工信息' , nickname='mingdao1_staff' 
+;
+ 

+ 10 - 0
odbctest/mql/0/616insert.mql

@@ -0,0 +1,10 @@
+
+insert into /test/c1 (attr) values (1);
+insert into /test/c2 (attr) values (1.2);
+insert into /test/c3 (attr) values ('a');
+insert into /test/c4 (attr) values ('2025-06-30');
+
+/**
+sleep(2s)
+**/
+;

+ 28 - 0
odbctest/mql/0/617select.mql

@@ -0,0 +1,28 @@
+
+select * from /test/c1
+/**
+output()
+**/
+;
+
+
+select * from /test/c2
+/**
+output()
+**/
+;
+
+
+select * from /test/c3
+/**
+output()
+**/
+;
+
+
+select * from /test/c4
+/**
+output()
+**/
+;
+

+ 35 - 0
odbctest/mql/0/724.1230.data2.mql

@@ -0,0 +1,35 @@
+/**
+scope(file)
+loop(1000000)
+**/
+;
+
+insert into /test/bucketpromdbdelay (id, promdelay) values (?, ? )
+/**
+beforerun(
+    set(ct,"2024-10-28 06:54:17"),
+    add(ct,mqli,second)
+)
+loop(1000000)
+parallel(2)
+params("bucketpromdbdelay:wecise{%d,mqli}", [
+			{"name": "key11", "value": 2, "timestamp": "{%t,ct}", "disk":"/opt/matrix/test1"},
+			{"name": "key22", "value": 1.8, "timestamp": "{%t,ct}", "disk":"/opt/matrix/test2"},
+			{"name": "key33", "value": 2.9, "timestamp": "{%t,ct}", "disk":"/opt/matrix/test3"},
+			{"name": "key44", "value": "sss", "timestamp": "{%t,ct}", "disk":"/opt/matrix/test4"},
+			{"name": "key55", "value": "这是中文长字符串sssss", "timestamp": "{%t,ct}", "disk":"/opt/matrix/test5"},
+			{"name": "key66", "value": 3.7, "timestamp": "{%t,ct}", "disk":"/opt/matrix/test6"},
+			{"name": "key77", "value": 12, "timestamp": "{%t,ct}", "disk":"/opt/matrix/test1"},
+			{"name": "key88", "value": 11.8, "timestamp": "{%t,ct}", "disk":"/opt/matrix/test2"},
+			{"name": "key99", "value": 12.9, "timestamp": "{%t,ct}", "disk":"/opt/matrix/test3"},
+			{"name": "keyAA", "value": "xxx", "timestamp": "{%t,ct}", "disk":"/opt/matrix/test4"},
+			{"name": "keyBB", "value": "这是中文长字符串xxx", "timestamp": "{%t,ct}", "disk":"/opt/matrix/test5"},
+			{"name": "keyXX", "value": 13.7, "timestamp": "{%t,ct}", "disk":"/opt/matrix/test6"}])
+sleep(50ms)
+**/
+;
+
+/**
+sleep(1s)
+**/
+;

+ 9 - 0
odbctest/mql/0/771.mql

@@ -0,0 +1,9 @@
+
+alter /test/alter drop column altertest
+/**
+onerror(continue,"or ValidFieldList")
+**/
+;
+
+alter /test/alter add column altertest varchar
+;

+ 8 - 0
odbctest/mql/0/772.mql

@@ -0,0 +1,8 @@
+
+
+select ID,entity from /m3event/devops/alerts_status e join (i:/matrix/entity/switch where id='switch:switch1')
+ on e.entity=i.id
+/**
+output()
+**/
+;

+ 35 - 0
odbctest/mql/0/773.mql

@@ -0,0 +1,35 @@
+
+-- MATCH (a:/matrix/oo/automobile/)-[*]->( :/matrix/oo/tire where brand = '普利司通')
+-- /**
+-- output()
+-- **/
+-- ;
+
+-- MATCH (a)-[*]->( :/matrix/oo/rim where brand = '正兴车轮')
+-- /**
+-- output()
+-- **/
+-- ;
+
+
+-- MATCH (:/matrix/oo/automobile/)-[*]->( :/matrix/oo/tire where brand = '普利司通'), (:/matrix/oo/automobile/)-[*]->( :/matrix/oo/rim where brand = '正兴车轮')
+-- /**
+-- output()
+-- **/
+-- ;
+
+
+-- MATCH (a:/matrix/oo/automobile/)-[*]->( :/matrix/oo/tire where brand = '普利司通'), (a)-[*]->( :/matrix/oo/rim where brand = '正兴车轮')
+-- /**
+-- output()
+-- **/
+-- ;
+
+
+
+MATCH ()-[*]->( :/matrix/ ) with timeout=5s
+/**
+output()
+**/
+;
+

+ 65 - 0
odbctest/mql/0/774.authinfo.mql

@@ -0,0 +1,65 @@
+
+
+
+select node,nodealias,alertkey,alertgroup,firstoccurrence,lastoccurrence,summary,severity,tally,id,entity,class,status from /m3event/devops/alerts_status where severity>0 limit -1
+/**
+qmeta({"user":"user1"})
+output()
+**/
+;
+
+-- 用户信息
+select * from /matrix/ldap where username='user1'
+/**
+output()
+count(1)
+match("otype", "usr")
+match("parent", "/总行/总行录入")
+match("fullname", "/总行/总行录入/user1")
+**/
+;
+
+-- 用户所属父一级组织
+select * from /matrix/ldap where fullname='/总行/总行录入'
+/**
+output()
+count(1)
+match("grpset.0", "/总行/总行录入")
+match("fullname", "/总行/总行录入")
+**/
+;
+
+-- 用户所属父二级组织
+select * from /matrix/ldap where fullname='/总行'
+/**
+output()
+count(1)
+match("grpset.0", "/总行")
+match("fullname", "/总行")
+**/
+;
+
+-- 用户所属关联组信息 角色
+select * from /matrix/group where fullname='/总行/总行录入'
+/**
+output()
+count(1)
+**/
+;
+
+-- 用户所属关联组信息 角色
+select * from /matrix/group where parent='/总行/总行录入'
+/**
+output()
+count(1)
+**/
+;
+
+-- 用户所属关联组信息 角色
+select * from /matrix/group where fullname='/总行'
+/**
+output()
+count(1)
+**/
+;
+

+ 61 - 0
odbctest/mql/0/775.promdb.statis.mql

@@ -0,0 +1,61 @@
+
+
+SELECT id, prom.date('2024-11-28').find(name='key1.key2.key3').min().max().avg() FROM  /test/bucketpromdb
+/**
+output()
+match(id, "bucketpromdb:wecise", "prom.0.2", 2)
+match(id, "bucketpromdb:wecise", "prom.0.5", 2.7)
+match(id, "bucketpromdb:wecise", "prom.0.8", 2.622222222222222)
+**/
+;
+
+SELECT
+  id, prom.time('2024-11-28 11:24:00', '2024-11-28 11:25:00').find(name='key1.key2.key3').sum()
+FROM
+  /test/bucketpromdb  where id='bucketpromdb:wecise'
+/**
+output()
+match(id, "bucketpromdb:wecise", "prom.0.2", 2.7)
+**/
+;
+
+SELECT id, prom.date('2024-11-28').avg().sigma() FROM  /test/bucketpromdb
+/**
+output()
+match(id, "bucketpromdb:wecise", "prom.0.2", 2.663157894736843)
+match(id, "bucketpromdb:wecise", "prom.0.5", 0.15630781478860528)
+**/
+;
+
+SELECT id, prom.date('2024-11-28').min().max().count() FROM  /test/bucketpromdb
+/**
+output()
+match(id, "bucketpromdb:wecise", "prom.0.2", 2)
+match(id, "bucketpromdb:wecise", "prom.0.5", 2.7)
+match(id, "bucketpromdb:wecise", "prom.0.8", 19)
+**/
+;
+
+SELECT id, prom.date('2024-11-28').sum() FROM  /test/bucketpromdb
+/**
+output()
+match(id, "bucketpromdb:wecise", "prom.0.2", 50.600000000000016)
+**/
+;
+
+SELECT id, prom.date('2024-11-28').max() FROM  /test/bucketpromdb
+/**
+output()
+match(id, "bucketpromdb:wecise", "prom.0.2", 2.7)
+**/
+;
+
+
+SELECT id, prom.date('2024-11-28').min() FROM  /test/bucketpromdb
+/**
+output()
+match(id, "bucketpromdb:wecise", "prom.0.2", 2)
+**/
+;
+
+

+ 40 - 0
odbctest/mql/0/776.between.mql

@@ -0,0 +1,40 @@
+
+
+
+-- select id,v_int,v_bigint,v_float,v_double from /test/basic where v_int between 1 and 5
+-- /**
+-- output()
+-- **/
+-- ;
+
+
+select id,v_int,v_bigint,v_float,v_double,v_varchar from /test/basic where v_int between 1 and 5
+/**
+output()
+count(5)
+**/
+;
+
+select id,v_int,v_bigint,v_float,v_double,v_varchar from /test/basic where v_int between 1 and ?
+/**
+output()
+params(1)
+count(4)
+**/
+;
+
+select id,v_int,v_bigint,v_float,v_double,v_varchar from /test/basic where v_int between ? and 5
+/**
+output()
+params(5)
+count(1)
+**/
+;
+
+select id,v_int,v_bigint,v_float,v_double,v_varchar from /test/basic where v_int between ? and ?
+/**
+output()
+params(1,5)
+count(5)
+**/
+;

+ 15 - 0
odbctest/mql/0/776.delete.mql

@@ -0,0 +1,15 @@
+
+
+select * from /test/basic
+/**
+output()
+**/
+;
+
+delete from /test/basic/ where v_int=?
+/**
+params(9)
+**/
+;
+
+

+ 40 - 0
odbctest/mql/0/777.uino.test.mql

@@ -0,0 +1,40 @@
+
+
+select * from /uino/univ/college
+/**
+output()
+**/
+;
+
+
+update  /uino/univ/college set helloWord_HelloWord= {  "_all": [
+    "univ_teacher:fe05a11904b040f28e1cb653c3aeb1b4"
+  ]
+} where id='univ_college:bcba0553bcc94104b41ff4b5ad10a387'
+;
+
+select id,wheel["sise","color"] from  /matrix/entity/car/camry c join ("camry:13")-[:collide*1]-(h) on c.id = h.id where wheel.screw.sise > 39
+/**
+output()
+**/
+;
+
+select id,wheel["sise","color"] from  /matrix/entity/car/camry  where wheel.screw.sise > 39
+/**
+output()
+**/
+;
+
+
+match (a:/uino/univ/research_center) - [:contain] -> (:/uino/univ/teacher)
+/**
+output()
+**/
+;
+
+
+match (a:/uino/univ/research_center) - [:contain] -> (:/uino/univ/teacher) return a.name
+/**
+output()
+**/
+;

+ 61 - 0
odbctest/mql/0/779desc.mql

@@ -0,0 +1,61 @@
+
+
+
+select * into t01 from /test/basic
+;
+
+
+select * into t02 from /test/basic
+;
+
+desc class t01
+/**
+output()
+metainfo()
+**/
+;
+
+
+desc class /test/basic
+/**
+output()
+metainfo()
+**/
+;
+
+desc temps
+/**
+output()
+metainfo()
+**/
+;
+
+desc class '' *
+/**
+output()
+metainfo()
+**/
+;
+
+
+desc class /
+/**
+output()
+metainfo()
+**/
+;
+
+desc class ""
+/**
+output()
+metainfo()
+**/
+;
+
+
+desc class /test/oo/,/memory *
+/**
+output()
+metainfo()
+**/
+;

+ 61 - 0
odbctest/mql/0/801.cassdb.like.mql

@@ -0,0 +1,61 @@
+
+-- text支持分词查询
+select v_varchar, v_text from /test/basic where v_text='hello'
+/**
+output()
+**/
+;
+
+-- 不存在的分词
+select v_varchar, v_text from /test/basic where v_text='e'
+/**
+output()
+**/
+;
+
+select v_varchar, v_text from /test/basic where v_text='*e*'
+/**
+output()
+**/
+;
+
+-- lucene 对 text 类型 wildcard 的支持,分词通配
+select v_varchar, v_text from /test/basic where v_text='e*'
+/**
+output()
+**/
+;
+
+select v_varchar, v_text from /test/basic where v_text='*e'
+/**
+output()
+**/
+;
+
+select v_varchar, v_text from /test/basic where v_varchar='\*a*'
+/**
+output()
+count(1)
+**/
+;
+
+select v_varchar, v_text from /test/basic2 where v_varchar='*c\*'
+/**
+output()
+count(1)
+**/
+;
+
+select v_varchar, v_text from /test/basic2 where v_varchar='a*'
+/**
+output()
+count(0)
+**/
+;
+
+select v_varchar, v_text from /test/basic2 where v_varchar='*a'
+/**
+output()
+count(0)
+**/
+;

+ 59 - 0
odbctest/mql/0/801.memdb.like.mql

@@ -0,0 +1,59 @@
+
+select v_varchar, v_text from /test/basic2 where v_varchar='a*'
+/**
+output()
+count(0)
+**/
+;
+
+select v_varchar, v_text from /test/basic2 where v_varchar='*a'
+/**
+output()
+count(0)
+**/
+;
+
+select v_varchar, v_text from /test/basic2 where v_varchar='\*a*'
+/**
+output()
+count(1)
+**/
+;
+
+select v_varchar, v_text from /test/basic2 where v_varchar='*c\*'
+/**
+output()
+count(1)
+**/
+;
+
+select v_varchar, v_text from /test/basic2 where v_text='hello'
+/**
+output()
+**/
+;
+
+-- memdb 不支持分词,直接通配查找
+select v_varchar, v_text from /test/basic2 where v_text='e'
+/**
+output()
+**/
+;
+
+select v_varchar, v_text from /test/basic2 where v_text='e*'
+/**
+output()
+**/
+;
+
+select v_varchar, v_text from /test/basic2 where v_text='*e'
+/**
+output()
+**/
+;
+
+select v_varchar, v_text from /test/basic2 where v_text='*e*'
+/**
+output()
+**/
+;

+ 14 - 0
odbctest/mql/0/901keyspace.mql

@@ -0,0 +1,14 @@
+
+
+cmd: drop oktest
+/**
+timeout(10m)
+**/
+;
+
+cmd: create oktest replication={'class':'NetworkTopologyStrategy','dc1':1}
+/**
+timeout(10m)
+**/
+;
+

+ 121 - 0
odbctest/mql/0/901schema.mql

@@ -0,0 +1,121 @@
+
+/**
+
+odbserver 通过 schema 命令获取类结构信息
+
+早期版本调用方式
+schema <classname|classid>
+存在问题,无法单独获取存在依赖关系的类
+
+更新版本可以同时取多个类,增加 flag 作为最后一个参数,原调用方式为保持版本兼容,问题无法修正
+schema <classname|classid>... <flag>
+更新的调用方式参数说明
+    classname="" 从系统根类"/"开始,返回列表中包含系统根类"/"(cid=1)信息
+    classname="/" 从自定义根类"/xxx"开始,返回列表中不包含系统根类"/"(cid=1)信息
+	classname="/xxx" 从指定类开始,返回列表中包含指定类"/xxx"信息
+	classname="/xxx/" 从指定类子类开始,返回列表中不包含指定类"/xxx"信息
+	flag="" 只查一级子类,或只查指定类,返回简单类结构信息
+	flag="*" 递归所有子类,返回简单类结构信息
+	flag="one" || flag="1" 只查一级子类,或只查指定类,返回内部类结构信息
+	flag="all" 递归所有子类,返回内部类结构信息
+更新的调用方式返回的多个类结构信息会按照类间依赖关系进行第一排序,按classid进行第二排序
+
+**/
+;
+
+create class if not exists /test() with namespace="test"
+;
+
+create class if not exists /test/abc()
+;
+
+alter class /test/abc/aaa delete column ccc
+/**
+onerror(continue,"ValidFieldList")
+**/
+;
+
+drop class if exists CCC;
+drop class if exists BBB;
+drop class if exists AAA;
+
+create class if not exists AAA : /test/abc (
+	info  varchar,
+);
+
+create class if not exists BBB : /test/abc (
+	info  varchar,
+	aaa   AAA,
+);
+
+create class if not exists CCC : /test/abc (
+	info  varchar,
+	bbb   BBB,
+);
+
+alter class AAA add column ccc CCC
+/**
+onerror(must,"prohibit relationship loop")
+**/
+;
+
+cmd: schema  / all
+/**
+output()
+**/
+;
+
+cmd: schema  / *
+/**
+output()
+matchcount("Fullname", `(?is)/.*`, 7)
+**/
+;
+
+cmd: schema 77
+/**
+output()
+**/
+;
+
+
+/**
+sleep(5s)
+**/
+;
+
+cmd: schema  77 1 1
+/**
+output()
+matchcount("Fullname", `(?is)/.*`, 7)
+**/
+;
+
+/**
+sleep(5s)
+**/
+;
+
+cmd: schema  77 all
+/**
+output()
+matchcount("Fullname", `(?is)/.*`, 7)
+**/
+;
+
+/**
+sleep(5s)
+**/
+;
+
+cmd: schema  77 /matrix *
+/**
+output()
+matchcount("Fullname", `(?is)/.*`, 7)
+**/
+;
+
+/**
+sleep(5s)
+**/
+;

+ 30 - 0
odbctest/mql/0/902.updaterelation.mql

@@ -0,0 +1,30 @@
+
+
+
+select connect from /test/alert_status
+/**
+output()
+**/
+;
+
+
+update /test/alert_status set CONNECT = {}
+;
+
+
+select connect from /test/alert_status
+/**
+output()
+**/
+;
+
+
+update /test/alert_status set Connect = cOnnect + "test"
+;
+
+
+select coNnect from /test/alert_status
+/**
+output()
+**/
+;

+ 7 - 0
odbctest/mql/0/911.mql

@@ -0,0 +1,7 @@
+
+select id,prom.time('2025-03-01','').format(t,123,'abc',{"x":[4,5,6]})  from /test/alert_status
+/**
+output()
+**/
+;
+

File diff suppressed because it is too large
+ 2408 - 0
odbctest/mql/0/991import.mql


+ 54 - 0
odbctest/mql/0/999help.mql

@@ -0,0 +1,54 @@
+
+help()
+/**
+output()
+**/
+;
+
+help('class')
+/**
+output()
+**/
+;
+
+help('class', "/")
+/**
+output()
+**/
+;
+
+help('class', "/matrix")
+/**
+output()
+**/
+;
+
+help('class', "/matrix/")
+/**
+output()
+**/
+;
+
+help('class', "*")
+/**
+output()
+**/
+;
+
+help('class', "/matrix*")
+/**
+output()
+**/
+;
+
+help('class', "/*")
+/**
+output()
+**/
+;
+
+help('class', '/matrix/*')
+/**
+output()
+**/
+;

+ 73 - 0
odbctest/mql/0/aggr/1.mql

@@ -0,0 +1,73 @@
+
+
+select count(*) as count from /test/sequence where v_int >= 1.1
+/**
+output()
+count(1)
+**/
+;
+
+select id,email,username,parent,grpset,lft,rgt,otype,isactive from /matrix/ldap
+/**
+output()
+**/
+;
+
+#/matrix/ldap | group by parent
+/**
+output()
+match('groupby.0',"parent")
+match('groups.0.__nil__.0.class',"/matrix/ldap")
+**/
+;
+
+select count(*) from /matrix/ldap where username='admin'
+/**
+output()
+count(1)
+**/
+;
+
+select parent,count() from /matrix/ldap group by parent having count()=1
+/**
+output()
+match('count', 1)
+**/
+;
+
+select parent,count() from /matrix/ldap group by parent
+/**
+output()
+match('parent', "/")
+**/
+;
+
+select parent,count() from /matrix/ldap group by parent having count()>1
+/**
+output()
+**/
+;
+
+select otype,grpset,count(id) from /matrix/ldap group by otype, grpset
+/**
+output()
+**/
+;
+
+select otype,count(id) from /matrix/ldap group by otype, grpset
+/**
+output()
+**/
+;
+
+select grpset,count(lft) as countlftnotnull,count(*) as countall from /matrix/ldap group by otype, grpset
+/**
+output()
+**/
+;
+
+select otype,grpset,max(lft),min(lft),sum(lft),avg(lft),count(lft) as CountNotNullLft,count(*) as CountAll from /matrix/ldap group by otype, grpset
+/**
+output()
+**/
+;

+ 49 - 0
odbctest/mql/0/cast/1.mql

@@ -0,0 +1,49 @@
+
+
+
+select * into /temp1 from /matrix/jobs/jobrun
+;
+
+SELECT
+cast(runid as text) as "cast as text runid",
+runid as "org runid"
+FROM
+/temp1
+/**
+output()
+metainfo()
+**/
+;
+
+SELECT
+cast(runid as text) as "cast as text runid",
+runid as "org runid"
+FROM
+/matrix/jobs/jobrun
+/**
+output()
+metainfo()
+**/
+;
+
+SELECT
+cast(runid as text)
+FROM
+/matrix/jobs/jobrun
+/**
+output()
+metainfo()
+**/
+;
+
+SELECT
+cast(runid as text),
+runid as org_runid
+FROM
+/matrix/jobs/jobrun
+/**
+output()
+metainfo()
+**/
+;
+

+ 4 - 0
odbctest/mql/0/connect/1.mql

@@ -0,0 +1,4 @@
+
+
+create ("16723680250097720094") - [:connect] -> ("1013466087196837912")
+

+ 62 - 0
odbctest/mql/0/json/1.mql

@@ -0,0 +1,62 @@
+
+
+select * into /t001 from /matrix/ldap
+;
+
+select * into /t002 from /matrix/group
+;
+
+{
+"sql": "SELECT * FROM /t001; SELECT * FROM T_t002;",
+"class": ["/t001","/t002"]
+}
+/**
+output()
+**/
+;
+
+{
+"sql": "SELECT * FROM T_t002",
+"class": ["/t002"]
+}
+/**
+output()
+**/
+;
+
+{
+"sql": "SELECT t001.username,t002.fullname,t001.grpset,t002.member,t001.email FROM T_t001 t001 JOIN T_t002 t002 ON exists (select 1 from json_each(t001.grpset) where value=t002.fullname)",
+"class": ["/t001", "/t002"]
+}
+/**
+output()
+**/
+;
+
+{
+"sql": "SELECT t001.username,t002.fullname,t001.grpset,t002.member,t001.email FROM /t001 t001 JOIN /t002 t002 ON exists (select 1 from json_each(t001.grpset) where value=t002.fullname)"
+}
+/**
+output()
+**/
+;
+
+{
+"sql": "SELECT * INTO T_t003 FROM /t002",
+"class": ["/t001", "/t002"]
+}
+/**
+onerror(continue, "syntax error")
+output()
+**/
+;
+
+{
+"sql": "INSERT INTO T_t003 SELECT * FROM /t002",
+"class": ["/t001", "/t002"]
+}
+/**
+onerror(ignore, 'no such table')
+output()
+**/
+;

+ 6 - 0
odbctest/mql/0/json/2.mql

@@ -0,0 +1,6 @@
+
+
+{
+"sql": "SELECT t001.username,t002.fullname,t001.grpset,t002.member,t001.email FROM /matrix/ldap t001 JOIN /matrix/group t002 ON exists (select 1 from json_each(t001.grpset) where value=t002.fullname)"
+}
+

+ 35 - 0
odbctest/mql/0/search/1.mql

@@ -0,0 +1,35 @@
+
+
+#/matrix/group | fullname = '/admin'  
+/**
+output()
+metainfo()
+**/
+;
+
+-- -- icbctest
+-- #/chkpoint/ | print link,id,vtime
+-- /**
+-- output()
+-- metainfo()
+-- **/
+-- ;
+
+-- -- icbctest
+-- #/chkpoint/
+-- /**
+-- output()
+-- metainfo()
+-- **/
+-- ;
+
+
+-- select * from /chkpoint/
+-- /**
+-- output()
+-- metainfo()
+-- **/
+-- ;
+
+
+

+ 8 - 0
odbctest/mql/0/timeout/1.mql

@@ -0,0 +1,8 @@
+
+select id,email,username,parent,grpset,lft,rgt,otype,isactive from /matrix/ldap with timeout=2m
+
+/**
+output()
+**/
+;
+

+ 6 - 0
odbctest/mql/auth/0.mql

@@ -0,0 +1,6 @@
+
+select check('auth','user111') from /
+/**
+output()
+**/
+;

+ 76 - 0
odbctest/mql/auth/1.mql

@@ -0,0 +1,76 @@
+
+-- admin 查看指定信息
+SELECT
+	 *
+FROM
+	 /matrix/filesystem
+where
+	fullname like '*new.png'
+/**
+output()
+count(3)
+match("fullname","/app/matrix/m3appstore/assets/graph/tools/mail_new.png")
+match("fullname","/assets/images/graph/tools/mail_new.png")
+match("fullname","/assets/images/product_screenshot/new.png")
+**/
+;
+
+-- 用户信息
+select * from /matrix/ldap where username='user111'
+/**
+output()
+count(1)
+match("otype", "usr")
+match("grpset.0", "/产品测试部/aaa")
+match("parent", "/产品测试部")
+match("fullname", "/产品测试部/user111")
+**/
+;
+
+-- 用户所属父级组织
+select * from /matrix/ldap where fullname='/产品测试部'
+/**
+output()
+count(1)
+match("grpset.0", "/产品测试部")
+match("fullname", "/产品测试部")
+**/
+;
+
+-- 用户所属关联组信息 角色
+select * from /matrix/group where fullname='/产品测试部'
+/**
+output()
+count(1)
+match("sdata.~/matrix/entity/biz","id='biz:查账系统'")
+**/
+;
+
+insert into /matrix/group (name,fullname,parent,member,isldap,sdata) values (?,?,?,?,?,?)
+/**
+params("aaa", "/产品测试部/aaa", "/产品测试部", ["U/产品测试部/user111"],false, {
+    "/matrix/filesystem": "{\"should\":[{\"type\":\"wildcard\",\"field\":\"varchar_19\",\"value\":\"*new.png\"},{\"type\":\"phrase\",\"field\":\"varchar_19\",\"value\":\"new.png\"}],\"type\":\"boolean\"}",
+    "~/matrix/filesystem": "fullname like '*new.png'"})
+**/
+;
+
+-- 用户所属关联组信息 角色
+select * from /matrix/group where fullname='/产品测试部/aaa'
+/**
+output()
+count(1)
+match("sdata.~/matrix/filesystem","fullname like '*new.png'")
+**/
+;
+
+-- 用户查看授权信息
+SELECT
+	 *
+FROM
+	 /matrix/filesystem
+/**
+qmeta({"user":"user111"})
+output()
+count(3)
+**/
+;

+ 27 - 0
odbctest/mql/auth/2.mql

@@ -0,0 +1,27 @@
+
+select name from eventview limit 100
+/**
+qmeta({"user":"user1"})
+output()
+**/
+;
+
+select json ("/m3event/devops/alerts_status", "") from /
+/**
+output()
+**/
+;
+
+select json ("/m3event/devops/alerts_status", "node='99.*'") from /
+/**
+output()
+**/
+;
+
+select _group,node,nodealias,alertkey,alertgroup,firstoccurrence,lastoccurrence,summary,severity,tally,id,entity,class,status from /m3event/devops/alerts_status where node='*.128' and severity>0 limit -1
+/**
+qmeta({"user":"admin"})
+output()
+**/
+;
+

+ 9 - 0
odbctest/mql/auth/3.mql

@@ -0,0 +1,9 @@
+
+
+select node,nodealias,alertkey,alertgroup,firstoccurrence,lastoccurrence,summary,severity,tally,id,entity,class,status from /m3event/devops/alerts_status
+/**
+qmeta({"user":"user1"})
+output()
+**/
+;
+

+ 5 - 0
odbctest/mql/basic/00init/00init.mql

@@ -0,0 +1,5 @@
+/**
+scope(top)
+timeout(2m)
+**/
+;

+ 5 - 0
odbctest/mql/basic/01clear/00init.mql

@@ -0,0 +1,5 @@
+/**
+scope(dir)
+timeout(30m)
+**/
+;

+ 600 - 0
odbctest/mql/basic/01clear/1_delete_all_test_data.mql

@@ -0,0 +1,600 @@
+
+delete from	 /test/memdbexpired with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/basic/mxfield with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from  /test/basic with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/basic2 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/basic3 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/collect with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete bklog from /test/bucketlog
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/bucketlog with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete bklog2 from /test/bucketlog2
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/bucketlog2 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete bk2 from /test/buckettsdb
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/buckettsdb with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/bucketpromdb2/subpromdbs with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/bucketpromdb2/subpromdbss with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/bucketpromdb2/subpromdbsss with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	/test/bucketpromdb/subpromdb with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	/test/bucketpromdb/subpromdb2 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete prom2 from /test/bucketpromdb2
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/bucketpromdb2 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete prom_str2 from /test/promdb_string2
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/promdb_string2 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete prom_str from /test/promdb_string
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/promdb_string with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete prom_split from /test/bucketsplit
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/bucketsplit with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete prom_sync from /test/bucketpromdbsync
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/bucketpromdbsync with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete promdelay from /test/bucketpromdbdelay
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/bucketpromdbdelay with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete prommp from /test/bucketpromdbmp
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/bucketpromdbmp with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete pprom from /test/bucketpromdb
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete prom from /test/bucketpromdb
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/bucketpromdb with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete prom3 from /test/bucketpromdb3
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/bucketpromdb3 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete prom4 from /test/bucketpromdb4
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/bucketpromdb4 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete prom_nocache from /test/bucketpromdbnocache
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/bucketpromdbnocache with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete bklog from  /test/bucketstrulog
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/bucketstrulog with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from  /test/iinterface with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from  /test/nnode with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/datetime with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/enum with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/idpartition with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/mpartition with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/prepare with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/search with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/sequence with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/scollect with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/batch with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/concat with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/concat2 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/concat3 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/oo/car/camry with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/oo/car with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/oo/chair with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/oo/light with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/oo/wheel with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/oo/dimension with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/delete with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from	 /test/uuid with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/node2 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/node with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/movefield with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/alter03 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/alter01 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/bucketpromdbsync with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/oo with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/alter with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/buckettsdb64 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/cypher with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/cypher2 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/cypher3 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/cypher4 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/cypher5 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/cypher6 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/cypher7 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/cypher8 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/cypher9 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/interface with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/malert_status_memdb with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/malert_status_cache with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/malert_status_seq with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/malert_status with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/alert_status with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/malert_status_seq3 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/malert_status3 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/alert_status3 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/huge with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/tuihualei with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/notify with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/测试/子类 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/测试 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/测试二 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/测试缓存库 with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test/foo with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;
+
+delete from /test with version
+/**
+onerror(continue,`not exist`,`not find`,`not found`)
+**/
+;

+ 124 - 0
odbctest/mql/basic/01clear/2_drop_all_test_class.mql

@@ -0,0 +1,124 @@
+
+drop class if exists /test/memdbexpired ;
+drop class if exists /test/basic/mxfield ;
+drop class if exists /test/basic ;
+drop class if exists /test/basic2 ;
+drop class if exists /test/basic3 ;
+drop class if exists /test/cacheonly ;
+drop class if exists /test/collect ;
+drop class if exists /test/bucketlog ;
+drop class if exists /test/bucketlog2 ;
+drop class if exists /test/buckettsdb ;
+
+drop class if exists /test/bucketpromdb2/subpromdbs;
+drop class if exists /test/bucketpromdb2/subpromdbss;
+drop class if exists /test/bucketpromdb2/subpromdbsss;
+drop class if exists /test/bucketpromdb/subpromdb;
+drop class if exists /test/bucketpromdb/subpromdb2;
+drop class if exists /test/bucketpromdb2 ;
+drop class if exists /test/promdb_string2 ;
+drop class if exists /test/promdb_string ;
+drop class if exists /test/bucketsplit ;
+drop class if exists /test/bucketpromdbsync ;
+drop class if exists /test/bucketpromdbdelay ;
+drop class if exists /test/bucketpromdbmp ;
+drop class if exists /test/bucketpromdb ;
+drop class if exists /test/bucketpromdb3 ;
+drop class if exists /test/bucketpromdb4 ;
+drop class if exists /test/bucketpromdbnocache ;
+drop class if exists /test/bucketstrulog ;
+
+drop class if exists /test/iinterface ;
+drop class if exists /test/nnode ;
+
+drop class if exists /test/concat ;
+drop class if exists /test/datetime ;
+drop class if exists /test/enum ;
+drop class if exists /test/idpartition ;
+drop class if exists /test/mpartition ;
+drop class if exists /test/prepare ;
+drop class if exists /test/search ;
+drop class if exists /test/sequence ;
+drop class if exists /test/scollect ;
+drop class if exists /test/batch ;
+drop class if exists /test/concat2 ;
+drop class if exists /test/concat3 ;
+
+drop class if exists /test/oo/car/camry ;
+drop class if exists /test/oo/car ;
+drop class if exists /test/oo/chair ;
+drop class if exists /test/oo/light ;
+drop class if exists /test/oo/wheel ;
+drop class if exists /test/oo/dimension ;
+
+drop class if exists /test/delete ;
+drop class if exists /test/uuid ;
+
+drop class if exists /test/node2 ;
+drop class if exists /test/interface2 ;
+
+drop class if exists /test/node ;
+drop class if exists /test/movefield ;
+drop class if exists /test/alter03 ;
+drop class if exists /test/alter01 ;
+drop class if exists /test/oo ;
+drop class if exists /test/alter ;
+drop class if exists /test/buckettsdb64 ;
+
+drop class if exists /test/cypher
+;
+drop class if exists /test/cypher3
+;
+drop class if exists /test/cypher9
+;
+drop class if exists /test/cypher8
+;
+drop class if exists /test/cypher7
+;
+drop class if exists /test/cypher5
+;
+drop class if exists /test/cypher6
+;
+drop class if exists /test/cypher4
+;
+drop class if exists /test/cypher2
+;
+drop class if exists /test/interface ;
+
+drop class if exists /test/malert_status_memdb ;
+drop class if exists /test/malert_status_cache ;
+drop class if exists /test/malert_status_seq ;
+drop class if exists /test/malert_status ;
+drop class if exists /test/alert_status ;
+drop class if exists /test/malert_status_seq3 ;
+drop class if exists /test/malert_status3 ;
+drop class if exists /test/alert_status3 ;
+
+drop class if exists /test/datetime ;
+
+drop class if exists /test/huge ;
+
+drop class if exists /test/tuihualei ;
+
+drop class if exists /test/notify ;
+
+drop class if exists /test/change_main force ;
+drop class if exists /test/sensor force ;
+drop class if exists /test/order force ;
+drop class if exists /test/perf/perfa force ;
+drop class if exists /test/perf force ;
+
+drop class if exists /test/测试/子类 ;
+drop class if exists /test/测试 ;
+drop class if exists /test/测试二 ;
+drop class if exists /test/测试缓存库 ;
+
+drop class if exists /test/abc/ccc ;
+drop class if exists /test/abc/bbb ;
+drop class if exists /test/abc/aaa ;
+drop class if exists /test/abc ;
+
+drop class if exists /test/foo ;
+
+drop class if exists /test ;
+

+ 12 - 0
odbctest/mql/basic/10basic/00init.mql

@@ -0,0 +1,12 @@
+
+create class if not exists /test() with namespace="test"
+;
+
+create edge type if not exists test.connect
+;
+
+typedef  if not exists STRSTR = varchar
+;
+
+typedef  if not exists DOUDOU  = double
+;

+ 42 - 0
odbctest/mql/basic/10basic/10class.mql

@@ -0,0 +1,42 @@
+
+delete from /test/basic with version
+/**
+onerror(continue)
+noerrinfo()
+**/
+;
+
+drop class if exists /test/basic/
+;
+
+create class if not exists /test/basic (
+		
+		v_varchar		STRSTR,
+		v_text			text,
+		v_string		text,
+		v_int			int,
+		v_bigint		bigint,
+		v_smalldouble	double,
+		v_double		DOUDOU,
+		v_float			float,
+		v_bool			bool,
+		v_blob			blob,
+		
+		indexes(v_varchar, v_text, v_string, v_int, v_bigint, v_double, v_float, v_smalldouble, v_bool),
+		keys(v_varchar, v_text)
+	) with core=cassandraonly;
+
+create class if not exists /test/basic/mxfield () with autosearch=true , version=false , key=manu, nickname = 'mxfield' ;
+
+--must have nickname for private field
+alter class /test/basic with nickname='basic' ;
+
+--taget define in tools, its string
+alter class /test/basic add column target int ;
+
+--test hello:version, hello:policy field
+create class if not exists /matrix/system/test (
+	version   int,
+	policy	int,
+	keys(name)
+)with nickname='hello';

File diff suppressed because it is too large
+ 317 - 0
odbctest/mql/basic/10basic/11data.mql


+ 34 - 0
odbctest/mql/basic/10basic/12data.mql

@@ -0,0 +1,34 @@
+
+insert into /test/basic (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_smalldouble, v_bool)
+ values ('*abc*', 'hello word 2003 123-456-789 中华人民共和国是中国的唯一合法政府,台湾是中国一部分。  Mercury, Venus2,Earch%。Mars$Uranus CeresAndJupiterOrSaturn #Neptune Pluto_Charon"\""', 
+ 5, 1234567890123456789, 1.1, 1.1234567890123456, 1.123456, true  )
+;
+
+/**
+sleep(3s)
+**/
+;
+
+select v_varchar, v_text, v_int from /test/basic where v_varchar = '*abc*'
+/**
+output()
+match(v_int,5)
+**/
+;
+
+insert into /test/basic (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_smalldouble, v_bool)
+ values ('*abc*', 'hello word 2003 123-456-789 中华人民共和国是中国的唯一合法政府,台湾是中国一部分。  Mercury, Venus2,Earch%。Mars$Uranus CeresAndJupiterOrSaturn #Neptune Pluto_Charon"\""', 
+ 1, 1234567890123456789, 1.1, 1.1234567890123456, 1.123456, true  )
+;
+
+/**
+sleep(3s)
+**/
+;
+
+select v_varchar, v_text, v_int from /test/basic where v_varchar = '*abc*'
+/**
+output()
+match(v_int,1)
+**/
+;

+ 5 - 0
odbctest/mql/basic/10basic/14sleep.mql

@@ -0,0 +1,5 @@
+
+/**
+sleep(3s)
+**/
+;

+ 35 - 0
odbctest/mql/basic/10basic/15.valid.mql

@@ -0,0 +1,35 @@
+
+select * from /test/basic refresh
+/**
+output()
+count(3)
+matchcount(v_varchar,`*abc*`,v_text,`hello word 2003 123-456-789 中华人民共和国是中国的唯一合法政府,台湾是中国一部分。  Mercury, Venus2,Earch%。Mars$Uranus CeresAndJupiterOrSaturn #Neptune Pluto_Charon"\""`,1)
+**/
+;
+
+-- 这个如果有错,重启一下cassandra就好了
+-- If error occurs with this, just restart Cassandra
+select * from /test/basic where v_float >= 1.1 or v_float <= 1.1
+/**
+count(3)
+**/
+;
+
+select * from /test/basic where v_varchar=='*abc*'
+/**
+count(1)
+**/
+;
+
+select * from / where v_varchar=='*abc*'
+/**
+matchcount(class,`/test/basic`,1)
+**/
+;
+
+select * from /test/ where v_varchar=='*abc*'
+/**
+matchcount(class,`/test/basic`,1)
+**/
+;
+

+ 23 - 0
odbctest/mql/basic/10basic/16.vfieldicase.mql

@@ -0,0 +1,23 @@
+
+
+
+
+SELECT
+	 cast(V_bigint as Text)
+FROM
+	 /test/basic
+/**
+output()
+match(v_bigint,`1234567890123456789`)
+**/
+;
+
+
+select CLASS,ID from /test/ where V_VARCHAR=='*abc*'
+/**
+output()
+match(class,`/test/basic`,id,`5650978343644860354`)
+**/
+;
+
+

+ 49 - 0
odbctest/mql/basic/10basic/17.int.mql

@@ -0,0 +1,49 @@
+
+select v_varchar, v_text, v_int from /test/basic limit -1
+/**
+output()
+count(3)
+**/
+;
+
+select * from /test/basic where v_int = 1
+/**
+count(3)
+**/
+;
+
+select * from /test/basic where v_int > 0
+/**
+count(3)
+**/
+;
+
+select * from /test/basic where v_int < 2
+/**
+count(3)
+**/
+;
+
+select * from /test/basic where v_int >= 1
+/**
+count(3)
+**/
+;
+
+select * from /test/basic where v_int <= 1
+/**
+count(3)
+**/
+;
+
+select * from /test/basic where v_int >= 1.1
+/**
+count(0)
+**/
+;
+
+select * from /test/basic where v_int > 1
+/**
+count(0)
+**/
+;

+ 9 - 0
odbctest/mql/basic/10basic/18.bigint.mql

@@ -0,0 +1,9 @@
+
+
+
+
+select * from /test/basic
+/**
+output()
+**/
+;

+ 12 - 0
odbctest/mql/basic/10basic/19.bool.mql

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

+ 37 - 0
odbctest/mql/basic/10basic/21.float.mql

@@ -0,0 +1,37 @@
+
+select id,v_float from /test/basic
+/**
+output()
+count(3)
+**/
+;
+
+select * from /test/basic where v_float >= 1.1
+/**
+count(3)
+**/
+;
+
+select * from /test/basic where v_float > 1
+/**
+count(3)
+**/
+;
+
+select * from /test/basic where v_float = 1.1
+/**
+count(3)
+**/
+;
+
+select * from /test/basic where v_float < 2
+/**
+count(3)
+**/
+;
+
+select * from /test/basic where v_float <= 1.1
+/**
+count(3)
+**/
+;

+ 36 - 0
odbctest/mql/basic/10basic/23.double.mql

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

+ 6 - 0
odbctest/mql/basic/10basic/25.notin.mql

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

+ 30 - 0
odbctest/mql/basic/10basic/27.prefix.mql

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

+ 30 - 0
odbctest/mql/basic/10basic/29.fullsearch.mql

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

+ 20 - 0
odbctest/mql/basic/10basic/31.aggr.mql

@@ -0,0 +1,20 @@
+
+insert into /test/basic (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_smalldouble, v_bool) values ('2', 'hhhhhh', 1, 1534567890123456789, 1.3, 2.1234567890123456, 1.223456, true  )
+;
+
+/**
+sleep(1s)
+**/
+;
+
+select count(*) from /test/basic group by v_varchar
+/**
+count(3)
+**/
+;
+
+select sum(v_float), min(v_int), max(v_double) , avg(v_int) as avgint, v_varchar from /test/basic group by v_varchar
+/**
+count(3)
+**/
+;

+ 13 - 0
odbctest/mql/basic/10basic/33.privatefield.mql

@@ -0,0 +1,13 @@
+
+select class from /system/field where namespace='test' and name='basic:target'
+/**
+output()
+**/
+;
+
+select class from /system/field where namespace='test' and name='target'
+/**
+output()
+matchcount(`class.len`,2,1)
+**/
+;

+ 33 - 0
odbctest/mql/basic/10basic/33update.mql

@@ -0,0 +1,33 @@
+
+update /test/basic set v_text=NULL where v_varchar!='3'
+/**
+onerror(must,"can't update primary key")
+**/
+;
+
+select class,id,vtime,v_varchar,v_text,v_string from /test/basic where v_varchar!='3'
+/**
+output()
+count(3)
+**/
+;
+
+update /test/basic set v_string=NULL where v_varchar!='3'
+;
+
+select class,id,vtime,v_varchar,v_text,v_string from /test/basic where v_varchar!='3'
+/**
+output()
+matchcount(v_string,null,3)
+**/
+;
+
+update /test/basic set v_string='test update null' where v_varchar!='3'
+;
+
+select class,id,vtime,v_varchar,v_text,v_string from /test/basic where v_varchar!='3'
+/**
+output()
+matchcount(v_string,"test update null",3)
+**/
+;

+ 43 - 0
odbctest/mql/basic/10basic/34multilines.mql

@@ -0,0 +1,43 @@
+
+multilines begin;
+
+insert into /test/basic (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_smalldouble, v_bool, v_blob)
+ values ('aaaa', '..............', 5, 1234567890123456789, 1.1, 1.1234567890123456, 1.123456, true, "hello"  )
+;
+insert into /test/basic (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_smalldouble, v_bool, v_blob)
+ values ('bbbb', '..............', 5, 1234567890123456789, 1.1, 1.1234567890123456, 1.123456, true, "hello"  )
+;
+insert into /test/basic (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_smalldouble, v_bool, v_blob)
+ values ('cccc', '..............', 5, 1234567890123456789, 1.1, 1.1234567890123456, 1.123456, true, "hello"  )
+;
+insert into /test/basic (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_smalldouble, v_bool, v_blob)
+ values ('dddd', '..............', 5, 1234567890123456789, 1.1, 1.1234567890123456, 1.123456, true, "hello"  )
+;
+insert into /test/basic (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_smalldouble, v_bool, v_blob)
+ values ('eeee', '..............', 5, 1234567890123456789, 1.1, 1.1234567890123456, 1.123456, true, "hello"  )
+;
+insert into /test/basic (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_smalldouble, v_bool, v_blob)
+ values ('ffff', '..............', 5, 1234567890123456789, 1.1, 1.1234567890123456, 1.123456, true, "hello"  )
+;
+insert into /test/basic (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_smalldouble, v_bool, v_blob)
+ values ('gggg', '..............', 5, 1234567890123456789, 1.1, 1.1234567890123456, 1.123456, true, "hello"  )
+;
+insert into /test/basic (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_smalldouble, v_bool, v_blob)
+ values ('hhhh', '..............', 5, 1234567890123456789, 1.1, 1.1234567890123456, 1.123456, true, "hello"  )
+;
+insert into /test/basic (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_smalldouble, v_bool, v_blob)
+ values ('iiii', '..............', 5, 1234567890123456789, 1.1, 1.1234567890123456, 1.123456, true, "hello"  )
+;
+insert into /test/basic (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_smalldouble, v_bool, v_blob)
+ values ('jjjj', '..............', 5, 1234567890123456789, 1.1, 1.1234567890123456, 1.123456, true, "hello"  )
+;
+insert into /test/basic (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_smalldouble, v_bool, v_blob)
+ values ('kkkk', '..............', 5, 1234567890123456789, 1.1, 1.1234567890123456, 1.123456, true, "hello"  )
+;
+
+multilines end;
+
+/**
+sleep(3s)
+**/
+;

+ 18 - 0
odbctest/mql/basic/10basic/35offset.mql

@@ -0,0 +1,18 @@
+
+select * from /test/basic limit 0,5
+/**
+output()
+**/
+;
+
+select * from /test/basic limit 5,5
+/**
+output()
+**/
+;
+
+select * from /test/basic limit 10,5
+/**
+output()
+**/
+;

+ 39 - 0
odbctest/mql/basic/10basic/36between.mql

@@ -0,0 +1,39 @@
+
+
+select id,v_int,v_bigint,v_float,v_double,v_varchar from /test/basic
+/**
+output()
+count(5)
+**/
+;
+
+select id,v_int,v_bigint,v_float,v_double,v_varchar from /test/basic where v_int between 1 and 5
+/**
+output()
+count(5)
+**/
+;
+
+select id,v_int,v_bigint,v_float,v_double,v_varchar from /test/basic where v_int between 1 and ?
+/**
+output()
+params(1)
+count(4)
+**/
+;
+
+select id,v_int,v_bigint,v_float,v_double,v_varchar from /test/basic where v_int between ? and 5
+/**
+output()
+params(5)
+count(1)
+**/
+;
+
+select id,v_int,v_bigint,v_float,v_double,v_varchar from /test/basic where v_int between ? and ?
+/**
+output()
+params(1,5)
+count(5)
+**/
+;

+ 33 - 0
odbctest/mql/basic/10basic/39init.mql

@@ -0,0 +1,33 @@
+
+create class if not exists /test() with namespace="test"
+
+delete from /test/foo with version
+/**
+onerror(continue)
+noerrinfo()
+**/
+;
+
+drop class if exists /test/foo
+;
+
+create class if not exists /test/foo (
+		
+		v_varchar		varchar,
+		v_text			text,
+		v_string		text,
+		v_int			int,
+		v_bigint		bigint,
+		v_double		double,
+		v_float			float,
+		v_bool			bool,
+		v_blob			blob,
+		v_set           set<varchar>,
+		v_map           map<varchar,float>,
+		v_list          list<varchar>,
+		
+		indexes(v_varchar, v_text, v_string, v_int, v_bigint, v_double, v_float, v_bool, v_set, v_map, v_list),
+		keys(v_varchar, v_text)
+	) with core=cassandraonly;
+
+

+ 14 - 0
odbctest/mql/basic/10basic/40delete.mql

@@ -0,0 +1,14 @@
+
+
+delete from /test/foo;
+
+/**
+sleep(2s)
+**/;
+
+select * from /test/foo
+/**
+count(0)
+**/
+;
+

+ 55 - 0
odbctest/mql/basic/10basic/41.insert.mql

@@ -0,0 +1,55 @@
+
+insert into /test/foo (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_bool, v_set, v_list, v_map, v_blob)
+ values ('1', '1', 1, 1, 1.1234567890123456, 1.1234567890123457, true, ["a"], ["a"], {"a":1.1}, "hello"  )
+;
+
+insert into /test/foo (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_bool, v_set, v_list, v_map, v_blob)
+ values ('2', '2', 2, 2, 2.1, 2.1, false, ["a"], ["a"], {"a":1.1}, "hello"  )
+;
+
+insert into /test/foo (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_bool, v_set, v_list, v_map, v_blob)
+ values ('3', '2', 2, 2, 2.2, 2.2, true, ["a"], ["a"], {"a":1.1}, "hello"  )
+;
+
+insert into /test/foo (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_bool, v_set, v_list, v_map, v_blob)
+ values ('4', '3', 3, 3, 3.1, 3.1, false, ["a"], ["a"], {"a":1.1}, "hello"  )
+;
+
+insert into /test/foo (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_bool, v_set, v_list, v_map, v_blob)
+ values ('5', '3', 3, 3, 3.2, 3.3, false, ["a"], ["a"], {"a":1.1}, "hello"  )
+;
+
+insert into /test/foo (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_bool, v_set, v_list, v_map, v_blob)
+ values ('6', '3', 3, 3, 3.3, 3.5, false, ["a"], ["a"], {"a":1.1}, "hello"  )
+;
+
+
+insert into /test/foo (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_bool, v_set, v_list, v_map, v_blob)
+ values ('7', '4', 4, 4, 3.1, 3.1, false, ["a"], ["a"], {"a":1.1}, "hello"  )
+;
+
+insert into /test/foo (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_bool, v_set, v_list, v_map, v_blob)
+ values ('8', '4', 4, 4, 3.2, 3.3, false, ["a"], ["a"], {"a":1.1}, "hello"  )
+;
+
+insert into /test/foo (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_bool, v_set, v_list, v_map, v_blob)
+ values ('9', '4', 4, 4, 3.3, 3.5, false, ["a"], ["a"], {"a":1.1}, "hello"  )
+;
+
+insert into /test/foo (v_varchar, v_text, v_int, v_bigint, v_float, v_double, v_bool, v_set, v_list, v_map, v_blob)
+ values ('a', '4', 4, 4, 3.4, 3.7, false, ["a"], ["a"], {"a":1.1}, "hello"  )
+;
+
+
+/**
+sleep(2s)
+**/
+;
+
+select * from /test/foo where v_float=1.1234567890123457
+/**
+output()
+count(1)
+**/
+;
+

+ 19 - 0
odbctest/mql/basic/10basic/42.aggr.mql

@@ -0,0 +1,19 @@
+
+select count(*) from /test/foo where v_float>=2 group by v_text
+/**
+output()
+count(3)
+match(count,2)
+match(count,3)
+match(count,4)
+**/
+;
+
+select v_text, count(id) from /test/foo where v_float>=2 group by v_text having count(*)>2
+/**
+output()
+count(2)
+match(v_text,'3',count,3)
+match(v_text,'4',count,4)
+**/
+;

+ 12 - 0
odbctest/mql/basic/10cachedb/00init.mql

@@ -0,0 +1,12 @@
+
+create class if not exists /test() with namespace="test"
+;
+
+create edge type if not exists test.connect
+;
+
+typedef  if not exists STRSTR = varchar
+;
+
+typedef  if not exists DOUDOU  = double
+;

+ 32 - 0
odbctest/mql/basic/10cachedb/10class.mql

@@ -0,0 +1,32 @@
+
+delete from /test/basic3 with version
+/**
+onerror(continue)
+noerrinfo()
+**/
+;
+
+drop class if exists /test/basic3/
+;
+
+create class if not exists /test/basic3 (
+	
+	v_varchar		STRSTR,
+	v_text			text,
+	v_string		text,
+	v_int			int,
+	v_bigint		bigint,
+	v_smalldouble	double,
+	v_double		DOUDOU,
+	v_float			float,
+	v_bool			bool,
+	v_blob			blob,
+	
+	indexes(v_varchar, v_text, v_string, v_int, v_bigint, v_double, v_float, v_smalldouble, v_bool),
+	keys(v_varchar, v_text)
+) with core=cacheonly ;
+
+create class if not exists /test/basic3 (
+	name	text,
+	keys(name)
+) with nickname='basic3';

File diff suppressed because it is too large
+ 302 - 0
odbctest/mql/basic/10cachedb/12data2.mql


+ 5 - 0
odbctest/mql/basic/10cachedb/14sleep.mql

@@ -0,0 +1,5 @@
+
+/**
+sleep(3s)
+**/
+;

+ 30 - 0
odbctest/mql/basic/10cachedb/16.valid2.mql

@@ -0,0 +1,30 @@
+
+select * from /test/basic3 refresh
+/**
+count(3)
+matchcount(v_varchar,`*abc*`,v_text,`hello word 2003 123-456-789 中华人民共和国是中国的唯一合法政府,台湾是中国一部分。  Mercury, Venus2,Earch%。Mars$Uranus CeresAndJupiterOrSaturn #Neptune Pluto_Charon"\""`,1)
+**/
+;
+
+select * from /test/basic3 where v_varchar=='*abc*'
+/**
+count(1)
+output()
+**/
+;
+
+-- cacheonly 不支持泛化查询
+select * from / where v_varchar=='*abc*'
+/**
+output()
+matchcount(class,`/test/basic3`,0)
+**/
+;
+
+-- cacheonly 不支持泛化查询
+select * from /test/ where v_varchar=='*abc*'
+/**
+output()
+matchcount(class,`/test/basic3`,0)
+**/
+;

+ 49 - 0
odbctest/mql/basic/10cachedb/18.int2.mql

@@ -0,0 +1,49 @@
+select * from /test/basic3 where v_int >= 1.1
+/**
+output()
+count(2)
+**/
+;
+
+select * from /test/basic3 where v_int = 1
+/**
+count(1)
+**/
+;
+
+select * from /test/basic3 where v_int > 0
+/**
+count(3)
+**/
+;
+
+select * from /test/basic3 where v_int < 2
+/**
+count(1)
+**/
+;
+
+select * from /test/basic3 where v_int >= 1
+/**
+count(3)
+**/
+;
+
+select * from /test/basic3 where v_int <= 1
+/**
+count(1)
+**/
+;
+
+select * from /test/basic3 where v_int >= 1.1
+/**
+output()
+count(2)
+**/
+;
+
+select * from /test/basic3 where v_int > 1
+/**
+count(2)
+**/
+;

+ 12 - 0
odbctest/mql/basic/10cachedb/20.bool2.mql

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

+ 30 - 0
odbctest/mql/basic/10cachedb/22.float2.mql

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

+ 0 - 0
odbctest/mql/basic/10cachedb/24.double2.mql


Some files were not shown because too many files changed in this diff