clear
clear copied to clipboard
Advanced ORM between postgreSQL and Crystal
## Description Currently the literal string `'null'` is written to the database when a `nil` value is serialized. Note that the `json_serializable_converter` macro already does the right thing: https://github.com/anykeyh/clear/blob/master/src/clear/model/converters/json_any_converter.cr#L59 ##...
Apologies if this is possible and I've overlooked. I'm struggling to understand why the custom `Account#email=` method in the following does not get called: ```crystal require "spec" require "clear" class...
Fixes #221. Relative to this change on crystal-pg: https://github.com/will/crystal-pg/pull/236
I'm using Crystal 1.1.1 and when I require "clear" I got this error. ``` In lib/clear/src/clear/sql/insert_query.cr:61:10 61 | h[col] = rs.read ^ Error: no overload matches 'Hash(String, Array(JSON::Any) | Array(PG::BoolArray)...
## Description This PR will allow developers to run clear specs using Docker instead of installing PostgreSQL on their local system. Containerisation will not only help developers test clear without...
Hello! I'm pretty new to Crystal and Clear so sorry if I'm missing something obvious. The gitbook documentation gives the following example for how to order query results. ``` User.query.order_by(last_name:...
The Clear manual [mentions a migration CLI](https://clear.gitbook.io/project/migrations/migration-cli), but I cannot figure out how to access it. Building with either `src/clear.cr` or `src/clear/cli.cr` as an entrypoint produces an executable that does...
can Clear support unique constraints on multiple columns? for example: ``` CREATE TABLE table ( c1 data_type, c2 data_type, c3 data_type, UNIQUE (c2, c3) ); ```
Clear fails with pg v.0.24.0, probably due to the changes introduced in https://github.com/will/crystal-pg/commit/387ec63030b91b95257dd52f166ac00f623d7d54 Please note that pg version 0.23.2 runs fine. This is log for `crystal spec --error-trace` ```crystal error...
Hi! Thanks for Clear which is working great. I'm struggling to use `change_column_type` or even directly `AlterColumn` in a migration. I continue to get: ``` In lib/clear/src/clear/migration/operation/columns.cr:73:28 73 | def...