This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix identity-provider type issues & patch
@feathersjs/knex
(#10971)
* Add `guest` & `admin` identity provider types * Add `didWallet` to identity-provider type enum Fix type errors * Remove `didWallet` from identityProvider types Comment out wallet related functions * remove unused type * Patch @feathersjs/knex to fix count * remove `admin` provider type
- Loading branch information
1 parent
eaad27e
commit 939d834
Showing
8 changed files
with
133 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
diff --git a/node_modules/@feathersjs/knex/lib/adapter.js b/node_modules/@feathersjs/knex/lib/adapter.js | ||
index e6851d4..afacfd8 100644 | ||
--- a/node_modules/@feathersjs/knex/lib/adapter.js | ||
+++ b/node_modules/@feathersjs/knex/lib/adapter.js | ||
@@ -125,9 +125,14 @@ class KnexAdapter extends adapter_commons_1.AdapterBase { | ||
} | ||
async _find(params = {}) { | ||
const { filters, paginate } = this.filterQuery(params); | ||
- const { name, id } = this.getOptions(params); | ||
+ const { Model, name, id } = this.getOptions(params); | ||
const builder = params.knex ? params.knex.clone() : this.createQuery(params); | ||
- const countBuilder = builder.clone().clearSelect().clearOrder().count(`${name}.${id} as total`); | ||
+ const countBuilder = Model.count(`* as total`) | ||
+ .with( | ||
+ 'subquery', | ||
+ builder.clone().clearOrder() | ||
+ ) | ||
+ .from('subquery'); | ||
// Handle $limit | ||
if (filters.$limit) { | ||
builder.limit(filters.$limit); |