Debian Codegraph @

mysql-test/suite/x/r/find_doc_simple.result

raw
1 create schema xtest default charset 'utf8mb4';
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 insert into mycoll (doc) values ('{"_id": "4", "name": "小島", "last_name": "Bla"}')
17
18 1 rows affected
19 send Mysqlx.Crud.Find {
20 collection {
21 name: "mycoll"
22 schema: "xtest"
23 }
24 data_model: DOCUMENT
25 }
26
27 Mysqlx.Resultset.ColumnMetaData {
28 type: BYTES
29 name: "doc"
30 original_name: "doc"
31 table: "mycoll"
32 original_table: "mycoll"
33 schema: "xtest"
34 catalog: "def"
35 collation: 63
36 length: 4294967295
37 content_type: 2
38 }
39
40 Mysqlx.Resultset.Row {
41 field: "{\"_id\": \"1\", \"name\": \"Joe1\"}\000"
42 }
43
44 Mysqlx.Resultset.Row {
45 field: "{\"_id\": \"2\", \"name\": \"Joe2\", \"last_name\": \"Smith\"}\000"
46 }
47
48 Mysqlx.Resultset.Row {
49 field: "{\"_id\": \"3\", \"name\": \"Joe2\", \"last_name\": \"Shmo\"}\000"
50 }
51
52 Mysqlx.Resultset.Row {
53 field: "{\"_id\": \"4\", \"name\": \"\345\260\217\345\263\266\", \"last_name\": \"Bla\"}\000"
54 }
55
56 Mysqlx.Resultset.FetchDone {
57 }
58
59 Mysqlx.Sql.StmtExecuteOk {
60 }
61
62
63 set empty document and array
64 ............................
65 send Mysqlx.Crud.Update {
66 collection {
67 name: "mycoll"
68 schema: "xtest"
69 }
70 data_model: DOCUMENT
71 operation {
72 source {
73 document_path {
74 type: MEMBER
75 value: "docfield"
76 }
77 }
78 operation: ITEM_SET
79 value {
80 type: OBJECT
81 object {
82 }
83 }
84 }
85 operation {
86 source {
87 document_path {
88 type: MEMBER
89 value: "docarray"
90 }
91 }
92 operation: ITEM_SET
93 value {
94 type: ARRAY
95 array {
96 }
97 }
98 }
99 }
100
101
102 4 rows affected
103 Rows matched: 4 Changed: 4 Warnings: 0
104 Mysqlx.Ok {
105 msg: "bye!"
106 }
107 ok