19update.mql 967 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. insert into /test/mpartition (mv_varchar, v_int, v_float, v_text, v_bool) values(?, ?, ?, ?, ?) on conflict update v_bool=v_bool, v_float=v_float+1
  2. /**
  3. params("test001", 1, 1.1, "hello", true)
  4. **/
  5. ;
  6. /**
  7. sleep(1s)
  8. **/
  9. ;
  10. insert into /test/mpartition (mv_varchar, v_int, v_float, v_text, v_bool) values(?, ?, ?, ?, ?) on conflict update v_bool=v_bool, v_float=v_float+1
  11. /**
  12. params("test001", 1, 12, "hello", false)
  13. **/
  14. ;
  15. /**
  16. sleep(1s)
  17. **/
  18. ;
  19. select * from /test/mpartition
  20. /**
  21. output()
  22. **/
  23. ;
  24. select v_bool, v_float from /test/mpartition where mv_varchar='test001' and v_int=1 and v_text='hello' refresh
  25. /**
  26. output()
  27. matchcount(v_float, 2.1, v_bool, true, 1)
  28. **/
  29. ;
  30. select * from / where mv_varchar= '1' and v_int=1
  31. /**
  32. output()
  33. **/
  34. ;
  35. update / set tags=tags+'hello' where mv_varchar= '1' and v_int=1
  36. /**
  37. output()
  38. matchcount("success", 1, 1)
  39. **/
  40. ;
  41. update /test/ set tags=tags+'world' where mv_varchar= '1' and v_int=1
  42. /**
  43. output()
  44. matchcount("success", 1, 1)
  45. **/
  46. ;