← Back
Editing: crud_octets_content_type.result
install plugin mysqlx soname "mysqlx.so"; call mtr.add_suppression("Plugin mysqlx reported: .Failed at SSL configuration: .SSL context is not usable without certificate and private key.."); call mtr.add_suppression("Plugin mysqlx reported: .SSL_CTX_load_verify_locations failed."); DROP SCHEMA IF EXISTS xtest; Warnings: Note 1008 Can't drop database 'xtest'; database doesn't exist CREATE SCHEMA xtest; USE xtest; CREATE TABLE xtable (f int); INSERT INTO xtable (f) VALUES (42); send Mysqlx.Crud.Find { collection { name: "xtable" schema: "xtest" } data_model: TABLE projection { source { type: FUNC_CALL function_call { name { name: "st_astext" } param { type: LITERAL literal { type: V_OCTETS v_octets { value: "\001\001\000\000\000\000\000\000\000\000\000\360?\000\000\000\000\000\000\360?" content_type: 1 } } } } } } } st_astext(ST_GEOMETRYFROMWKB('\0\0\0\0\0\0\0\0\0\??\0\0\0\0\0\0\??')) POINT(1 1) command ok Warnings generated: WARNING | 1300 | Invalid utf8mb4 character string: 'F03F00' send Mysqlx.Crud.Find { collection { name: "xtable" schema: "xtest" } data_model: TABLE projection { source { type: FUNC_CALL function_call { name { name: "json_valid" } param { type: LITERAL literal { type: V_OCTETS v_octets { value: "{\"ala\":1}" content_type: 0 } } } } } } projection { source { type: FUNC_CALL function_call { name { name: "json_valid" } param { type: LITERAL literal { type: V_OCTETS v_octets { value: "{\"ala\":1}" content_type: 2 } } } } } } } json_valid('{\"ala\":1}') json_valid(CAST('{\"ala\":1}' AS JSON)) 1 1 command ok send Mysqlx.Crud.Find { collection { name: "xtable" schema: "xtest" } data_model: TABLE projection { source { type: FUNC_CALL function_call { name { name: "extractvalue" } param { type: LITERAL literal { type: V_OCTETS v_octets { value: "<a>b</a>" content_type: 0 } } } param { type: LITERAL literal { type: V_OCTETS v_octets { value: "/a" content_type: 0 } } } } } } projection { source { type: FUNC_CALL function_call { name { name: "extractvalue" } param { type: LITERAL literal { type: V_OCTETS v_octets { value: "<a>b</a>" content_type: 3 } } } param { type: LITERAL literal { type: V_OCTETS v_octets { value: "/a" content_type: 0 } } } } } } } extractvalue('<a>b</a>','/a') extractvalue('<a>b</a>','/a') b b command ok Mysqlx.Ok { msg: "bye!" } ok DROP SCHEMA IF EXISTS xtest; UNINSTALL PLUGIN mysqlx;
Save File
Cancel