Skip to content

Commit ce3bf40

Browse files
committed
documentation
1 parent 013ddec commit ce3bf40

File tree

3 files changed

+19
-27
lines changed

3 files changed

+19
-27
lines changed

website/docs/docs/getting-started.md

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
slug: '/getting-started'
32
sidebar_position: 10
43
---
54

@@ -8,13 +7,21 @@ sidebar_position: 10
87
![Deploy to Scratch Org and run tests](https://github.com/beyond-the-cloud-dev/soql-lib/actions/workflows/ci.yml/badge.svg)
98
[![codecov](https://codecov.io/gh/beyond-the-cloud-dev/soql-lib/branch/main/graph/badge.svg)](https://codecov.io/gh/beyond-the-cloud-dev/soql-lib)
109

11-
The SOQL Lib provides functional constructs for SOQL queries in Apex. The SOQL Lib consists of 3 main modules:
10+
The SOQL Lib provides functional constructs for SOQL queries in Apex.
1211

13-
- [SOQL (main)](./soql/getting-started) - SOQL Builder and Selectors
14-
- [Cache (optional)](./cache/getting-started) - Cached SOQL Builder and Cached Selectors
15-
- [Evaluator (optional)](./evaluator/getting-started) - SOQL Evaluator
12+
:::danger[SOQL Lib Modules]
1613

17-
## Examples
14+
- [SOQL](./soql/getting-started) - the main module of the lib provides functional constructs for queries.
15+
- [Cache](./cache/getting-started) _(optional)_ - Use when you want to cache query results.
16+
- [Evaluator](./evaluator/getting-started) _(optional)_ - Use when you don't want to learn the lib.
17+
:::
18+
19+
**What Next?**
20+
21+
- Continue with the [Overview](overview.md) to understand the idea behind the SOQL Lib. 🚀
22+
- [Install](installation.md) the SOQL Lib in your org.
23+
24+
## Quick Start
1825

1926
**Standard SOQL**
2027

@@ -127,26 +134,13 @@ public with sharing class ExampleController {
127134
}
128135
```
129136

130-
## Benefits
131-
132-
Check the [Basic Features](./basic-features.md) section for more details.
133-
134-
1. **Additional level of abstraction** - The selector layer is an additional level of abstraction that gives you the possibility to control the execution of SOQL.
135-
2. **Mocking** - Selector classes give a possibility to mock return values in unit tests.
136-
- Mock external objects (__x) - External objects cannot be inserted in unit tests. You need to mock them.
137-
- Mock custom metadata - Custom metadata cannot be inserted in unit tests unless the developer uses the Metadata API. Mock can be a solution.
138-
3. **Control field-level security** - The best practice is to execute SOQLs `WITH USER_MODE` to enforce field-level security and object permissions of the running user. The selector layer can apply `WITH USER_MODE` by default to all of the queries, so the developer does not need to care about it. Developers can also add `WITH SYSTEM_MODE` to all SOQLs from a specific selector.
139-
4. **Control sharing rules** - The selector allows execution of different methods in the same class in different sharing modes.
140-
5. **Avoid duplicates** - Generic SOQLs like `getById` and `getByRecordType` can be stored in the selector class.
141-
6. **Default configuration** - The selector class can provide default SOQL configuration like default fields, FLS settings, and sharing rules.
142-
7. **Mocking** - The selector class has built-in mocking functionality that provides the ability to dynamically return data in test execution
143-
8. **Caching** - The cached selector class allows you to cache records in Apex transactions, Session Cache, or Org Cache, which boosts your code's performance.
144-
9. **Result Functions** - Transform your results easily using result SOQL Lib functions.
145-
146137
## Resources
147138

148139
- [SOQL Lib Explanation](https://blog.beyondthecloud.dev/blog/soql-lib)
149140
- [Why do you need Apex Selector Layer?](https://blog.beyondthecloud.dev/blog/why-do-you-need-selector-layer)
141+
- [Trying out SOQL Lib - Sandbox Sessions - CloudBites TV](https://youtu.be/pVtmmJSNnRA?t=2444)
142+
- [AWAF Selector Classes](https://awaf.dev/AWAF/selector-classes.html)
143+
- [Good Day, Sir! Salesforce podcast](https://www.gooddaysirpodcast.com/309)
150144

151145
## License notes
152146

website/docusaurus.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const config = {
1010
favicon: 'img/favicon.ico',
1111
url: 'https://soql.beyondthecloud.dev/',
1212
baseUrl: '/',
13-
organizationName: 'Beyond The Cloud', // Usually your GitHub org/user name.
14-
projectName: 'soql-lib', // Usually your repo name.
13+
organizationName: 'Beyond The Cloud',
14+
projectName: 'soql-lib',
1515
onBrokenLinks: 'throw',
1616
onBrokenMarkdownLinks: 'throw',
1717
// Even if you don't use internalization, you can use this field to set useful

website/src/pages/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ export default function Home() {
1212
<div class="text-center">
1313
<Heading class="text-5xl mb-10 font-semibold tracking-tight text-balance text-gray-900 sm:text-7xl" as="h1">SOQL Lib</Heading>
1414
<div class="space-x-4">
15-
<a href="/installation" class="rounded-md bg-sky-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-xs hover:bg-sky-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-sky-600">Get Started</a>
16-
<a href="/api" class="rounded-md bg-green-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-xs hover:bg-green-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-green-600">API</a>
17-
<a href="/examples/showcase" class="rounded-md bg-sky-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-xs hover:bg-sky-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-sky-600">Examples</a>
15+
<a href="/getting-started" class="rounded-md bg-sky-600 px-4 py-3 text-sm font-semibold text-white shadow-xs hover:bg-sky-500 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-sky-600">Get Started</a>
1816
</div>
1917
</div>
2018
</div>

0 commit comments

Comments
 (0)