From d6a1508f0a8f2e8482801499a1f168721a4b243a Mon Sep 17 00:00:00 2001 From: "vitess-bot[bot]" <108069721+vitess-bot[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 14:29:28 +0300 Subject: [PATCH] [release-19.0] JSON Encoding: Use Type_RAW for marshalling json (#16637) (#16681) Signed-off-by: Rohit Nayak Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com> Co-authored-by: Rohit Nayak --- go/mysql/json/marshal.go | 2 +- .../vtgate/queries/dml/insert_test.go | 26 +++++++++++++ .../endtoend/vtgate/queries/dml/main_test.go | 2 +- .../vtgate/queries/dml/sharded_schema.sql | 7 ++++ .../vtgate/queries/dml/unsharded_schema.sql | 9 ++++- .../endtoend/vtgate/queries/dml/vschema.json | 8 ++++ go/vt/proto/query/query.pb.go | 31 +++++++++------- go/vt/sqlparser/normalizer_test.go | 17 +++++++++ go/vt/sqlparser/parsed_query.go | 2 +- go/vt/sqlparser/parsed_query_test.go | 37 ++++++++++++------- .../io/vitess/jdbc/FieldWithMetadataTest.java | 16 +++++++- proto/query.proto | 2 + web/vtadmin/package-lock.json | 8 ++-- web/vtadmin/src/proto/vtadmin.d.ts | 3 +- web/vtadmin/src/proto/vtadmin.js | 22 +++++++++++ 15 files changed, 155 insertions(+), 37 deletions(-) diff --git a/go/mysql/json/marshal.go b/go/mysql/json/marshal.go index d1a0072ccbb..97d14a336c8 100644 --- a/go/mysql/json/marshal.go +++ b/go/mysql/json/marshal.go @@ -175,6 +175,6 @@ func MarshalSQLValue(buf []byte) (*sqltypes.Value, error) { return nil, err } - newVal := sqltypes.MakeTrusted(querypb.Type_JSON, jsonVal.MarshalSQLTo(nil)) + newVal := sqltypes.MakeTrusted(querypb.Type_RAW, jsonVal.MarshalSQLTo(nil)) return &newVal, nil } diff --git a/go/test/endtoend/vtgate/queries/dml/insert_test.go b/go/test/endtoend/vtgate/queries/dml/insert_test.go index 77a8dfe017a..b8c67f31ce3 100644 --- a/go/test/endtoend/vtgate/queries/dml/insert_test.go +++ b/go/test/endtoend/vtgate/queries/dml/insert_test.go @@ -470,3 +470,29 @@ func TestMixedCases(t *testing.T) { // final check count on the lookup vindex table. utils.AssertMatches(t, mcmp.VtConn, "select count(*) from lkp_mixed_idx", "[[INT64(12)]]") } + +// TestInsertJson tests that selected json values are encoded correctly. +func TestInsertJson(t *testing.T) { + utils.SkipIfBinaryIsBelowVersion(t, 21, "vtgate") + utils.SkipIfBinaryIsBelowVersion(t, 21, "vttablet") + + mcmp, closer := start(t) + defer closer() + + mcmp.Exec(`insert into j_tbl(id, jdoc) values (1, '{}'), (2, '{"a": 1, "b": 2}')`) + mcmp.Exec(`select * from j_tbl order by id`) + + mcmp.Exec(`insert into j_tbl(id, jdoc) select 3, json_object("k", "a")`) + mcmp.Exec(`select * from j_tbl order by id`) + + mcmp.Exec(`insert into j_tbl(id, jdoc) select 4,JSON_OBJECT( + 'date', CAST(1629849600 AS UNSIGNED), + 'keywordSourceId', CAST(930701976723823 AS UNSIGNED), + 'keywordSourceVersionId', CAST(210825230433 AS UNSIGNED) + )`) + mcmp.Exec(`select * from j_tbl order by id`) + + utils.Exec(t, mcmp.VtConn, `insert into uks.j_utbl(id, jdoc) select * from sks.j_tbl`) + utils.AssertMatches(t, mcmp.VtConn, `select * from uks.j_utbl order by id`, + `[[INT64(1) JSON("{}")] [INT64(2) JSON("{\"a\": 1, \"b\": 2}")] [INT64(3) JSON("{\"k\": \"a\"}")] [INT64(4) JSON("{\"date\": 1629849600, \"keywordSourceId\": 930701976723823, \"keywordSourceVersionId\": 210825230433}")]]`) +} diff --git a/go/test/endtoend/vtgate/queries/dml/main_test.go b/go/test/endtoend/vtgate/queries/dml/main_test.go index c00e27fe3a0..0c4d58aa614 100644 --- a/go/test/endtoend/vtgate/queries/dml/main_test.go +++ b/go/test/endtoend/vtgate/queries/dml/main_test.go @@ -133,7 +133,7 @@ func start(t *testing.T) (utils.MySQLCompare, func()) { tables := []string{ "s_tbl", "num_vdx_tbl", "user_tbl", "order_tbl", "oevent_tbl", "oextra_tbl", - "auto_tbl", "oid_vdx_tbl", "unq_idx", "nonunq_idx", "u_tbl", "mixed_tbl", "lkp_map_idx", + "auto_tbl", "oid_vdx_tbl", "unq_idx", "nonunq_idx", "u_tbl", "mixed_tbl", "lkp_map_idx", "j_tbl", "j_utbl", } for _, table := range tables { // TODO (@frouioui): following assertions produce different results between MySQL and Vitess diff --git a/go/test/endtoend/vtgate/queries/dml/sharded_schema.sql b/go/test/endtoend/vtgate/queries/dml/sharded_schema.sql index 3310724d420..cc24737a0fa 100644 --- a/go/test/endtoend/vtgate/queries/dml/sharded_schema.sql +++ b/go/test/endtoend/vtgate/queries/dml/sharded_schema.sql @@ -86,3 +86,10 @@ create table lkp_mixed_idx keyspace_id varbinary(20), primary key (lkp_key) ) Engine = InnoDB; + +create table j_tbl +( + id bigint, + jdoc json, + primary key (id) +) Engine = InnoDB; \ No newline at end of file diff --git a/go/test/endtoend/vtgate/queries/dml/unsharded_schema.sql b/go/test/endtoend/vtgate/queries/dml/unsharded_schema.sql index 4d2ad06618a..cd64605ad20 100644 --- a/go/test/endtoend/vtgate/queries/dml/unsharded_schema.sql +++ b/go/test/endtoend/vtgate/queries/dml/unsharded_schema.sql @@ -34,4 +34,11 @@ values (0, 1, 1000); insert into auto_seq(id, next_id, cache) values (0, 666, 1000); insert into mixed_seq(id, next_id, cache) -values (0, 1, 1000); \ No newline at end of file +values (0, 1, 1000); + +create table j_utbl +( + id bigint, + jdoc json, + primary key (id) +) Engine = InnoDB; \ No newline at end of file diff --git a/go/test/endtoend/vtgate/queries/dml/vschema.json b/go/test/endtoend/vtgate/queries/dml/vschema.json index a42a93d7403..72a949a49e4 100644 --- a/go/test/endtoend/vtgate/queries/dml/vschema.json +++ b/go/test/endtoend/vtgate/queries/dml/vschema.json @@ -188,6 +188,14 @@ "name": "hash" } ] + }, + "j_tbl": { + "column_vindexes": [ + { + "column": "id", + "name": "hash" + } + ] } } } \ No newline at end of file diff --git a/go/vt/proto/query/query.pb.go b/go/vt/proto/query/query.pb.go index 098ccad1032..b5e72b6a1f3 100644 --- a/go/vt/proto/query/query.pb.go +++ b/go/vt/proto/query/query.pb.go @@ -315,6 +315,8 @@ const ( // BITNUM specifies a base 2 binary type (unquoted varbinary). // Properties: 34, IsText. Type_BITNUM Type = 4130 + // RAW specifies a type which won't be quoted but the value used as-is while encoding. + Type_RAW Type = 2084 ) // Enum value maps for Type. @@ -355,6 +357,7 @@ var ( 4128: "HEXNUM", 4129: "HEXVAL", 4130: "BITNUM", + 2084: "RAW", } Type_value = map[string]int32{ "NULL_TYPE": 0, @@ -392,6 +395,7 @@ var ( "HEXNUM": 4128, "HEXVAL": 4129, "BITNUM": 4130, + "RAW": 2084, } ) @@ -6510,7 +6514,7 @@ var file_query_proto_rawDesc = []byte{ 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x10, 0x80, 0x08, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x53, 0x51, 0x55, 0x4f, 0x54, 0x45, 0x44, 0x10, 0x80, 0x10, 0x12, 0x0b, 0x0a, 0x06, 0x49, 0x53, 0x54, 0x45, 0x58, 0x54, 0x10, 0x80, 0x20, 0x12, 0x0d, 0x0a, 0x08, 0x49, 0x53, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, - 0x10, 0x80, 0x40, 0x2a, 0xc0, 0x03, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, + 0x10, 0x80, 0x40, 0x2a, 0xca, 0x03, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x04, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x81, 0x02, 0x12, 0x0a, 0x0a, 0x05, 0x55, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x82, 0x06, 0x12, 0x0a, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x83, 0x02, 0x12, 0x0b, @@ -6538,18 +6542,19 @@ var file_query_proto_rawDesc = []byte{ 0x0e, 0x0a, 0x0a, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x1f, 0x12, 0x0b, 0x0a, 0x06, 0x48, 0x45, 0x58, 0x4e, 0x55, 0x4d, 0x10, 0xa0, 0x20, 0x12, 0x0b, 0x0a, 0x06, 0x48, 0x45, 0x58, 0x56, 0x41, 0x4c, 0x10, 0xa1, 0x20, 0x12, 0x0b, 0x0a, 0x06, 0x42, 0x49, 0x54, - 0x4e, 0x55, 0x4d, 0x10, 0xa2, 0x20, 0x2a, 0x46, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x45, 0x50, 0x41, - 0x52, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x02, - 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x4f, 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x03, 0x2a, 0x31, - 0x0a, 0x0f, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x09, 0x0a, 0x05, 0x56, 0x49, 0x45, 0x57, 0x53, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, - 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, - 0x02, 0x42, 0x35, 0x0a, 0x0f, 0x69, 0x6f, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x22, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, - 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4e, 0x55, 0x4d, 0x10, 0xa2, 0x20, 0x12, 0x08, 0x0a, 0x03, 0x52, 0x41, 0x57, 0x10, 0xa4, 0x10, + 0x2a, 0x46, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x52, 0x45, 0x50, 0x41, 0x52, 0x45, 0x10, 0x01, 0x12, 0x0a, + 0x0a, 0x06, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x4f, + 0x4c, 0x4c, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x03, 0x2a, 0x31, 0x0a, 0x0f, 0x53, 0x63, 0x68, 0x65, + 0x6d, 0x61, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x56, + 0x49, 0x45, 0x57, 0x53, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x41, 0x42, 0x4c, 0x45, 0x53, + 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x4c, 0x4c, 0x10, 0x02, 0x42, 0x35, 0x0a, 0x0f, 0x69, + 0x6f, 0x2e, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x22, + 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x69, 0x74, 0x65, 0x73, 0x73, + 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x71, 0x75, 0x65, + 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/go/vt/sqlparser/normalizer_test.go b/go/vt/sqlparser/normalizer_test.go index de1fdc868ad..15d24d9d3be 100644 --- a/go/vt/sqlparser/normalizer_test.go +++ b/go/vt/sqlparser/normalizer_test.go @@ -209,6 +209,23 @@ func TestNormalize(t *testing.T) { outbv: map[string]*querypb.BindVariable{ "v1": sqltypes.BitNumBindVariable([]byte("0b11")), }, + }, { + // json value in insert + in: "insert into t values ('{\"k\", \"v\"}')", + outstmt: "insert into t values (:bv1 /* VARCHAR */)", + outbv: map[string]*querypb.BindVariable{ + "bv1": sqltypes.StringBindVariable("{\"k\", \"v\"}"), + }, + }, { + // json function in insert + in: "insert into t values (JSON_OBJECT('_id', 27, 'name', 'carrot'))", + outstmt: "insert into t values (json_object(:bv1 /* VARCHAR */, :bv2 /* INT64 */, :bv3 /* VARCHAR */, :bv4 /* VARCHAR */))", + outbv: map[string]*querypb.BindVariable{ + "bv1": sqltypes.StringBindVariable("_id"), + "bv2": sqltypes.Int64BindVariable(27), + "bv3": sqltypes.StringBindVariable("name"), + "bv4": sqltypes.StringBindVariable("carrot"), + }, }, { // ORDER BY column_position in: "select a, b from t order by 1 asc", diff --git a/go/vt/sqlparser/parsed_query.go b/go/vt/sqlparser/parsed_query.go index a612e555ee8..491e7400988 100644 --- a/go/vt/sqlparser/parsed_query.go +++ b/go/vt/sqlparser/parsed_query.go @@ -101,7 +101,7 @@ func EncodeValue(buf *strings.Builder, value *querypb.BindVariable) { sqltypes.ProtoToValue(bv).EncodeSQLStringBuilder(buf) } buf.WriteByte(')') - case querypb.Type_JSON: + case querypb.Type_RAW: v, _ := sqltypes.BindVariableToValue(value) buf.Write(v.Raw()) default: diff --git a/go/vt/sqlparser/parsed_query_test.go b/go/vt/sqlparser/parsed_query_test.go index ef59676883f..2e01655c644 100644 --- a/go/vt/sqlparser/parsed_query_test.go +++ b/go/vt/sqlparser/parsed_query_test.go @@ -20,6 +20,8 @@ import ( "reflect" "testing" + "github.com/stretchr/testify/require" + "vitess.io/vitess/go/sqltypes" querypb "vitess.io/vitess/go/vt/proto/query" @@ -80,6 +82,14 @@ func TestGenerateQuery(t *testing.T) { "vals": sqltypes.TestBindVariable([]any{1, "aa"}), }, output: "select * from a where id in (1, 'aa')", + }, { + desc: "json bindvar and raw bindvar", + query: "insert into t values (:v1, :v2)", + bindVars: map[string]*querypb.BindVariable{ + "v1": sqltypes.ValueBindVariable(sqltypes.MakeTrusted(querypb.Type_JSON, []byte(`{"key": "value"}`))), + "v2": sqltypes.ValueBindVariable(sqltypes.MakeTrusted(querypb.Type_RAW, []byte(`json_object("k", "v")`))), + }, + output: `insert into t values ('{\"key\": \"value\"}', json_object("k", "v"))`, }, { desc: "list bind vars 0 arguments", query: "select * from a where id in ::vals", @@ -138,20 +148,19 @@ func TestGenerateQuery(t *testing.T) { parser := NewTestParser() for _, tcase := range tcases { - tree, err := parser.Parse(tcase.query) - if err != nil { - t.Errorf("parse failed for %s: %v", tcase.desc, err) - continue - } - buf := NewTrackedBuffer(nil) - buf.Myprintf("%v", tree) - pq := buf.ParsedQuery() - bytes, err := pq.GenerateQuery(tcase.bindVars, tcase.extras) - if err != nil { - assert.Equal(t, tcase.output, err.Error()) - } else { - assert.Equal(t, tcase.output, string(bytes)) - } + t.Run(tcase.query, func(t *testing.T) { + tree, err := parser.Parse(tcase.query) + require.NoError(t, err) + buf := NewTrackedBuffer(nil) + buf.Myprintf("%v", tree) + pq := buf.ParsedQuery() + bytes, err := pq.GenerateQuery(tcase.bindVars, tcase.extras) + if err != nil { + assert.Equal(t, tcase.output, err.Error()) + } else { + assert.Equal(t, tcase.output, bytes) + } + }) } } diff --git a/java/jdbc/src/test/java/io/vitess/jdbc/FieldWithMetadataTest.java b/java/jdbc/src/test/java/io/vitess/jdbc/FieldWithMetadataTest.java index bcadc49d33a..26ad5fd11b3 100644 --- a/java/jdbc/src/test/java/io/vitess/jdbc/FieldWithMetadataTest.java +++ b/java/jdbc/src/test/java/io/vitess/jdbc/FieldWithMetadataTest.java @@ -16,6 +16,9 @@ package io.vitess.jdbc; +import java.util.Set; +import java.util.EnumSet; + import io.vitess.proto.Query; import io.vitess.util.MysqlDefs; import io.vitess.util.charset.CharsetMapping; @@ -274,6 +277,16 @@ public void testNumericAndDateTimeEncoding() throws SQLException { } } + // Define the types to skip + Set typesToSkip = EnumSet.of( + Query.Type.UNRECOGNIZED, + Query.Type.EXPRESSION, + Query.Type.HEXVAL, + Query.Type.HEXNUM, + Query.Type.BITNUM, + Query.Type.RAW + ); + @Test public void testPrecisionAdjustFactor() throws SQLException { VitessConnection conn = getVitessConnection(); @@ -294,7 +307,8 @@ public void testPrecisionAdjustFactor() throws SQLException { conn.setIncludedFields(Query.ExecuteOptions.IncludedFields.TYPE_AND_NAME); for (Query.Type type : Query.Type.values()) { - if (type == Query.Type.UNRECOGNIZED || type == Query.Type.EXPRESSION || type == Query.Type.HEXVAL || type == Query.Type.HEXNUM || type == Query.Type.BITNUM) { + // Skip if the type is in the set + if (typesToSkip.contains(type)) { continue; } diff --git a/proto/query.proto b/proto/query.proto index 4d94fcb2c83..6ba19dc6691 100644 --- a/proto/query.proto +++ b/proto/query.proto @@ -215,6 +215,8 @@ enum Type { // BITNUM specifies a base 2 binary type (unquoted varbinary). // Properties: 34, IsText. BITNUM = 4130; + // RAW specifies a type which won't be quoted but the value used as-is while encoding. + RAW = 2084; } // Value represents a typed value. diff --git a/web/vtadmin/package-lock.json b/web/vtadmin/package-lock.json index eed09f2ea4e..ce44946a616 100644 --- a/web/vtadmin/package-lock.json +++ b/web/vtadmin/package-lock.json @@ -24641,11 +24641,11 @@ "dev": true }, "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "requires": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" } }, diff --git a/web/vtadmin/src/proto/vtadmin.d.ts b/web/vtadmin/src/proto/vtadmin.d.ts index 69f7891e271..97a1deeb1ee 100644 --- a/web/vtadmin/src/proto/vtadmin.d.ts +++ b/web/vtadmin/src/proto/vtadmin.d.ts @@ -33979,7 +33979,8 @@ export namespace query { EXPRESSION = 31, HEXNUM = 4128, HEXVAL = 4129, - BITNUM = 4130 + BITNUM = 4130, + RAW = 2084 } /** Properties of a Value. */ diff --git a/web/vtadmin/src/proto/vtadmin.js b/web/vtadmin/src/proto/vtadmin.js index 3263bc3eb51..94537540930 100644 --- a/web/vtadmin/src/proto/vtadmin.js +++ b/web/vtadmin/src/proto/vtadmin.js @@ -80140,6 +80140,7 @@ export const query = $root.query = (() => { * @property {number} HEXNUM=4128 HEXNUM value * @property {number} HEXVAL=4129 HEXVAL value * @property {number} BITNUM=4130 BITNUM value + * @property {number} RAW=2084 RAW value */ query.Type = (function() { const valuesById = {}, values = Object.create(valuesById); @@ -80178,6 +80179,7 @@ export const query = $root.query = (() => { values[valuesById[4128] = "HEXNUM"] = 4128; values[valuesById[4129] = "HEXVAL"] = 4129; values[valuesById[4130] = "BITNUM"] = 4130; + values[valuesById[2084] = "RAW"] = 2084; return values; })(); @@ -80366,6 +80368,7 @@ export const query = $root.query = (() => { case 4128: case 4129: case 4130: + case 2084: break; } if (message.value != null && message.hasOwnProperty("value")) @@ -80533,6 +80536,10 @@ export const query = $root.query = (() => { case 4130: message.type = 4130; break; + case "RAW": + case 2084: + message.type = 2084; + break; } if (object.value != null) if (typeof object.value === "string") @@ -80805,6 +80812,7 @@ export const query = $root.query = (() => { case 4128: case 4129: case 4130: + case 2084: break; } if (message.value != null && message.hasOwnProperty("value")) @@ -80981,6 +80989,10 @@ export const query = $root.query = (() => { case 4130: message.type = 4130; break; + case "RAW": + case 2084: + message.type = 2084; + break; } if (object.value != null) if (typeof object.value === "string") @@ -82471,6 +82483,7 @@ export const query = $root.query = (() => { case 4128: case 4129: case 4130: + case 2084: break; } if (message.table != null && message.hasOwnProperty("table")) @@ -82664,6 +82677,10 @@ export const query = $root.query = (() => { case 4130: message.type = 4130; break; + case "RAW": + case 2084: + message.type = 2084; + break; } if (object.table != null) message.table = String(object.table); @@ -103539,6 +103556,7 @@ export const vschema = $root.vschema = (() => { case 4128: case 4129: case 4130: + case 2084: break; } if (message.invisible != null && message.hasOwnProperty("invisible")) @@ -103732,6 +103750,10 @@ export const vschema = $root.vschema = (() => { case 4130: message.type = 4130; break; + case "RAW": + case 2084: + message.type = 2084; + break; } if (object.invisible != null) message.invisible = Boolean(object.invisible);