Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FMDB: now with more documentation! #11

Merged
merged 5 commits into from Apr 30, 2011
Merged

FMDB: now with more documentation! #11

merged 5 commits into from Apr 30, 2011

Conversation

davedelong
Copy link
Contributor

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. :)

@giovatardu
Copy link

Great,

Thank you!

@ccgus
Copy link
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.

@giovatardu
Copy link

cool ;)

ccgus added a commit that referenced this pull request Apr 30, 2011
FMDB: now with more documentation!
@ccgus ccgus merged commit c2a13ff into ccgus:master Apr 30, 2011
@ccgus
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants