OhmocAsync : Ohmoc
OhmocAsync
provides a convenience wrapper around Ohmoc
to perform the potentially slow operations in a separate thread and then perform a callback into the main thread.
Internally it uses an NSOperationQueue
with maxConcurrentOperationCount
of 1. Any synchronously use of OhmocAsync
will throw an exception.
Notice that all the search operations are not available in this class since those are lazy operations, and thus not performed until needed. See OOCCollection
.-each:
.
- (void) with:(NSString*)property is:(id)value model:(Class)modelClass callback:(void(^)(id))callback
Async version of with:is:model:. The model is provided as an argument to the callback.
- (void) get:(NSString*)id model:(Class)modelClass callback:(void(^)(id))callback
Async version of get:model:. The model is provided as an argument to the callback.
- (void) createModel:(Class)modelClass callback:(void(^)(id))callback
Async version of createModel:. The model is provided as an argument to the callback.
- (void) create:(NSDictionary*)properties model:(Class)modelClass callback:(void(^)(id))callback
Async version of create:model:. The model is provided as an argument to the callback.
Updated less than a minute ago