[PR #245] [MERGED] Feat: Added support to pre-build "like" operator, and added search endpoint for admin purposes. #3184

Closed
opened 2026-03-13 10:42:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/245
Author: @Chris-Kode
Created: 10/19/2024
Status: Merged
Merged: 10/20/2024
Merged by: @Bekacru

Base: mainHead: add-search-functionality


📝 Commits (7)

  • 5780eb3 feat: add contains, starts_with, ends_with support to query operators in all adapters
  • 52a7a26 feat(admin): implement searchUsers functionality with filtering and sorting capabilities
  • 6061efa fix: clean up code by removing unnecessary whitespace in various adapter files
  • 569f6da feat(auth): update snapshot to include new searchUsers function in init test
  • e62082d Feat: delete search-user endpoint, and added the feature to listUsers.
  • 3624af1 fix: remove unnecessary whitespace and tidy up admin search query validation in internal adapter and admin plugin files
  • 14925f4 feat(docs): enhance admin plugin documentation with detailed search query parameters for user listing

📊 Changes

8 files changed (+141 additions, -6 deletions)

View changed files

📝 docs/content/docs/plugins/admin.mdx (+9 -1)
📝 packages/better-auth/src/adapters/drizzle-adapter/index.ts (+15 -1)
📝 packages/better-auth/src/adapters/kysely-adapter/index.ts (+13 -0)
📝 packages/better-auth/src/adapters/mongodb-adapter/index.ts (+11 -0)
📝 packages/better-auth/src/adapters/prisma-adapter/index.ts (+15 -2)
📝 packages/better-auth/src/adapters/test.ts (+42 -0)
📝 packages/better-auth/src/plugins/admin/index.ts (+25 -1)
📝 packages/better-auth/src/types/adapter.ts (+11 -1)

📄 Description

Some features to make more searchable our users:

  • Added some pre-build "like" features that its gonna help to make more complex queries and make more searchable.
  • Added a endpoint /search-users to admin purpose, to be more complete about admin actions like, search a user by his name, etc.
  • Added some tests, for the adapters, testing each new operator.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/245 **Author:** [@Chris-Kode](https://github.com/Chris-Kode) **Created:** 10/19/2024 **Status:** ✅ Merged **Merged:** 10/20/2024 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `add-search-functionality` --- ### 📝 Commits (7) - [`5780eb3`](https://github.com/better-auth/better-auth/commit/5780eb3a0cdcf17f598eeb11868a3e99367e2140) feat: add contains, starts_with, ends_with support to query operators in all adapters - [`52a7a26`](https://github.com/better-auth/better-auth/commit/52a7a266b76d3359db6acf95ec8f7f4a453d08f7) feat(admin): implement searchUsers functionality with filtering and sorting capabilities - [`6061efa`](https://github.com/better-auth/better-auth/commit/6061efa54852a32163fe160376294b85ed076e2e) fix: clean up code by removing unnecessary whitespace in various adapter files - [`569f6da`](https://github.com/better-auth/better-auth/commit/569f6da6650267bbd55671eb2e1d0539e82f9f7b) feat(auth): update snapshot to include new searchUsers function in init test - [`e62082d`](https://github.com/better-auth/better-auth/commit/e62082d4a77cc99a6706572940f748ef3914f84d) Feat: delete search-user endpoint, and added the feature to listUsers. - [`3624af1`](https://github.com/better-auth/better-auth/commit/3624af165549ff78b4d529d1353689d665a49ed3) fix: remove unnecessary whitespace and tidy up admin search query validation in internal adapter and admin plugin files - [`14925f4`](https://github.com/better-auth/better-auth/commit/14925f4606622ba9b37821ea85900d291e69839a) feat(docs): enhance admin plugin documentation with detailed search query parameters for user listing ### 📊 Changes **8 files changed** (+141 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/admin.mdx` (+9 -1) 📝 `packages/better-auth/src/adapters/drizzle-adapter/index.ts` (+15 -1) 📝 `packages/better-auth/src/adapters/kysely-adapter/index.ts` (+13 -0) 📝 `packages/better-auth/src/adapters/mongodb-adapter/index.ts` (+11 -0) 📝 `packages/better-auth/src/adapters/prisma-adapter/index.ts` (+15 -2) 📝 `packages/better-auth/src/adapters/test.ts` (+42 -0) 📝 `packages/better-auth/src/plugins/admin/index.ts` (+25 -1) 📝 `packages/better-auth/src/types/adapter.ts` (+11 -1) </details> ### 📄 Description ### Some features to make more searchable our users: - Added some pre-build "like" features that its gonna help to make more complex queries and make more searchable. - Added a endpoint /search-users to admin purpose, to be more complete about admin actions like, search a user by his name, etc. - Added some tests, for the adapters, testing each new operator. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 10:42:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#3184