apex-soql-dml
Installation
SKILL.md
SOQL / DML
Decision tree
- Need one known object and predictable fields -> static SOQL.
- Need multiple optional filters/fields -> dynamic SOQL, but bind values and validate structural inputs.
- Need partial success ->
Database.*methods withallOrNone=falsewhere appropriate. - Need atomic behavior -> normal DML or
allOrNone=truedeliberately. - Need cross-object data -> prefer relationship queries where they reduce query count and preserve clarity.
- Need very large data volume -> reconsider synchronous Apex; evaluate Batch Apex, Bulk API, Async SOQL, or another platform-native option.