paurkedal / ocaml-caqti

Cooperative-threaded access to relational data
https://paurkedal.github.io/ocaml-caqti/index.html
GNU Lesser General Public License v3.0
299 stars 36 forks source link

sqlite3-driver: rename prepare to prepare_db #84

Closed reynir closed 2 years ago

reynir commented 2 years ago

In the same file there's another function called [prepare]. While the scopes do not overlap it can be a little confusing when using simple search in the file. I was reading the file and searching for the definition of prepare with simple search and I was surprised to see PRAGMA foreign_keys = ON was done each time.

paurkedal commented 2 years ago

Good point, though now that I'm aware of it, I wondering if it should be called something completely different like setup, or do we have a better name, to avoid the confusion with prepared statements.

reynir commented 2 years ago

I pushed a commit that changes it to setup. I can squash the commits if you like

paurkedal commented 2 years ago

Thanks, I think I can squash with the GitHub merge button.

paurkedal commented 2 years ago

Sorry I messed up the commit message a bit, but should be readable enough.