@@ -103,7 +103,7 @@ export default function Subscribe(postgres, options) {
103
103
104
104
function data ( x ) {
105
105
if ( x [ 0 ] === 0x77 )
106
- parse ( x . slice ( 25 ) , state , sql . options . parsers , handle )
106
+ parse ( x . subarray ( 25 ) , state , sql . options . parsers , handle )
107
107
else if ( x [ 0 ] === 0x6b && x [ 17 ] )
108
108
pong ( )
109
109
}
@@ -143,8 +143,8 @@ function parse(x, state, parsers, handle) {
143
143
R : x => { // Relation
144
144
let i = 1
145
145
const r = state [ x . readUInt32BE ( i ) ] = {
146
- schema : String ( x . slice ( i += 4 , i = x . indexOf ( 0 , i ) ) ) || 'pg_catalog' ,
147
- table : String ( x . slice ( i + 1 , i = x . indexOf ( 0 , i + 1 ) ) ) ,
146
+ schema : String ( x . subarray ( i += 4 , i = x . indexOf ( 0 , i ) ) ) || 'pg_catalog' ,
147
+ table : String ( x . subarray ( i + 1 , i = x . indexOf ( 0 , i + 1 ) ) ) ,
148
148
columns : Array ( x . readUInt16BE ( i += 2 ) ) ,
149
149
keys : [ ]
150
150
}
@@ -156,7 +156,7 @@ function parse(x, state, parsers, handle) {
156
156
while ( i < x . length ) {
157
157
column = r . columns [ columnIndex ++ ] = {
158
158
key : x [ i ++ ] ,
159
- name : String ( x . slice ( i , i = x . indexOf ( 0 , i ) ) ) ,
159
+ name : String ( x . subarray ( i , i = x . indexOf ( 0 , i ) ) ) ,
160
160
type : x . readUInt32BE ( i += 1 ) ,
161
161
parser : parsers [ x . readUInt32BE ( i ) ] ,
162
162
atttypmod : x . readUInt32BE ( i += 4 )
@@ -170,7 +170,7 @@ function parse(x, state, parsers, handle) {
170
170
O : ( ) => { /* noop */ } , // Origin
171
171
B : x => { // Begin
172
172
state . date = Time ( x . readBigInt64BE ( 9 ) )
173
- state . lsn = x . slice ( 1 , 9 )
173
+ state . lsn = x . subarray ( 1 , 9 )
174
174
} ,
175
175
I : x => { // Insert
176
176
let i = 1
0 commit comments