polardbxengine/mysql-test/suite/x/r/delete_del_multi_by_id.result

71 lines
1.3 KiB
Plaintext

create schema xtest;
command ok
RUN use xtest
0 rows affected
RUN insert into mycoll (doc) values ('{"_id": "1", "name": "Joe1"}')
1 rows affected
RUN insert into mycoll (doc) values ('{"_id": "2", "name": "Joe2", "last_name": "Smith"}')
1 rows affected
RUN insert into mycoll (doc) values ('{"_id": "3", "name": "Joe2", "last_name": "Shmo"}')
1 rows affected
RUN select * from mycoll
doc _id
{"_id": "1", "name": "Joe1"} 1
{"_id": "2", "name": "Joe2", "last_name": "Smith"} 2
{"_id": "3", "name": "Joe2", "last_name": "Shmo"} 3
0 rows affected
send Mysqlx.Crud.Delete {
collection {
name: "mycoll"
schema: "xtest"
}
data_model: DOCUMENT
criteria {
type: OPERATOR
operator {
name: "in"
param {
type: IDENT
identifier {
name: "_id"
}
}
param {
type: LITERAL
literal {
type: V_OCTETS
v_octets {
value: "1"
}
}
}
param {
type: LITERAL
literal {
type: V_OCTETS
v_octets {
value: "3"
}
}
}
}
}
}
2 rows affected
RUN select * from xtest.mycoll
doc _id
{"_id": "2", "name": "Joe2", "last_name": "Smith"} 2
0 rows affected
Mysqlx.Ok {
msg: "bye!"
}
ok
drop schema if exists xtest;