Book Image

Learning SQLite for iOS

By : Gene Da Rocha
Book Image

Learning SQLite for iOS

By: Gene Da Rocha

Overview of this book

The ability to use SQLite with iOS provides a great opportunity to build amazing apps. Apple's iOS SDK provides native support for SQLite databases. This combination offers the potential to create powerful, data-persistent applications. This book starts with the architecture of SQLite database and introduces you to concepts in SQL . You will find yourself equipped to design your own database system, administer it, and maintain it. Further, you will learn how to operate your SQLite databases smoothly using SQL commands. You will be able to extend the functionality of SQLite by using its vast arsenal of C API calls to build some interesting, exciting, new, and intelligent data-driven applications. Understand how Xcode, HTML5, and Phonegap can be used to build a cross-platform modern app which can benefit from all these technologies - all through creating a complete, customizable application skeleton that you can build on for your own apps.
Table of Contents (15 chapters)
Learning SQLite for iOS
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
Index

Preparing queries


These are the eight methods and two objects that form the SQLite interface. These are the basic list of functions that each user/reader must be aware of when using SQLite in code. These statements don't change, nor does their functionality. These are the key statements to ensure that users are aware of the name, format, and where these functions are used:

  • sqlite3: Database connection object, made by sqlite3_open(), killed by sqlite3_close()

  • sqlite3_stmt: Preparation statement object, made by sqlite3_prepare(), killed by sqlite3_finalize()

  • sqlite3_open(): Opens the database (new or existing) and uses constructor sqlite3

  • sqlite3_prepare(): Compiles some SQL text into byte code to perform updating or querying tasks and is the constructor of sqlite3_stmt

  • sqlite3_bind(): Application data is stored into the parameters of the original SQL

  • sqlite3_step(): The further advancement of sqlite3_stmt onto the next row or completion

  • sqlite3_column(): The current row result outlining column...