@@ -66,8 +66,8 @@ function Backend({
66
66
let index = 9
67
67
while ( x [ index ++ ] !== 0 ) ;
68
68
onnotify (
69
- x . utf8Slice ( 9 , index - 1 ) ,
70
- x . utf8Slice ( index , x . length - 1 )
69
+ x . toString ( 'utf8' , 9 , index - 1 ) ,
70
+ x . toString ( 'utf8' , index , x . length - 1 )
71
71
)
72
72
}
73
73
@@ -77,9 +77,9 @@ function Backend({
77
77
78
78
for ( let i = x . length - 1 ; i > 0 ; i -- ) {
79
79
if ( x [ i ] === 32 && x [ i + 1 ] < 58 && backend . query . result . count === null )
80
- backend . query . result . count = + x . utf8Slice ( i + 1 , x . length - 1 )
80
+ backend . query . result . count = + x . toString ( 'utf8' , i + 1 , x . length - 1 )
81
81
if ( x [ i - 1 ] >= 65 ) {
82
- backend . query . result . command = x . utf8Slice ( 5 , i )
82
+ backend . query . result . command = x . toString ( 'utf8' , 5 , i )
83
83
break
84
84
}
85
85
}
@@ -103,10 +103,10 @@ function Backend({
103
103
value = length === - 1
104
104
? null
105
105
: column . p === undefined
106
- ? x . utf8Slice ( index , index += length )
106
+ ? x . toString ( 'utf8' , index , index += length )
107
107
: column . p . array === true
108
- ? column . p ( x . utf8Slice ( index + 1 , index += length ) )
109
- : column . p ( x . utf8Slice ( index , index += length ) )
108
+ ? column . p ( x . toString ( 'utf8' , index + 1 , index += length ) )
109
+ : column . p ( x . toString ( 'utf8' , index , index += length ) )
110
110
111
111
row [ column . n ] = transform . value ? transform . value ( value ) : value
112
112
}
@@ -157,7 +157,7 @@ function Backend({
157
157
}
158
158
159
159
function ParameterStatus ( x ) {
160
- const [ k , v ] = x . utf8Slice ( 5 , x . length - 1 ) . split ( N )
160
+ const [ k , v ] = x . toString ( 'utf8' , 5 , x . length - 1 ) . split ( N )
161
161
onparameter ( k , v )
162
162
}
163
163
@@ -195,8 +195,8 @@ function Backend({
195
195
while ( x [ index ++ ] !== 0 ) ;
196
196
backend . query . statement . columns [ i ] = {
197
197
n : transform . column
198
- ? transform . column ( x . utf8Slice ( start , index - 1 ) )
199
- : x . utf8Slice ( start , index - 1 ) ,
198
+ ? transform . column ( x . toString ( 'utf8' , start , index - 1 ) )
199
+ : x . toString ( 'utf8' , start , index - 1 ) ,
200
200
p : parsers [ x . readInt32BE ( index + 6 ) ]
201
201
}
202
202
index += 18
@@ -230,7 +230,7 @@ function parseError(x) {
230
230
let start = 5
231
231
for ( let i = 5 ; i < x . length - 1 ; i ++ ) {
232
232
if ( x [ i ] === 0 ) {
233
- error [ errorFields [ x [ start ] ] ] = x . utf8Slice ( start + 1 , i )
233
+ error [ errorFields [ x [ start ] ] ] = x . toString ( 'utf8' , start + 1 , i )
234
234
start = i + 1
235
235
}
236
236
}
0 commit comments