Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

Cleanup #14

Open
wesj opened this issue Jan 15, 2015 · 0 comments
Open

Cleanup #14

wesj opened this issue Jan 15, 2015 · 0 comments

Comments

@wesj
Copy link

wesj commented Jan 15, 2015

I stole this for use at Mozilla :) But I wound up needing a few changes originally, and then slowly a lot more. My current work is at:

wesj/firefox-ios-1@debc4c2

It breaks API compatibility (a lot) and I just deleted a lot of code we didn't need. We'd love to not have a fork though. I'm happy (and another guy on our team has said he would be happy) to bring it back in line with your stuff and uplift things.

Some things I added:

  • custom file names
  • binds using sqlite_bind. I think this should remove the need for all the escaping, but I'd love to know if I'm wrong....
  • user_version
  • multiple connections (All calls now something like db.requestConnection(flags) { connection in
    // do stuff with the connection
    } I was hoping this would let me make things concurrent, but I don't think I have that working yet...
  • results are returned in a "Cursor" object right now. That's just a dumb wrapper we have around arrays like things, but it lets you dynamically grab rows as you want them instead of loading everything into memory. We can probably break that into its own piece, but we'd still need a way to get back the stmt from a query.
  • Use NSError rather than ints
  • Probably other things I've forgotten

I removed the:

  • Database creation helpers
  • savepoint support (I'd be happy to put that back, just removing cruft...)
  • image/date support. Again, I'd be happy to put that back. I originally revamped it to be a bit more general (i.e. You could register custom handlers for different classes), and I still think that would be a neat feature for it to have.
  • a lot of other helper methods I think

Any of this sound like things you'd like uplifted? I can pull them out one by one and try to split off our custom code where I can. Thanks!

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

No branches or pull requests

1 participant