ActiveRecord attributes stored serialized in a json column, super smooth. Typed and cast like Active Record. Supporting nested models, dirty tracking, some querying (with postgres jsonb contains), and working smoothy with form builders. Use your database as a typed object store via ActiveRecord, in the same models right next to ordinary ActiveRecord column-backed attributes and associations. Your json-serialized attr_json attributes use as much of the existing ActiveRecord architecture as we can.
The jQuery Query Builder Rule Evaluator and JavaScript library + Dependencies ready for the Rails Asset Pipeline.
Create flexible builders to export your queries easier than ever
Query builder for the Lucene (and Solr) search engine.
`Jsonapi::QueryBuilder` serves the purpose of adding the json api query related SQL conditions to the already scoped collection, usually used in controller index actions. With the query builder we can easily define logic for query filters, attributes by which we can sort, and delegate pagination parameters to the underlying paginator. Included relationships are automatically included via the `ActiveRecord::QueryMethods#includes`, to prevent N+1 query problems.
LSolr is a query builder for Apache Solr in Ruby. It supports only the standard query.
Extends the ActiveRecord predicate builder to allow writing LIKE/ILIKE queries without writing raw SQL
Builder of the CQL statements.
This gem provides a DSL on top of ActiveRecord to get collection of models for index pages with filters.
Query builder for elasticsearch-rails
Ruby gem to build complex ElasticSearch queries with clauses as methods
Searching form and sorting query builder
QRuby: simple sql query builder library for Ruby.
Build a query hash by a simple query string
# XQuery [![Join the chat at https://gitter.im/JelF/xquery](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/JelF/xquery?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/JelF/xquery.svg?branch=master)](https://travis-ci.org/JelF/xquery) [![Code Climate](https://codeclimate.com/github/JelF/xquery/badges/gpa.svg)](https://codeclimate.com/github/JelF/xquery) [![Test Coverage](https://codeclimate.com/github/JelF/xquery/badges/coverage.svg)](https://codeclimate.com/github/JelF/xquery/coverage) [![Issue Count](https://codeclimate.com/github/JelF/xquery/badges/issue_count.svg)](https://codeclimate.com/github/JelF/xquery) XQuery is designed to replace boring method call chains and allow to easier convert it in a builder classes ## Usage of `XQuery` function `XQuery` is a shortcat to `XQuery::Generic.with` ``` r = XQuery(''.html_safe) do |q| # similar to tap q << 'bla bla bla' q << 'bla bla bla' # using truncate q.truncate(15) # real content (q.send(:query)) mutated q << '!' end r # => "bla bla blab...!" ``` ## Usage of `XQuery::Abstract` I designed this gem to help me with `ActiveRecord` Queries, so i inherited `XQuery::Abstract` and used it's powers. It provides the following features ### `wrap_method` and `wrap_methods` when you call each of this methods they became automatically wrapped (`XQuery::Abstract` basically wraps all methods query `#respond_to?`) It means, that there are instance methods with same name defined and will change a `#query` to their call result. ``` self.query = query.foo(x) # is basically the same as foo(x) # when `wrap_method :foo` called ``` You can also specify new name using `wrap_method :foo, as: :bar` syntax ### `q` object `q` is a proxy object which holds all of wrapped methods, but not methods you defined inside your class. E.g. i have defined `wrap_method(:foo)`, but also delegated `#foo` to some another object. If i call `q.foo`, i will get wrapped method. Note, that if you redefine `#__foo` method, q.foo will call it instead of normal work. You can add additional methods to `q` using something like `alias_on_q :foo`. I used it with `kaminary` and it was useful ``` def page=(x) apply { |query| query.page(x) } end alias_on_q :page= def page query.current_page end alias_on_q :page ``` ### `query_superclass` You should specify `query_superclass` class_attribute to inherit `XQuery::Abstract`. Whenever `query.is_a?(query_superclass)` evaluate to false, you will get `XQuery::QuerySuperclassChanged` exception. It can save you much time when your class misconfigured. E.g. you are using `select!` and it returns `nil`, because why not? ### `#apply` method `#apply` does exact what it source tells ``` # yields query inside block # @param block [#to_proc] # @return [XQuery::Abstract] self def apply(&block) self.query = block.call(query) self end ``` It is usefull to merge different queries. ### `with` class method You can get XQuery functionality even you have not defined a specific class (You are still have to inherit XQuery::Abstract to use it) You can see it in this document when i described `XQuery` function. Note, that it yields a class instance, not `q` object. It accepts any arguments, they will be passed to a constructor (except block) ### `execute` method Preferred way to call public instance methods. Resulting query would be returned
Elasticsearch Wrapper, with Query & Mapping Builders
For Building Elastic Search Queries
Modular Sql is a modular query builder that enables a high database compatibility, usage easiness and dynamic construction. It is intended to allow any kind of query in any database, but will, at the moment, only handle relatively simple ones to most common databases.
Simple gem that makes working with raw MySQL in Ruby efficient and fun! It's basically a query string builder (not an ORM!) that takes care of sanatization and sql chaining.
Yet Another Query Builder
This gem contains an OracleEhanced adapter for scoped search query builder, to obtain better search results on Oracle databases.
This gem contains an H2 adapter for scoped search query builder, to obtain better search results on H2 databases.
(b_b) is SQL Query Builder for Google BigQuery
A ruby tool to build SOQL queries
Build Cypher query classes (Neo4j).
Use builder pattern to create ad-hoc SQL queries that aren't tied to models but return read-only plain Ruby objects.
The query builder for ElasticSearch which was extracted from Chewy.
Write db queries directly in SQL - no ORM or query-builder required. Include some conveniences around naming queries and providing arguments.
A simple query builder for Amazon Cloudsearch Structured query parser.
A typed query builder for ruby, basically
Database query builder for advanced search
InfluxDB Flux queries builder for Ruby
Active Query Builder Web API lets create, analyze and modify SQL queries for different database servers using RESTful HTTP requests to a cloud-based service. It requires SQL execution context (information about database schema and used database server) to be stored under the registered account at https://webapi.activequerybuilder.com/.
Simple SQL Query Builder
SQL builder for writing SQL queries
Query builder for the Lucene (and Solr) search engine.
ActiveRecord-like query builder for Elasticsearch
DataTable Builder provides simple building blocks to build complex filterable queries and turn them into easy to render datatables using Rails.
Refine is a flexible query builder for your apps. It lets your users filter down to exactly what they're looking for. Completely configured on the backend.