Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mbalex99/mongopredicate
NSPredicate to MongoDB Query Dictionary credits to @tjboneman
https://github.com/mbalex99/mongopredicate
Last synced: 7 days ago
JSON representation
NSPredicate to MongoDB Query Dictionary credits to @tjboneman
- Host: GitHub
- URL: https://github.com/mbalex99/mongopredicate
- Owner: mbalex99
- License: apache-2.0
- Created: 2017-01-26T08:51:48.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-26T22:03:49.000Z (over 7 years ago)
- Last Synced: 2024-10-14T03:33:15.254Z (about 1 month ago)
- Language: Objective-C
- Size: 22.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## Turn your NSPredicates into MongoDB Queries
Originally written by @tjboneman. Thank him!## Getting Started
Easily import this manually with Cocoapods.`pod 'MongoPredicate`
This library is written in Objective-C but works well with swift
## Usage
### Objective-C
```objective-c
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"firstname CONTAINS[cd] %@", @"max"];;
NSError *error = nil;
NSDictionary *dict = [predicate queryDictOrError:&error];
```