Skip to content

Latest commit

 

History

History
51 lines (30 loc) · 2.2 KB

README.markdown

File metadata and controls

51 lines (30 loc) · 2.2 KB

The SCSQLite is a wrapper of SQLite in Objective-c. (http://sqlite.org/)

Getting Started

Just drag the two classes into your project. Also you need to import SQLite3 framework. Go to frameworks-> add existing framework->libsql3.dylib

or

Using CocoaPods to get start, you can add following line to your Podfile:

pod 'SCSQLite'

Example Usage

To use the component is very easy. Import the header for your class.

# import "SCSQLite.h" or #import <SCSQLite/SCSQLite.h> (cocoapods)

//Init database 
[SCSQLite initWithDatabase:@"myproject.db"];

// To create, insert, update and delete use this method
BOOL success = [SCSQLite executeSQL:@"INSERT INTO User (name, lastname) VALUES ('Lucas', 'Correa')"];

//OR Vargs va_list
BOOL success = [SCSQLite executeSQL:@"INSERT INTO User (name, lastname) VALUES (?, ?)", @"Lucas", @"Correa"];

// To use this method select
NSArray *result = [SCSQLite selectRowSQL:@"SELECT * FROM User"];

Screencast Demo http://www.iosdevspot.com/2013/01/22/scsqlite3.html

Credit Ferbass

License

SCSQLite is licensed under the MIT License:

Copyright (c) 2014 Lucas Correa (http://www.lucascorrea.com/)

Permission is hereby-granted, free of charge, to any person Obtaining a copy of this software and Associated documentation files (the "Software"), to deal in the Software without restriction, including without Limitation the rights to use, copy, modify, merge , publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to Whom the Software is furnished to the so, subject to the Following conditions:

The above copyright notice and this permission notice Shall be included in all copies or Substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE Warranties OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE Liable FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, Whether IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, Arising FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR THE OTHER IN Dealings SOFTWARE.