Debian Codegraph @

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

raw
1 RUN create schema xtest
2
3 1 rows affected
4 RUN use xtest
5
6 0 rows affected
7 RUN create table xtable (doc JSON)
8
9 0 rows affected
10 RUN insert into xtable (doc) values ('{"numeric": 2, "string": "2"}')
11
12 1 rows affected
13 RUN insert into xtable (doc) values ('{"numeric": 70, "string": "70"}')
14
15 1 rows affected
16 RUN insert into xtable (doc) values ('{"numeric": 5, "string": "5"}')
17
18 1 rows affected
19 RUN insert into xtable (doc) values ('{"numeric": 10, "string": "10"}')
20
21 1 rows affected
22 RUN insert into xtable (doc) values ('{"numeric": 1, "string": "1"}')
23
24 1 rows affected
25 RUN insert into xtable (doc) values ('{"numeric": 30, "string": "30"}')
26
27 1 rows affected
28 RUN SELECT * FROM xtest.xtable
29 doc
30 {"string": "2", "numeric": 2}
31 {"string": "70", "numeric": 70}
32 {"string": "5", "numeric": 5}
33 {"string": "10", "numeric": 10}
34 {"string": "1", "numeric": 1}
35 {"string": "30", "numeric": 30}
36 0 rows affected
37 send Mysqlx.Crud.Find {
38 collection {
39 name: "xtable"
40 schema: "xtest"
41 }
42 data_model: TABLE
43 order {
44 expr {
45 type: IDENT
46 identifier {
47 document_path {
48 type: MEMBER
49 value: "numeric"
50 }
51 }
52 }
53 }
54 }
55
56 doc
57 {"string": "1", "numeric": 1}
58 {"string": "2", "numeric": 2}
59 {"string": "5", "numeric": 5}
60 {"string": "10", "numeric": 10}
61 {"string": "30", "numeric": 30}
62 {"string": "70", "numeric": 70}
63 command ok
64 send Mysqlx.Crud.Find {
65 collection {
66 name: "xtable"
67 schema: "xtest"
68 }
69 data_model: TABLE
70 order {
71 expr {
72 type: IDENT
73 identifier {
74 document_path {
75 type: MEMBER
76 value: "string"
77 }
78 }
79 }
80 }
81 }
82
83 doc
84 {"string": "1", "numeric": 1}
85 {"string": "10", "numeric": 10}
86 {"string": "2", "numeric": 2}
87 {"string": "30", "numeric": 30}
88 {"string": "5", "numeric": 5}
89 {"string": "70", "numeric": 70}
90 command ok
91 Mysqlx.Ok {
92 msg: "bye!"
93 }
94 ok