Skip to main content

SOQL Lib Playground

Paste your traditional SOQL query and see how it translates to SOQL Lib syntax. Perfect for learning and migrating existing queries.

Examples:

Traditional SOQL

SOQL Lib Syntax

// Your translated SOQL Lib code will appear here...

💡 How it works

  • Field Selection: Converts SELECT fields to .with() methods - API docs
  • Relationships: Transforms parent.field syntax to .with('Parent', fields) - API docs
  • WHERE Conditions: Parses conditions into SOQL.Filter and SOQL.FilterGroup - Filter API | FilterGroup API
  • Filter Operations: Maps SOQL operators to methods like .equal(), .contains(), .greaterThan() - API docs
  • Logic Operators: AND conditions are grouped, OR uses .anyConditionMatching() - API docs
  • Aggregate Functions: Maps to specific methods like .count(), .sum() - API docs
  • ORDER BY: Translates to .orderBy() with direction methods - API docs
  • LIMIT/OFFSET: Converts to .setLimit() and .offset() - LIMIT | OFFSET

Note: This is a learning tool that covers most common SOQL patterns. Complex nested conditions may need manual refinement. Check the full documentation for advanced features.