You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class SoqlBuilder,Executor,Converter,Binder coreComponent
115
-
class PlainFields,RelationshipFields,AggregateFunctionsFields,FunctionsFields,SoqlFilterGroup,SoqlFilter,SoqlJoinQuery,SoqlHavingFilterGroup,SoqlHavingFilter,SoqlSubQuery,SoqlOrderBy,SoqlFrom,SoqlGroupBy,SoqlLimit,SoqlOffset,SoqlFor,SoqlScope,SoqlDataCategoryFilter,InheritedSharing,WithSharing,WithoutSharing,SObjectMock,CountMock,AggregateResultProxys,SoqlAggregateResultProxy,RandomIdGenerator implementation
Copy file name to clipboardExpand all lines: website/docs/soql/build-selector.md
+33-31Lines changed: 33 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,32 @@
1
1
---
2
-
slug: '/building-selector'
3
2
sidebar_position: 17
4
3
---
5
4
6
5
# Building Your Selector
7
6
7
+
:::info[New Selectors Approach!]
8
+
9
+
The concept of selectors in SOQL Lib is different from FFLib Selectors!
10
+
11
+
SOQL Lib Selectors:
12
+
- Not all queries are kept in selectors. Only very generic methods are maintained in the selector class like byParentId, bySource, byRecordType, byId. Each method returns an instance of that selector. This approach allows you to chain methods from the selector class.
13
+
- The selector constructor keeps default configurations, such as default fields, sharing mode, and field-level security.
14
+
:::
15
+
8
16
Check examples in the [repository](https://github.com/beyond-the-cloud-dev/soql-lib/tree/main/force-app/main/default/classes/examples/standard-selectors).
9
17
18
+
SOQL Lib is agile, so you can adjust the solution according to your needs.
10
19
11
-
SOQL-Lib is agile, so you can adjust the solution according to your needs.
12
-
We don't force one approach over another; you can choose your own. Here are our suggestions:
20
+
**We don't force one approach over another; you can choose your own**.
- The selector constructor keeps default configurations, such as default fields, sharing mode, and field-level security.
18
26
- Only very generic methods are maintained in the selector class, and each method returns an instance of that selector. This approach allows you to chain methods from the selector class.
19
27
- Additional fields, more complex conditions, ordering, limits, and other SOQL clauses can be built where they are needed (for example, in a controller method).
20
28
21
-
```apex
29
+
```apex title="SOQL_Account.cls"
22
30
public inherited sharing class SOQL_Account extends SOQL implements SOQL.Selector {
23
31
public static SOQL_Account query() {
24
32
return new SOQL_Account();
@@ -33,20 +41,18 @@ public inherited sharing class SOQL_Account extends SOQL implements SOQL.Selecto
0 commit comments