Add row mappers.#354
Conversation
|
Thanks for doing this- I'll have to take a closer look at this and see if it's something that'll fit in FMDB or not. I'm trying to keep it super slim as possible these days, though I really should have some sort of "neat stuff to have" folder of add-ons. |
|
You're welcome. For me this small addition addresses something that is something missing. But its up to you whether its appropriate for the |
|
Maybe you also want to have a look on SISQLiteContext - a class extending FMDB by CoreData like convenience functions. Tried to keep it lightweight and suitable for big data sources and still you can access the core db underneath by utilizing FMDB. |
|
@azplanlos Thanks, will take a look! But this particular change is just a very small change - a handful of lines of code to map a result set to a model object. When implementing a Data Access Object (DAO) we'd want this for findBy, listBy, etc methods. We could simply define a method to do this, but it adds some structure - functional style mapping. |
These methods simplify the implementation of a DAO (data access object):
Analogous to Spring JDBC RowMapper and ResultSetExtractor: