| 1 |
create schema xtest; |
| 2 |
|
| 3 |
command ok |
| 4 |
RUN use xtest |
| 5 |
|
| 6 |
0 rows affected |
| 7 |
RUN insert into mycoll (doc) values ('{"_id": "1", "name": "Joe1"}') |
| 8 |
|
| 9 |
1 rows affected |
| 10 |
RUN insert into mycoll (doc) values ('{"_id": "2", "name": "Joe2", "last_name": "Smith"}') |
| 11 |
|
| 12 |
1 rows affected |
| 13 |
RUN insert into mycoll (doc) values ('{"_id": "3", "name": "Joe2", "last_name": "Shmo"}') |
| 14 |
|
| 15 |
1 rows affected |
| 16 |
RUN select doc from mycoll |
| 17 |
doc |
| 18 |
{"_id": "1", "name": "Joe1"} |
| 19 |
{"_id": "2", "name": "Joe2", "last_name": "Smith"} |
| 20 |
{"_id": "3", "name": "Joe2", "last_name": "Shmo"} |
| 21 |
0 rows affected |
| 22 |
send Mysqlx.Crud.Delete { |
| 23 |
collection { |
| 24 |
name: "mycoll" |
| 25 |
schema: "xtest" |
| 26 |
} |
| 27 |
data_model: DOCUMENT |
| 28 |
criteria { |
| 29 |
type: OPERATOR |
| 30 |
operator { |
| 31 |
name: "in" |
| 32 |
param { |
| 33 |
type: IDENT |
| 34 |
identifier { |
| 35 |
name: "_id" |
| 36 |
} |
| 37 |
} |
| 38 |
param { |
| 39 |
type: LITERAL |
| 40 |
literal { |
| 41 |
type: V_OCTETS |
| 42 |
v_octets { |
| 43 |
value: "1" |
| 44 |
} |
| 45 |
} |
| 46 |
} |
| 47 |
param { |
| 48 |
type: LITERAL |
| 49 |
literal { |
| 50 |
type: V_OCTETS |
| 51 |
v_octets { |
| 52 |
value: "3" |
| 53 |
} |
| 54 |
} |
| 55 |
} |
| 56 |
} |
| 57 |
} |
| 58 |
} |
| 59 |
|
| 60 |
|
| 61 |
2 rows affected |
| 62 |
RUN select doc from xtest.mycoll |
| 63 |
doc |
| 64 |
{"_id": "2", "name": "Joe2", "last_name": "Smith"} |
| 65 |
0 rows affected |
| 66 |
Mysqlx.Ok { |
| 67 |
msg: "bye!" |
| 68 |
} |
| 69 |
ok |