Fixes
- Passing duplicate values to columns in a SQL statement (ex
SELECT id, NULL, NULL, name from repositories) used to return an array of results with de-duplicated values. (ex[[1, nil, "github"]]instead of[[1, nil, nil, "github"]]. This had some unfortunate side-effects when parsing results so we changed the code to behave closer toActiveRecord::Resultobjects. Now if you pass duplicated columns theresultsarray will return all the values. The hash will only return unique columns because hashes cannot contain duplicate keys.
Fixes
- GitHub::SQL.transaction now takes options and passes them to ActiveRecord::Base.transaction.
- Moved default time zone enforcement to sanitize from add. Makes it possible to use interpolate or sanitize and have correct time zone enforcement.
Additions
- Added GitHub::SQL#transaction instance method to match the class level one.
Fixes
GitHub::SQL#hash_resultsnow correctly returns an array of hashes on Rails 4+ rather thanActiveRecord::Result
Fixes
- Replaces
requirewithrequire_relativealso in github-ds https://github.com/github/github-ds/commit/67f0ea37bc1495e62b48b4c7b4ad72fad4f97a1a
Fixes
- Replaces
requirewithrequire_relativeto avoid requirement errors when the gem is required inside the a "gihub" load path https://github.com/github/github-ds/commit/cb50e5318c911cf5bbf30fd07ca8ea93bfbf1c6d
Additions
GitHub::SQL.transactionwas added to allowGitHub::SQLqueries to run transactionally github#24
Additions
- github-ds does not use
blank?anymore, thus not depending onactive_support/core_ext/object/blankhttps://github.com/github/github-ds/commit/a22c397eaaa00bb441fb4a0ecdf3e371daa9001a
Fixes
ActiveRecord::Base.default_timezoneis not unintentionally set tonilgithub#22
Additions
GitHub::KVacceptsSQL::Literalas valid values https://github.com/github/github-ds/pull/21/commits/c11d4e3154dd3435d509a3356f46d0a2981d7234
Fixes
- Value length validation takes into account that strings can be made of multi-byte characters https://github.com/github/github-ds/pull/21/commits/5156f95ef04b1ecf2ce90929c5752b2e61d39566
Additions
Result.newwithout block returnstrueforok?github#19
Fixes
- Fixed rails generator name github#16
- Add active_record as dependency (not just dev dependency) https://github.com/github/github-ds/commit/e9ce8e4e47d39152021976482e1a0a60efbb9d20
- Initial release.