Latest 0.1.7
Homepage https://github.com/seppo0010/objc-rlite
License BSD
Platforms ios 7.0, requires ARC
Authors

CI Status
Version
License
Platform

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

API

#import <objc-rlite/ObjCHirlite.h>

// ...

- (void) myMethod {
    NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString* documentsDirectory = [paths objectAtIndex:0];
    NSString* path = [documentsDirectory stringByAppendingPathComponent:@"mydb.rld"];

    ObjCHirlite* rlite = [[ObjCHirlite alloc] initWithPath:path];
    [rlite command:@[@"set", @"key", @"value"]];
    NSLog(@"%@", [rlite command:@[@"get", @"key"]]); // @"value"

    [rlite command:@[@"rpush", @"list", @1, @2, @3]]
    NSLog(@"%@", [rlite command:@[@"lrange", @"list", @0, @-1]]); // @[@"1", @"2", @"3"]
}

ObjCHirlite.command: receives an array of arguments that will be sent directly
to rlite, transforming every object into an instance of NSData using
ObjCHirlite.encoding (NSUTF8StringEncoding by default).

Responses will be transformed into the corresponding objective-c class.

Notice that retrieving a value that was set as a number will return a string
object, since the number was serialized as a string.

To retrieve binary data from the database set binary to true in the call to
ObjCHirlite.command:binary: and the response will be an instance (or an array
of instances) of NSData instead of NSString.

Requirements

Installation

objc-rlite is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "objc-rlite"

Author

Sebastian Waisbrot, [email protected]

License

objc-rlite is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "objc-rlite",
    "version": "0.1.7",
    "summary": "Objective-C wrapper for rlite",
    "description": "                       For more information on rlite visitn                       https://github.com/seppo0010/rliten",
    "homepage": "https://github.com/seppo0010/objc-rlite",
    "license": "BSD",
    "authors": {
        "Sebastian Waisbrot": "[email protected]"
    },
    "source": {
        "git": "https://github.com/seppo0010/objc-rlite.git",
        "tag": "0.1.7"
    },
    "social_media_url": "https://twitter.com/seppo0010",
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "public_header_files": "Pod/Classes/**/*.h"
}

Pin It on Pinterest

Share This