| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- -- ============================================================
- -- Prepare Update 操作测试
- -- ============================================================
- -- 1. prepare update 基本操作
- update /test/aaa/test_prepare set p_int=? where p_name=?
- /**
- params(999, "prep_insert_001")
- **/
- ;
- select p_name, p_int from /test/aaa/test_prepare where p_name='prep_insert_001'
- /**
- output()
- match("p_int","999")
- **/
- ;
- -- 2. prepare update 多个 ?
- update /test/aaa/test_prepare set p_text=?, p_int=? where p_name=?
- /**
- params("updated by prepare update", 888, "prep_insert_002")
- **/
- ;
- select p_text, p_int from /test/aaa/test_prepare where p_name='prep_insert_002'
- /**
- output()
- match("p_int","888")
- **/
- ;
- -- 3. prepare update float
- update /test/aaa/test_prepare set p_float=?, p_double=? where p_name=?
- /**
- params(99.99, 999.999999, "prep_insert_001")
- **/
- ;
- select p_float, p_double from /test/aaa/test_prepare where p_name='prep_insert_001'
- /**
- output()
- match("p_float","99.99")
- **/
- ;
- -- 4. prepare update 不存在的记录
- update /test/aaa/test_prepare set p_int=? where p_name=?
- /**
- params(1, "non_exist_prepare_key")
- **/
- ;
- select * from /test/aaa/test_prepare where p_name='non_exist_prepare_key'
- /**
- output()
- count(0)
- **/
- ;
|