FMDB: now with more documentation! #11

Merged
merged 5 commits into from Apr 30, 2011

Conversation

Projects
None yet
3 participants
Contributor

davedelong commented Apr 10, 2011

There are several changes in these commits:

  • Method to validate a SQL statement (-[FMDatabase validateSQL:error:]). Returns YES if the passed SQL is valid, NO otherwise.
  • Added method to retrieve the number of columns in a result set (-[FMResultSet numberOfColumns])
  • Added methods to execute a query or update with an NSString-style format string. (-[FMDatabase executeQueryWithFormat:] and -[FMDatabase executeUpdateWithFormat:]). This allows you to not worry about boxing non-object values in NSNumbers before passing them in to FMDB. For example: [db executeUpdateWithFormat:@"insert into myTable values (%d, %s)", 42, "simple string"];
  • Renamed -[FMResultSet objectForColumnName:] to -[FMResultSet objectForColumn:] to be consistent with the other similar methods
  • Wrote some documentation! Hooray!

You may need to do a bit of formatting cleanup, but on the whole I believe the changes are worthwhile. :)

Great,

Thank you!

Owner

ccgus commented Apr 20, 2011

Sorry I haven't pulled this yet- I got awful busy recently. I try to get to it asap though.

cool ;)

@ccgus ccgus added a commit that referenced this pull request Apr 30, 2011

@ccgus ccgus Merge pull request #11 from davedelong/master.
FMDB: now with more documentation!
c2a13ff

@ccgus ccgus merged commit c2a13ff into ccgus:master Apr 30, 2011

Owner

ccgus commented Apr 30, 2011

Finally got this done. Did you write any tests at all for executeUpdateWithFormat? I'd like to add them to main.m if you did.

@petersondrew petersondrew pushed a commit to petersondrew/fmdb that referenced this pull request Jan 9, 2012

@ccgus ccgus Merge pull request #11 from davedelong/master.
FMDB: now with more documentation!
6204368

@wmathurin wmathurin pushed a commit to wmathurin/fmdb that referenced this pull request Jul 11, 2017

@khawkins khawkins Merge pull request #11 from khawkins/fmdb_update
Updating FMDB fork to FMDB 2.6
4dfdb03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment