From bcfa199d222abdff6967d53619ba60eb05af8efb Mon Sep 17 00:00:00 2001 From: Piotr PG Gajek Date: Sat, 11 Oct 2025 11:36:10 +0200 Subject: [PATCH 1/2] Fix --- website/src/pages/critique.md | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/website/src/pages/critique.md b/website/src/pages/critique.md index 97f6cb3..9c633ce 100644 --- a/website/src/pages/critique.md +++ b/website/src/pages/critique.md @@ -5,7 +5,7 @@ _aka "I have to learn a new syntax"_ ### Use SOQL Evaluator -SOQL Lib has 3 different modules: [SOQL](/soql/getting-started), [SOQL Cache](/cache/getting-started), and [SOQL Evaluator](/evaluator/getting-started). SOQL Evaluator was created for developers who don't want to learn a new syntax but still want to benefit from features like mocking and result functions. You can use [this module](https://github.com/beyond-the-cloud-dev/soql-lib/tree/main/force-app/main/default/classes/main/soql-evaluator) without switching to an entirely new syntax. +SOQL Lib has 3 different modules: [SOQL](../../docs/soql/getting-started.md/), [SOQL Cache](../../docs/cache/getting-started.md), and [SOQL Evaluator](../../docs/evaluator/getting-started.md). SOQL Evaluator was created for developers who don't want to learn a new syntax but still want to benefit from features like mocking and result functions. You can use [this module](https://github.com/beyond-the-cloud-dev/soql-lib/tree/main/force-app/main/default/classes/main/soql-evaluator) without switching to an entirely new syntax. ```apex Set accountIds = SOQLEvaluator.of([SELECT Id FROM Account]).toIds(); @@ -16,7 +16,7 @@ List accountNames = SOQLEvaluator.of([SELECT Id, Name FROM Account]).toV #### Documentation -SOQL Lib provides comprehensive online documentation with the [playground](./playground) and numerous [examples](/soql/examples/select). You can also use the search feature in the top-right corner to find what you're looking for. The Fluent API was designed to stay as close to traditional SOQL syntax as possible. However, due to Apex's `Identifier name is reserved` restriction, some keywords like `select`, `where`, and `limit` couldn't be used. +SOQL Lib provides comprehensive online documentation with the [playground](./playground.js) and numerous [examples](../../docs/soql/examples/select.md). You can also use the search feature in the top-right corner to find what you're looking for. The Fluent API was designed to stay as close to traditional SOQL syntax as possible. However, due to Apex's `Identifier name is reserved` restriction, some keywords like `select`, `where`, and `limit` couldn't be used. #### Interfaces @@ -32,7 +32,7 @@ A simple prompt in your IDE integrated with AI can be very helpful: "Based on SO #### Result Functions -SOQL Lib provides numerous [result functions](/soql/examples/result) that make your code easier to read and understand. Most operations you typically perform on SOQL results are available as methods in SOQL Lib. Instead of repeating the same transformations throughout your codebase, simply use result methods. +SOQL Lib provides numerous [result functions](../../docs/soql/examples/result.md) that make your code easier to read and understand. Most operations you typically perform on SOQL results are available as methods in SOQL Lib. Instead of repeating the same transformations throughout your codebase, simply use result methods. **Apex** @@ -95,11 +95,11 @@ SOQL Lib builds a query string and passes it to the `Database.queryWithBinds` me Not much. While dynamic code can be CPU-intensive, we've run extensive performance tests (full results coming soon). Here's a preview: -### Result Functions - Building a complex query dynamically with SOQL Lib consumes less than **2ms**, and around **1ms** for simple queries. Even if you execute 100 complex queries in one transaction (101 SOQL queries per synchronous transaction), in the worst-case scenario, SOQL Lib uses only ~200ms out of the 10,000ms CPU limit available. +### Result Functions + Additionally, SOQL Lib can be faster than your own implementation. We perform internal optimizations for certain result functions. For instance: @@ -119,13 +119,12 @@ Set accountNames = SOQL.of(Account.SObjectType).toValuesOf(Account.Name) ### Mocking -How long does it take to run Apex unit tests with all test data inserted? Typically seconds, or even minutes. - -How long does it take to run Apex unit tests when query results are mocked and there's no need to create test data? Milliseconds to seconds—definitely not minutes. +How long it takes to run Apex Unit Tests with all test data inserted? I think seconds, or even minutes. +How long it takes to run Apex Unit Tests when query results are mocked and there is no need to create a test data? miliseconds to seconds, but for sure not minutes. -I don't need to emphasize the benefits of writing fast, reliable unit tests. Instead of spending time figuring out how to set fields so validation rules pass, or determining what setup is needed to avoid trigger errors, mocking allows you to return query results without any database operations. +I wouldn't mentioned the benefits of writing fast, reliable unit tests. Instead of spending time on trying to figure out how to set fields so validation rules will pass, what to set up to pass the trigger without error etc. Mocking allows you to get result from the query without all operations on the database. -With mocking, you not only save hours on test data creation but also reduce test execution time by minutes. If someone argues that SOQL Lib consumes CPU time, they should consider that they cannot afford NOT to mock query results. +Here we can not only save hours of figuring out test data creation, but also minutes during tests execution. So if someone says that SOQL Lib take CPU time and that bothers those people. I believe they cannot allow themselfs to ## It's Just a Query Builder @@ -143,6 +142,6 @@ The query builder is just one component of SOQL Lib. SOQL Lib itself is a lightw - Use the query builder to avoid string concatenation **For a comprehensive list of benefits, check:** -- [SOQL Basic Features](/soql/basic-features) -- [SOQL Cache Basic Features](/cache/basic-features) +- [SOQL Basic Features](../../docs/soql/basic-features.md) +- [SOQL Cache Basic Features](../../docs/cache/basic-features.md) From 7c87294303c07e1e62489f7f324648e9c2a696a6 Mon Sep 17 00:00:00 2001 From: Piotr PG Gajek Date: Sat, 11 Oct 2025 11:39:48 +0200 Subject: [PATCH 2/2] Fix --- website/src/pages/critique.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/website/src/pages/critique.md b/website/src/pages/critique.md index 9c633ce..c68db3a 100644 --- a/website/src/pages/critique.md +++ b/website/src/pages/critique.md @@ -5,7 +5,7 @@ _aka "I have to learn a new syntax"_ ### Use SOQL Evaluator -SOQL Lib has 3 different modules: [SOQL](../../docs/soql/getting-started.md/), [SOQL Cache](../../docs/cache/getting-started.md), and [SOQL Evaluator](../../docs/evaluator/getting-started.md). SOQL Evaluator was created for developers who don't want to learn a new syntax but still want to benefit from features like mocking and result functions. You can use [this module](https://github.com/beyond-the-cloud-dev/soql-lib/tree/main/force-app/main/default/classes/main/soql-evaluator) without switching to an entirely new syntax. +SOQL Lib has 3 different modules: [SOQL](/soql/getting-started), [SOQL Cache](/cache/getting-started), and [SOQL Evaluator](/evaluator/getting-started). SOQL Evaluator was created for developers who don't want to learn a new syntax but still want to benefit from features like mocking and result functions. You can use [this module](https://github.com/beyond-the-cloud-dev/soql-lib/tree/main/force-app/main/default/classes/main/soql-evaluator) without switching to an entirely new syntax. ```apex Set accountIds = SOQLEvaluator.of([SELECT Id FROM Account]).toIds(); @@ -16,7 +16,7 @@ List accountNames = SOQLEvaluator.of([SELECT Id, Name FROM Account]).toV #### Documentation -SOQL Lib provides comprehensive online documentation with the [playground](./playground.js) and numerous [examples](../../docs/soql/examples/select.md). You can also use the search feature in the top-right corner to find what you're looking for. The Fluent API was designed to stay as close to traditional SOQL syntax as possible. However, due to Apex's `Identifier name is reserved` restriction, some keywords like `select`, `where`, and `limit` couldn't be used. +SOQL Lib provides comprehensive online documentation with the [playground](/playground) and numerous [examples](/soql/examples/select). You can also use the search feature in the top-right corner to find what you're looking for. The Fluent API was designed to stay as close to traditional SOQL syntax as possible. However, due to Apex's `Identifier name is reserved` restriction, some keywords like `select`, `where`, and `limit` couldn't be used. #### Interfaces @@ -32,7 +32,7 @@ A simple prompt in your IDE integrated with AI can be very helpful: "Based on SO #### Result Functions -SOQL Lib provides numerous [result functions](../../docs/soql/examples/result.md) that make your code easier to read and understand. Most operations you typically perform on SOQL results are available as methods in SOQL Lib. Instead of repeating the same transformations throughout your codebase, simply use result methods. +SOQL Lib provides numerous [result functions](/soql/examples/result) that make your code easier to read and understand. Most operations you typically perform on SOQL results are available as methods in SOQL Lib. Instead of repeating the same transformations throughout your codebase, simply use result methods. **Apex** @@ -142,6 +142,6 @@ The query builder is just one component of SOQL Lib. SOQL Lib itself is a lightw - Use the query builder to avoid string concatenation **For a comprehensive list of benefits, check:** -- [SOQL Basic Features](../../docs/soql/basic-features.md) -- [SOQL Cache Basic Features](../../docs/cache/basic-features.md) +- [SOQL Basic Features](/soql/basic-features) +- [SOQL Cache Basic Features](/cache/basic-features)