https://github.com/beyond-the-cloud-dev/sosl-lib
The SOSL Lib provides functional constructs for SOSL queries in Apex.
https://github.com/beyond-the-cloud-dev/sosl-lib
Last synced: 3 months ago
JSON representation
The SOSL Lib provides functional constructs for SOSL queries in Apex.
- Host: GitHub
- URL: https://github.com/beyond-the-cloud-dev/sosl-lib
- Owner: beyond-the-cloud-dev
- License: mit
- Created: 2023-08-02T19:37:29.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-19T21:25:51.000Z (over 2 years ago)
- Last Synced: 2025-12-28T18:53:36.726Z (6 months ago)
- Language: Apex
- Homepage: https://sosl.beyondthecloud.dev/
- Size: 428 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SOSL Lib

[](https://codecov.io/gh/beyond-the-cloud-dev/sosl-lib)
The SOSL Lib provides functional constructs for SOSL queries in Apex.
For more details, please refer to the [documentation](https://sosl.beyondthecloud.dev/).
## Examples
```apex
// FIND 'Company' RETURNING Account
List> searchResults = SOSL.find('Company')
.returning(SOSL.Returning(Account.SObject))
.toSearchList();
```
```apex
// FIND 'Company' RETURNING Account(Id, Name ORDER BY Name)
List> searchResults = SOSL.find('Company')
.returning(
SOSL.Returning(Account.SObject)
.with(Account.Id, Account.Name)
.orderBy(Account.Name)
)
.toSearchList();
```
## Deploy to Salesforce
## Documentation
[SOSL Lib documentation](https://sosl.beyondthecloud.dev/)
## Features
Read about the features in the [documentation](https://sosl.beyondthecloud.dev/docs/basic-features).
1. **Dynamic SOSL**
2. **Control FLS**
- 2.1 **User Mode**
- 2.2 **System Mode**
- 2.3 **stripInaccessible**
3. **Control Sharings Mode**
- 3.1 **with sharing**
- 3.2 **without sharing**
- 3.3 **inherited sharing**
4. **Mocking**
- 4.1 **Mock list of records**
5. **Dynamic conditions**
----
## License notes
- For proper license management each repository should contain LICENSE file similar to this one.
- Each original class should contain copyright mark: Copyright (c) 2023 BeyondTheCloud.Dev