quinnj/SQLite.jl — pull request #48 by Sean1708 (2014-10-20 22:08:02+00:00)
Title: Expose parameter binding to the user.

Obviously `INSERT` statements are covered by `create` and `append` but parameter binding can actually be used anywhere an expression is expected, which can be particularly useful in `SELECT` and `UPDATE` statements.

Anyway, long story short: I added a third parameter to `query` and a couple of `SQLiteStmt` methods so that users can use it, i.e.

query(db, "SELECT * FROM tab WHERE col LIKE ?", ["%x"])

or

query(db, "UPDATE tab SET col = :newval WHERE col = :oldval", Dict(:oldval => 1, :newval => 8))

I think this could be quite useful, what do you reckon? The only other thing I can think of would be to have a method of `query` which executes the same statement with different parameter values (array of arrays or array of dicts) but I'm not sure there's much of a use case for this.