| 1 |
create schema xtest default charset 'utf8mb4'; |
| 2 |
RUN use xtest |
| 3 |
|
| 4 |
0 rows affected |
| 5 |
RUN CREATE TABLE `city` ( |
| 6 |
`ID` int(11) NOT NULL auto_increment, |
| 7 |
`Name` char(35) NOT NULL default '', |
| 8 |
`CountryCode` char(3) NOT NULL default '', |
| 9 |
`District` char(20) NOT NULL default '', |
| 10 |
`Population` int(11) NOT NULL default '0', |
| 11 |
PRIMARY KEY (`ID`) |
| 12 |
) |
| 13 |
|
| 14 |
0 rows affected |
| 15 |
RUN INSERT INTO `city` VALUES (1,'Kabul','AFG','Kabol',1780000) |
| 16 |
|
| 17 |
1 rows affected |
| 18 |
last insert id: 1 |
| 19 |
RUN INSERT INTO `city` VALUES (2,'Qandahar','AFG','Qandahar',237500) |
| 20 |
|
| 21 |
1 rows affected |
| 22 |
last insert id: 2 |
| 23 |
RUN INSERT INTO `city` VALUES (3,'Herat','AFG','Herat',186800) |
| 24 |
|
| 25 |
1 rows affected |
| 26 |
last insert id: 3 |
| 27 |
RUN INSERT INTO `city` VALUES (4,'Mazar-e-Sharif','AFG','Balkh',127800) |
| 28 |
|
| 29 |
1 rows affected |
| 30 |
last insert id: 4 |
| 31 |
RUN INSERT INTO `city` VALUES (5,'Amsterdam','NLD','Noord-Holland',731200) |
| 32 |
|
| 33 |
1 rows affected |
| 34 |
last insert id: 5 |
| 35 |
RUN INSERT INTO `city` VALUES (6,'Rotterdam','NLD','Zuid-Holland',593321) |
| 36 |
|
| 37 |
1 rows affected |
| 38 |
last insert id: 6 |
| 39 |
RUN INSERT INTO `city` VALUES (7,'Haag','NLD','Zuid-Holland',440900) |
| 40 |
|
| 41 |
1 rows affected |
| 42 |
last insert id: 7 |
| 43 |
RUN INSERT INTO `city` VALUES (8,'Utrecht','NLD','Utrecht',234323) |
| 44 |
|
| 45 |
1 rows affected |
| 46 |
last insert id: 8 |
| 47 |
RUN INSERT INTO `city` VALUES (9,'Eindhoven','NLD','Noord-Brabant',201843) |
| 48 |
|
| 49 |
1 rows affected |
| 50 |
last insert id: 9 |
| 51 |
RUN INSERT INTO `city` VALUES (10,'Tilburg','NLD','Noord-Brabant',193238) |
| 52 |
|
| 53 |
1 rows affected |
| 54 |
last insert id: 10 |
| 55 |
RUN INSERT INTO `city` VALUES (11,'Groningen','NLD','Groningen',172701) |
| 56 |
|
| 57 |
1 rows affected |
| 58 |
last insert id: 11 |
| 59 |
RUN INSERT INTO `city` VALUES (12,'Breda','NLD','Noord-Brabant',160398) |
| 60 |
|
| 61 |
1 rows affected |
| 62 |
last insert id: 12 |
| 63 |
RUN INSERT INTO `city` VALUES (13,'Apeldoorn','NLD','Gelderland',153491) |
| 64 |
|
| 65 |
1 rows affected |
| 66 |
last insert id: 13 |
| 67 |
RUN INSERT INTO `city` VALUES (14,'Nijmegen','NLD','Gelderland',152463) |
| 68 |
|
| 69 |
1 rows affected |
| 70 |
last insert id: 14 |
| 71 |
RUN INSERT INTO `city` VALUES (15,'Enschede','NLD','Overijssel',149544) |
| 72 |
|
| 73 |
1 rows affected |
| 74 |
last insert id: 15 |
| 75 |
RUN INSERT INTO `city` VALUES (16,'Haarlem','NLD','Noord-Holland',148772) |
| 76 |
|
| 77 |
1 rows affected |
| 78 |
last insert id: 16 |
| 79 |
send Mysqlx.Crud.Find { |
| 80 |
collection { |
| 81 |
name: "city" |
| 82 |
schema: "xtest" |
| 83 |
} |
| 84 |
data_model: TABLE |
| 85 |
criteria { |
| 86 |
type: OPERATOR |
| 87 |
operator { |
| 88 |
name: "<" |
| 89 |
param { |
| 90 |
type: IDENT |
| 91 |
identifier { |
| 92 |
name: "Population" |
| 93 |
} |
| 94 |
} |
| 95 |
param { |
| 96 |
type: LITERAL |
| 97 |
literal { |
| 98 |
type: V_SINT |
| 99 |
v_signed_int: 150000 |
| 100 |
} |
| 101 |
} |
| 102 |
} |
| 103 |
} |
| 104 |
} |
| 105 |
|
| 106 |
Mysqlx.Resultset.ColumnMetaData { |
| 107 |
type: SINT |
| 108 |
name: "ID" |
| 109 |
original_name: "ID" |
| 110 |
table: "city" |
| 111 |
original_table: "city" |
| 112 |
schema: "xtest" |
| 113 |
catalog: "def" |
| 114 |
length: 11 |
| 115 |
flags: 304 |
| 116 |
} |
| 117 |
|
| 118 |
Mysqlx.Resultset.ColumnMetaData { |
| 119 |
type: BYTES |
| 120 |
name: "Name" |
| 121 |
original_name: "Name" |
| 122 |
table: "city" |
| 123 |
original_table: "city" |
| 124 |
schema: "xtest" |
| 125 |
catalog: "def" |
| 126 |
collation: 255 |
| 127 |
length: 140 |
| 128 |
flags: 17 |
| 129 |
} |
| 130 |
|
| 131 |
Mysqlx.Resultset.ColumnMetaData { |
| 132 |
type: BYTES |
| 133 |
name: "CountryCode" |
| 134 |
original_name: "CountryCode" |
| 135 |
table: "city" |
| 136 |
original_table: "city" |
| 137 |
schema: "xtest" |
| 138 |
catalog: "def" |
| 139 |
collation: 255 |
| 140 |
length: 12 |
| 141 |
flags: 17 |
| 142 |
} |
| 143 |
|
| 144 |
Mysqlx.Resultset.ColumnMetaData { |
| 145 |
type: BYTES |
| 146 |
name: "District" |
| 147 |
original_name: "District" |
| 148 |
table: "city" |
| 149 |
original_table: "city" |
| 150 |
schema: "xtest" |
| 151 |
catalog: "def" |
| 152 |
collation: 255 |
| 153 |
length: 80 |
| 154 |
flags: 17 |
| 155 |
} |
| 156 |
|
| 157 |
Mysqlx.Resultset.ColumnMetaData { |
| 158 |
type: SINT |
| 159 |
name: "Population" |
| 160 |
original_name: "Population" |
| 161 |
table: "city" |
| 162 |
original_table: "city" |
| 163 |
schema: "xtest" |
| 164 |
catalog: "def" |
| 165 |
length: 11 |
| 166 |
flags: 16 |
| 167 |
} |
| 168 |
|
| 169 |
Mysqlx.Resultset.Row { |
| 170 |
field: "\010" |
| 171 |
field: "Mazar-e-Sharif\000" |
| 172 |
field: "AFG\000" |
| 173 |
field: "Balkh\000" |
| 174 |
field: "\360\314\017" |
| 175 |
} |
| 176 |
|
| 177 |
Mysqlx.Resultset.Row { |
| 178 |
field: "\036" |
| 179 |
field: "Enschede\000" |
| 180 |
field: "NLD\000" |
| 181 |
field: "Overijssel\000" |
| 182 |
field: "\320\240\022" |
| 183 |
} |
| 184 |
|
| 185 |
Mysqlx.Resultset.Row { |
| 186 |
field: " " |
| 187 |
field: "Haarlem\000" |
| 188 |
field: "NLD\000" |
| 189 |
field: "Noord-Holland\000" |
| 190 |
field: "\310\224\022" |
| 191 |
} |
| 192 |
|
| 193 |
Mysqlx.Resultset.FetchDone { |
| 194 |
} |
| 195 |
|
| 196 |
Mysqlx.Sql.StmtExecuteOk { |
| 197 |
} |
| 198 |
|
| 199 |
Mysqlx.Ok { |
| 200 |
msg: "bye!" |
| 201 |
} |
| 202 |
ok |