Latest 0.1.0
Homepage https://github.com/LordDarkula/EasyQL
License MIT
Platforms ios 8.0
Authors

Build Status
Version
License
Platform

Introduction

A quick and convenient way to create and manage local sqlite3 databases. Databases can be created with a single line of code. Data can be get and set without creating queries. Queries can also be passed in as a string.

Example

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

Requirements

  • iOS 8.0+
  • Xcode 7.3+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

CocoaPods 0.39.0+ is required to build EasyQL

To install it, simply add the following line to your Podfile:

pod "EasyQL"

Author

Aubhro, [email protected]

License

EasyQL is available under the MIT license. See the LICENSE file for more info.

Usage

First, import EasyQL

#import <EasyQL.h>

Create a table

// Table name stored in myTableName
NSString *name = @"myTableName";

// Columns named "first" and "second"
NSArray *columns = @[@"first", @"second"];

[EasyQL createDB:name :columns];

Add data to the table

NSMutableArray *data = [[NSMutableArray alloc] init];
[data insertObject:@[@"one", @"two"] atIndex:0];
[data insertObject:@[@"three", @"four"] atIndex:1];

[EasyQL setData:name :columns :data];

To get the data

NSMutableArray *data = [EasyQL getData:name];

data would have the following structure

@[ @[ @"one", @"two"],
   @[ @"three", @"four"]]

To use queries with EasyQL


// This particular query deletes everything in the query, but any query should work
NSString *query = [NSString stringWithFormat:@"DELETE FROM %@", name];
[SQL applyQuery:name :query];

Thats it for now. I will keep adding functionality as time goes on.

Latest podspec

{
    "name": "EasyQL",
    "version": "0.1.0",
    "summary": "A wrapper class for sqlite",
    "description": "A quick and convenient way to create and manage local sqlite3 databases. Databases can be created with a single line of code. Data can be get and set without creating queries. Queries can also be passed in as a string.",
    "homepage": "https://github.com/LordDarkula/EasyQL",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Aubhro": "[email protected]"
    },
    "source": {
        "git": "https://github.com/LordDarkula/EasyQL.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "EasyQL/Classes/**/*",
    "libraries": "sqlite3"
}

Pin It on Pinterest

Share This