crawshaw / sqlite

Go SQLite3 driver
ISC License
571 stars 68 forks source link

Add Stmt.BindParamName method #109

Closed zombiezen closed 2 years ago

zombiezen commented 3 years ago

I changed Stmt.bindNames to a slice, since the elements are a small, contiguous sequence.

zombiezen commented 3 years ago

@AdamSLevy When you get a chance to review, this would help me with some code I'm working on. Let me know if there's anything I can do to help.

AdamSLevy commented 2 years ago

I support adding the function to the API but I don't agree with change Stmt.bindNames to a slice over a map. Consider that findBindName is called for every Set operation. I'd rather keep the map and add the cached slice as well. I'm going to fix up your PR according to that.