@@ -67,7 +67,7 @@ public static void ConditionPutRow()
6767 try
6868 {
6969 request . Condition . ColumnCondition = new RelationalCondition ( "col0" ,
70- RelationalCondition . CompareOperator . NOT_EQUAL ,
70+ CompareOperator . NOT_EQUAL ,
7171 new ColumnValue ( 5 ) ) ;
7272 otsClient . PutRow ( request ) ;
7373
@@ -82,7 +82,7 @@ public static void ConditionPutRow()
8282 {
8383 // 新增条件:col0列的值等于5
8484 request . Condition . ColumnCondition = new RelationalCondition ( "col0" ,
85- RelationalCondition . CompareOperator . EQUAL ,
85+ CompareOperator . EQUAL ,
8686 new ColumnValue ( 5 ) ) ;
8787 otsClient . PutRow ( request ) ;
8888
@@ -137,11 +137,11 @@ public static void ConditionUpdateRow()
137137 {
138138 // 构造condition
139139 var cond1 = new RelationalCondition ( "col0" ,
140- RelationalCondition . CompareOperator . NOT_EQUAL ,
140+ CompareOperator . NOT_EQUAL ,
141141 new ColumnValue ( 5 ) ) ;
142- var cond2 = new RelationalCondition ( "col1" , RelationalCondition . CompareOperator . EQUAL ,
142+ var cond2 = new RelationalCondition ( "col1" , CompareOperator . EQUAL ,
143143 new ColumnValue ( "a" ) ) ;
144- var columenCondition = new CompositeCondition ( CompositeCondition . LogicOperator . AND ) ;
144+ var columenCondition = new CompositeCondition ( LogicOperator . AND ) ;
145145 columenCondition . AddCondition ( cond1 ) ;
146146 columenCondition . AddCondition ( cond2 ) ;
147147
@@ -203,7 +203,7 @@ public static void ConditionDeleteRow()
203203 // 构造条件语句:col2列的值等于true
204204 var condition = new Condition ( RowExistenceExpectation . EXPECT_EXIST ) ;
205205 condition . ColumnCondition = new RelationalCondition ( "col2" ,
206- RelationalCondition . CompareOperator . EQUAL ,
206+ CompareOperator . EQUAL ,
207207 new ColumnValue ( true ) ) ;
208208
209209 // 构造删除请求
@@ -260,15 +260,15 @@ public static void ConditionBatchWriteRow()
260260 // 构造条件语句:col0列的值不等于5
261261 var condition = new Condition ( RowExistenceExpectation . IGNORE ) ;
262262 condition . ColumnCondition = new RelationalCondition ( "col0" ,
263- RelationalCondition . CompareOperator . NOT_EQUAL ,
263+ CompareOperator . NOT_EQUAL ,
264264 new ColumnValue ( 5 ) ) ;
265265
266266 // 构造col2列的值
267267 var attr1 = new AttributeColumns ( ) ;
268268 attr1 . Add ( "col2" , new ColumnValue ( false ) ) ;
269269
270270 // 构造批量写请求
271- var rowChange = new RowChanges ( ) ;
271+ var rowChange = new RowChanges ( tableName ) ;
272272 rowChange . AddPut ( condition , primaryKey , attr1 ) ;
273273
274274 var batchWriteRequest = new BatchWriteRowRequest ( ) ;
0 commit comments