DB
The forvendi.DB utility class provides standard entry points for database DML operations. It allows developers to dynamically switch between WITH SHARING, WITHOUT SHARING, and INHERITED SHARING execution contexts while simplifying error handling.
Constants
SECURED: Configures DML operations to execute strictly within the “WITH SHARING” security context.UNSECURED: Configures DML operations to execute within the “WITHOUT SHARING” system context.INHERITED: Configures DML operations to execute within the “INHERITED SHARING” context of the caller.
getDML(String sharingType)
Instantiates a DML execution context based on the specified sharing enforcement mode.
Signature:
public static forvendi.DB.DML getDML(String sharingType)Parameters:
sharingType: Desired execution context ('With Sharing','Without Sharing', or'Inherited Sharing').
Return Value: forvendi.DB.DML – Instance configured for the target sharing mode.
Related Classes
- DBResult: Aggregated result container for bulk DML operations.
- DBResultItem: Individual record processing status and error container.
- DML: Fluent interface for record insertion, update, upsert, and deletion methods.