Compare projects
Project comparisons allow you to view any selection of projects side by side just like they're shown on regular categories or in search results. You can try out an example or start yourself by adding a library to the comparison via the input below. You can also easily share your current comparison with others by sending the URL of the current page.
0.0
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
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
Activity