avram icon indicating copy to clipboard operation
avram copied to clipboard

A Crystal database wrapper for reading, writing, and migrating Postgres databases.

Results 196 avram issues
Sort by recently updated
recently updated
newest added

Please check following code: ```crystal class Report < BaseModel table do belongs_to process_line : ProcessLine end end ``` ```crystal process_line_id = env.params.url["process_line_id"].to_i SaveReport.create!(process_line_id: process_line_id) # no compile error. ``` ```crystal...

I think using [HAVING](https://www.postgresql.org/docs/14/tutorial-agg.html) isn't super common, but when you need it, it's pretty nice. I had a thought about how this might look, but since I rarely use this...

feature request

I believe that `new_record?` will always be true when using `upsert` because `new_record?` basically does `id.value.nil?`. The `id.value` is only filled in when you pass in `@record` which doesn't happen...

needs investigation

Fixes #824 This is a breaking change. The idea here is that if you had this code: ```crystal number = attribute(4) validate_numeric number, greater_than: 4 ``` To me, this reads...

BREAKING CHANGE

Fixes #819 Adding this type back in now that Crystal 1.4+ is required.

Please check following post. https://forum.crystal-lang.org/t/a-really-not-useful-backtrace-when-write-wrong-macro-code/4816 This is a issue come from Crystal compiler, check [this](https://github.com/crystal-lang/crystal/issues/9124) But, consider this issue make newbie confusing, so, just create this issue here for discuss...

Related: https://github.com/luckyframework/avram/pull/869 I tried to add in Array support here and ran in to a few issues. It seems the SQL to cast to/from an array is a bit different.

Fixes #836 There's a ton of places where `T` gets used, so I'll have to take some time to think out if all of them are necessary to change, or...

I'll need to investigate this more, but we just ran in to an issue with some preloads. Take this model setup ```crystal class User < BaseModel table do # ......

bug

If you have a SaveOperation using `upsert`, and one of the lookup columns is nilable, it doesn't seem to allow you to update that field to `nil`.

bug