An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

appquery

Improving introspection and testability of raw SQL queries in Rails This gem improves introspection and testability of raw SQL queries in Rails by: - ...providing a separate query-folder and easy instantiation A query like `AppQuery[:some_query]` is read from app/queries/some_query.sql. - ...providing options for rewriting a query: Query a CTE by replacing the select: query.select_all(select: "select * from some_cte").entries ...similarly, query the end result (i.e. CTE `_`): query.select_all(select: "select count(*) from _").entries - ...providing (custom) casting: AppQuery("select array[1,2]").select_value(cast: true) custom deserializers: AppQuery("select '1' id").select_all(cast: {"id" => ActiveRecord::Type::Integer.new}).entries - ...providing spec-helpers and generators

Ecosystem
gem.coop
Latest Release
0.8.0
about 2 months ago
Versions
24
Downloads
5,858 total
Links
Registry gem.coop
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:gem/appquery?repository_url=https://gem.coop
spec
License MIT
First Release over 1 year ago
Last Synced 15 days ago
Repository
Stars 2 on GitHub
Forks 0 on GitHub