Skip to content

v2.0.0

Compare
Choose a tag to compare
@pgajek2 pgajek2 released this 05 Jun 10:21
· 96 commits to main since this release

05-June-2023

Changes

Code Against Interfaces, Not Implementations

Static variables return Interface instead of concrete class.

// Filter is interface
// QFilter is a class
public static Filter Filter {
   get {
      return new QFilter(binder);
   }
}

String condition

String condition and FilterGroup/Filter are combined with AND.

SOQL.of(Account.SObjectType)
    .whereAre('EmployeeNumber > 5')
    .whereAre(SOQL.Filter.with(Account.Name).equal(accountName).removeWhenNull())
    .toList();

Skip Binding for DataTime

System.QueryException: Invalid bind expression type of String for column of type Datetime

Data Literals are supported.

SOQL.of(Account.SObjectType)
    .whereAre(SOQL.Filter.with(Account.CreatedDate).equal('YEASTERDAY'))
    .toList();

Code Refactoring

Code is simpler, a lot of lines was removed.