Expressions
Expressions evaluate into useful objects via a query builder like interface.
Installation
Add gem 'expressions' to your Gemfile then:
bundle install
API
type()
my_var = type MyType | fetch_my_object(id: 123)my_var is now type checked to be of type MyType when assigned to.
For more information on type expressions see LowType gem.
value()
For more information on value expressions see LowType gem.
config()
Coming soon...
ref()
Coming soon...
table() [UNRELEASED]
The table expression inverts the usual database query logic. Instead of building a query of what we want from the database, we build the table we want and let the expression build the query.
table(:username > :title | :body)The above expression builds a ORM query to right join the user table into the articles table and results in a list of articles with the user's username in each row