Skip to content

Commit 860387e

Browse files
committed
fix: use null if return=minimal
1 parent f8edc51 commit 860387e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/PostgrestQueryBuilder.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export default class PostgrestQueryBuilder<
121121
}: {
122122
count?: 'exact' | 'planned' | 'estimated'
123123
} = {}
124-
): PostgrestFilterBuilder<Schema, Relation['Row'], undefined> {
124+
): PostgrestFilterBuilder<Schema, Relation['Row'], null> {
125125
const method = 'POST'
126126

127127
const prefersHeaders = []
@@ -150,7 +150,7 @@ export default class PostgrestQueryBuilder<
150150
body,
151151
fetch: this.fetch,
152152
allowEmpty: false,
153-
} as unknown as PostgrestBuilder<undefined>)
153+
} as unknown as PostgrestBuilder<null>)
154154
}
155155

156156
/**
@@ -197,7 +197,7 @@ export default class PostgrestQueryBuilder<
197197
ignoreDuplicates?: boolean
198198
count?: 'exact' | 'planned' | 'estimated'
199199
} = {}
200-
): PostgrestFilterBuilder<Schema, Relation['Row'], undefined> {
200+
): PostgrestFilterBuilder<Schema, Relation['Row'], null> {
201201
const method = 'POST'
202202

203203
const prefersHeaders = [`resolution=${ignoreDuplicates ? 'ignore' : 'merge'}-duplicates`]
@@ -220,7 +220,7 @@ export default class PostgrestQueryBuilder<
220220
body,
221221
fetch: this.fetch,
222222
allowEmpty: false,
223-
} as unknown as PostgrestBuilder<undefined>)
223+
} as unknown as PostgrestBuilder<null>)
224224
}
225225

226226
/**
@@ -251,7 +251,7 @@ export default class PostgrestQueryBuilder<
251251
}: {
252252
count?: 'exact' | 'planned' | 'estimated'
253253
} = {}
254-
): PostgrestFilterBuilder<Schema, Relation['Row'], undefined> {
254+
): PostgrestFilterBuilder<Schema, Relation['Row'], null> {
255255
const method = 'PATCH'
256256
const prefersHeaders = []
257257
const body = values
@@ -271,7 +271,7 @@ export default class PostgrestQueryBuilder<
271271
body,
272272
fetch: this.fetch,
273273
allowEmpty: false,
274-
} as unknown as PostgrestBuilder<undefined>)
274+
} as unknown as PostgrestBuilder<null>)
275275
}
276276

277277
/**
@@ -297,7 +297,7 @@ export default class PostgrestQueryBuilder<
297297
count,
298298
}: {
299299
count?: 'exact' | 'planned' | 'estimated'
300-
} = {}): PostgrestFilterBuilder<Schema, Relation['Row'], undefined> {
300+
} = {}): PostgrestFilterBuilder<Schema, Relation['Row'], null> {
301301
const method = 'DELETE'
302302
const prefersHeaders = []
303303
if (count) {
@@ -315,6 +315,6 @@ export default class PostgrestQueryBuilder<
315315
schema: this.schema,
316316
fetch: this.fetch,
317317
allowEmpty: false,
318-
} as unknown as PostgrestBuilder<undefined>)
318+
} as unknown as PostgrestBuilder<null>)
319319
}
320320
}

0 commit comments

Comments
 (0)