kysely-hydrate 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +5 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -601,12 +601,13 @@ var HydratedQueryBuilderImpl = class HydratedQueryBuilderImpl {
|
|
|
601
601
|
return this.#hydrate(rows);
|
|
602
602
|
}
|
|
603
603
|
async executeTakeFirst() {
|
|
604
|
-
const result = await this
|
|
605
|
-
return result
|
|
604
|
+
const [result] = await this.execute();
|
|
605
|
+
return result;
|
|
606
606
|
}
|
|
607
607
|
async executeTakeFirstOrThrow(errorConstructor = k.NoResultError) {
|
|
608
|
-
const result = await this
|
|
609
|
-
|
|
608
|
+
const result = await this.executeTakeFirst();
|
|
609
|
+
if (result === void 0) throw k.isNoResultErrorConstructor(errorConstructor) ? new errorConstructor(this.toOperationNode()) : errorConstructor(this.toOperationNode());
|
|
610
|
+
return result;
|
|
610
611
|
}
|
|
611
612
|
extras(extras) {
|
|
612
613
|
return new HydratedQueryBuilderImpl({
|