michaelarmstrong/SuperRecord — pull request #6 by SoullessPG (2014-12-04 16:29:03+00:00)
Title: Add Logical & and | operator to NSPredicate

Here some example

Defining:
```swift
let firstLevelPredicate = NSPredicate(format: "level > 1")!
let secondLevelPredicate = NSPredicate (format: "level =< 36")!

firstLevelPredicate & secondLevelPredicate // is equal to "level > 1 AND level =< 36"
firstLevelPredicate | secondLevelPredicate // is equal to "level > 1 OR level =< 36"
```

It is also possible to combine more than 1 NSPredicate and mixing operator

```swift
let firstLevelPredicate = NSPredicate(format: "level > 1")!
let secondLevelPredicate = NSPredicate (format: "level =< 36")!
let namePredicate = NSPredicate (format: "name == Charmender")!

resultPredicate = firstLevelPredicate & namePredicate | [secondLevelPredicate] // is equal to "level > 1 AND name == Charmender OR level =< 36"
```
It might be interesting adding more complex predicates as: "(level > 1 AND name == Charmender) OR (level =< 36)" and so on.