{"push_id":696001548,"size":5,"distinct_size":5,"ref":"refs/heads/master","head":"a346958119af3f83b548ec8a39a75665c6c5a1f4","before":"63ae070ef44a9670f701d636a8a83db77bdc2706","commits":[{"sha":"a3089c8c1b2e07c35f25af4f368a785573e9eefc","author":{"email":"b323e93e765cbe9593fcc954786dbe1061709574@gmail.com","name":"Colby Klein"},"message":"Add parameterized queries and convenience funcs.\n\n* All indices (I think) are now 1-based, for consistency.\n* Added parameterized queries via DBStatement.bind()\n* Added DBStatement.getColumnName()\n* Made DBStatement.results() return column count\n* Made DBStatement.results() row provide a getTable() function for convenience (maps the result to a key-value table)\n* Automatically finalize statements when SQLITE_DONE is received\n* Added DBStatement.run() to execute prepared statements which don't return any results\n* Removed all the superfluous semicolons\n* Renamed to sqlite-ffi to prevent confusion with official sqlite3 module\n\n## Using parameterized queries\n\n```lua\nlocal sqlite = require \"sqlite-ffi\"\nlocal db = assert(sqlite.DBConnection(\"foo.db\"))\n\nlocal q = db:prepare(\"SELECT * FROM ? WHERE id=? AND bar=?\")\nq:bind {\n\t{ \"Foo\", \"text\" },\n\t{ 256, \"int\" }\n}\nq:bind(\"Baz\") -- will be recognized as text automatically\n\n-- for queries with results, getTable() makes parsing less tedious.\nfor row, cols in q:results() do\n\tfor k, v in pairs(row:getTable()) do\n\t\tprint(k, v)\n\tend\nend\n\nq = db:prepare(\"UPDATE Foo SET bar=? WHERE id=?\")\nq:bind {{ \"Baz\", \"text\" }, { 1, \"int\" }}\n-- fire-and-forget (just check the return for errors!)\nassert(q:run())\n\ndb:close()\n```","distinct":true,"url":"https://api.github.com/repos/Wiladams/LJIT2SQLite/commits/a3089c8c1b2e07c35f25af4f368a785573e9eefc"},{"sha":"8dbd3823282a9ce6a719681cd261800aceb97680","author":{"email":"b323e93e765cbe9593fcc954786dbe1061709574@gmail.com","name":"Colby Klein"},"message":"README.txt -> README.md so it gets parsed.","distinct":true,"url":"https://api.github.com/repos/Wiladams/LJIT2SQLite/commits/8dbd3823282a9ce6a719681cd261800aceb97680"},{"sha":"f7c67a7c36551038ef5597cae2a77f1e81493550","author":{"email":"b323e93e765cbe9593fcc954786dbe1061709574@gmail.com","name":"Colby Klein"},"message":"Made function style consistent.","distinct":true,"url":"https://api.github.com/repos/Wiladams/LJIT2SQLite/commits/f7c67a7c36551038ef5597cae2a77f1e81493550"},{"sha":"37aa607d80a949754c81f914605ef840f8ecbea6","author":{"email":"b323e93e765cbe9593fcc954786dbe1061709574@gmail.com","name":"Colby Klein"},"message":"Missed a few","distinct":true,"url":"https://api.github.com/repos/Wiladams/LJIT2SQLite/commits/37aa607d80a949754c81f914605ef840f8ecbea6"},{"sha":"a346958119af3f83b548ec8a39a75665c6c5a1f4","author":{"email":"d47cda4b36f1fa02fe247fd39954e48865dc1d27@users.noreply.github.com","name":"William Adams"},"message":"Merge pull request #1 from shakesoda/master\n\nAdded bind API for convenience + SQL injection prevention","distinct":true,"url":"https://api.github.com/repos/Wiladams/LJIT2SQLite/commits/a346958119af3f83b548ec8a39a75665c6c5a1f4"}]}