@@ -10,21 +10,21 @@ const JSONStringSerializationVersion uint64 = 1
10
10
//
11
11
// Use ColJSONBytes for []bytes ColumnOf implementation.
12
12
type ColJSONStr struct {
13
- str ColStr
13
+ Str ColStr
14
14
}
15
15
16
16
// Append string to column.
17
17
func (c * ColJSONStr ) Append (v string ) {
18
- c .str .Append (v )
18
+ c .Str .Append (v )
19
19
}
20
20
21
21
// AppendBytes append byte slice as string to column.
22
22
func (c * ColJSONStr ) AppendBytes (v []byte ) {
23
- c .str .AppendBytes (v )
23
+ c .Str .AppendBytes (v )
24
24
}
25
25
26
26
func (c * ColJSONStr ) AppendArr (v []string ) {
27
- c .str .AppendArr (v )
27
+ c .Str .AppendArr (v )
28
28
}
29
29
30
30
// Compile-time assertions for ColJSONStr.
@@ -43,19 +43,19 @@ func (ColJSONStr) Type() ColumnType {
43
43
44
44
// Rows returns count of rows in column.
45
45
func (c ColJSONStr ) Rows () int {
46
- return c .str .Rows ()
46
+ return c .Str .Rows ()
47
47
}
48
48
49
49
// Reset resets data in row, preserving capacity for efficiency.
50
50
func (c * ColJSONStr ) Reset () {
51
- c .str .Reset ()
51
+ c .Str .Reset ()
52
52
}
53
53
54
54
// EncodeColumn encodes String rows to *Buffer.
55
55
func (c ColJSONStr ) EncodeColumn (b * Buffer ) {
56
56
b .PutUInt64 (JSONStringSerializationVersion )
57
57
58
- c .str .EncodeColumn (b )
58
+ c .Str .EncodeColumn (b )
59
59
}
60
60
61
61
// WriteColumn writes JSON rows to *Writer.
@@ -64,32 +64,32 @@ func (c ColJSONStr) WriteColumn(w *Writer) {
64
64
b .PutUInt64 (JSONStringSerializationVersion )
65
65
})
66
66
67
- c .str .WriteColumn (w )
67
+ c .Str .WriteColumn (w )
68
68
}
69
69
70
70
// ForEach calls f on each string from column.
71
71
func (c ColJSONStr ) ForEach (f func (i int , s string ) error ) error {
72
- return c .str .ForEach (f )
72
+ return c .Str .ForEach (f )
73
73
}
74
74
75
75
// First returns the first row of the column.
76
76
func (c ColJSONStr ) First () string {
77
- return c .str .First ()
77
+ return c .Str .First ()
78
78
}
79
79
80
80
// Row returns row with number i.
81
81
func (c ColJSONStr ) Row (i int ) string {
82
- return c .str .Row (i )
82
+ return c .Str .Row (i )
83
83
}
84
84
85
85
// RowBytes returns row with number i as byte slice.
86
86
func (c ColJSONStr ) RowBytes (i int ) []byte {
87
- return c .str .RowBytes (i )
87
+ return c .Str .RowBytes (i )
88
88
}
89
89
90
90
// ForEachBytes calls f on each string from column as byte slice.
91
91
func (c ColJSONStr ) ForEachBytes (f func (i int , b []byte ) error ) error {
92
- return c .str .ForEachBytes (f )
92
+ return c .Str .ForEachBytes (f )
93
93
}
94
94
95
95
// DecodeColumn decodes String rows from *Reader.
@@ -103,22 +103,22 @@ func (c *ColJSONStr) DecodeColumn(r *Reader, rows int) error {
103
103
return errors .Errorf ("received invalid JSON string serialization version %d. Setting \" output_format_native_write_json_as_string\" must be enabled." , jsonSerializationVersion )
104
104
}
105
105
106
- return c .str .DecodeColumn (r , rows )
106
+ return c .Str .DecodeColumn (r , rows )
107
107
}
108
108
109
109
// LowCardinality returns LowCardinality(JSON).
110
110
func (c * ColJSONStr ) LowCardinality () * ColLowCardinality [string ] {
111
- return c .str .LowCardinality ()
111
+ return c .Str .LowCardinality ()
112
112
}
113
113
114
114
// Array is helper that creates Array(JSON).
115
115
func (c * ColJSONStr ) Array () * ColArr [string ] {
116
- return c .str .Array ()
116
+ return c .Str .Array ()
117
117
}
118
118
119
119
// Nullable is helper that creates Nullable(JSON).
120
120
func (c * ColJSONStr ) Nullable () * ColNullable [string ] {
121
- return c .str .Nullable ()
121
+ return c .Str .Nullable ()
122
122
}
123
123
124
124
// ColJSONBytes is ColJSONStr wrapper to be ColumnOf for []byte.
0 commit comments