| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- -- ============================================================
- -- bucket strulogs 测试
- -- ============================================================
- -- 1. 插入数据到 bucket strulogs
- insert into /test/aaa/test_bucket_strulogs (name, data, val) values ('strulog_001', 'structured log data 1', 100)
- ;
- -- 2. 查询 bucket strulogs
- select * from /test/aaa/test_bucket_strulogs where name='strulog_001'
- /**
- output()
- count(1)
- **/
- ;
- -- 3. 批量插入
- insert into /test/aaa/test_bucket_strulogs (name, data, val) values ('strulog_002', 'structured log data 2', 200)
- ;
- insert into /test/aaa/test_bucket_strulogs (name, data, val) values ('strulog_003', 'structured log data 3', 300)
- ;
- -- 4. 按值搜索 strulogs
- select * from /test/aaa/test_bucket_strulogs where val>150
- /**
- output()
- **/
- ;
- -- 5. update strulogs
- update /test/aaa/test_bucket_strulogs set val=999 where name='strulog_001'
- ;
- select name, val from /test/aaa/test_bucket_strulogs where name='strulog_001'
- /**
- output()
- match("val","999")
- **/
- ;
- -- 6. delete strulogs
- delete from /test/aaa/test_bucket_strulogs where name='strulog_003'
- ;
- select count(*) from /test/aaa/test_bucket_strulogs
- /**
- output()
- **/
- ;
|