Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add queryWithBinds to Selector layer #476

Closed
MayTheSForceBeWithYou opened this issue Feb 5, 2024 · 2 comments
Closed

Add queryWithBinds to Selector layer #476

MayTheSForceBeWithYou opened this issue Feb 5, 2024 · 2 comments

Comments

@MayTheSForceBeWithYou
Copy link
Contributor

In Winter '24 release, Salesforce introduced the ability to make SOQL queries with bound parameters:
Dynamically Pass Bind Variables to a SOQL Query. Add this functionality to the fflib Selector layer.

Describe the solution you'd like
// TODO: A clear and concise description of what you want to happen.

Describe alternatives you've considered
// TODO: A clear and concise description of any alternative solutions or features you've considered.

Additional context
// TODO: Add any other context or screenshots about the feature request here.

@wimvelzeboer
Copy link
Contributor

It might be a way to make real unit-test (with mocking) for selector classes. Now we can't really make those tests without going to the database.

@daveespo
Copy link
Contributor

@MayTheSForceBeWithYou -- Hi Nathan -- hope all is well

Can you elaborate a bit more with a couple of example use cases? i.e. pseudocode for how you'd like a feature like this to work?

fflib_SObjectSelector does not actually "run the query" (disregarding the two special case selectSObjectsById and queryLocatorById default 'finder' methods) -- it's up to the author of the Selector class to do Database.query .. and that same author could use Database.queryWithBinds today without any further enhancements to fflib_SObjectSelector

@apex-enterprise-patterns apex-enterprise-patterns locked and limited conversation to collaborators Feb 22, 2024
@daveespo daveespo converted this issue into discussion #481 Feb 22, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants