-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add to docs #446
Merged
Merged
Add to docs #446
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
crimson-knight
approved these changes
Apr 24, 2023
kalinon
pushed a commit
to kalinon/granite
that referenced
this pull request
Apr 26, 2023
* Quote fields in PG query assembler * Created converter for PG Enums that are returned as bytes * Quote table names in adapter methods only if not already quoted * Check if table/column string has already been quoted * Quote foreign key * Quote fields in query assemblers * added some docs * Created converter for Postgres enum arrays * Incorrect variable name * Added target key to association collection for many relations type * Added truncate function for postgres adapter * Removed unrequired parameter * Rogue value in log for truncate * Added truncate method for models * Add JsonString converter * Must use chars to check string index equality * add note for custom select macro * removed some other commits * removed changes from other pr * removed work from other pr * removed work from other pr * removed commits from other pr --------- Co-authored-by: ionica21 <ionicat@windowslive.com>
crimson-knight
added a commit
that referenced
this pull request
May 3, 2023
* Add a check to ensure created_at and updated_at are Time If a column is named `created_at` or `updated_at` is not a type `Time?`, then the following occurs: ```There was a problem expanding macro 'macro_4801706624' Code in lib/granite/src/granite/transactions.cr:82:5 82 | {% if @type.instance_vars.select { |ivar| ivar.annotation(Granite::Column) }.map(&.name.stringify).includes? "created_at" %} ^ Called macro defined in lib/granite/src/granite/transactions.cr:82:5 82 | {% if @type.instance_vars.select { |ivar| ivar.annotation(Granite::Column) }.map(&.name.stringify).includes? "created_at" %} Which expanded to: > 1 | > 2 | if mode == :create > 3 | @created_at = time.at_beginning_of_second ^--------------------- ``` this simply adds a type check. * fix allowing enum columns * ameba fixes * fix build_find_by_clause for bool values * minor update * Fix issue where primary key can be pushed twice on create * fix infinate recusion when searching with enum * add retry to adapter base * add retry to adapters * minor update * add support for querying with Array(UUID) * format docs * FIX: add converter to read_attribute * Fix for type declaration in has_one * Fix callback runs on #import * more has_one fixes; fixes for through associations * small formatting fixes * fix passing primary_key to has_one * Add to docs (#446) * Quote fields in PG query assembler * Created converter for PG Enums that are returned as bytes * Quote table names in adapter methods only if not already quoted * Check if table/column string has already been quoted * Quote foreign key * Quote fields in query assemblers * added some docs * Created converter for Postgres enum arrays * Incorrect variable name * Added target key to association collection for many relations type * Added truncate function for postgres adapter * Removed unrequired parameter * Rogue value in log for truncate * Added truncate method for models * Add JsonString converter * Must use chars to check string index equality * add note for custom select macro * removed some other commits * removed changes from other pr * removed work from other pr * removed work from other pr * removed commits from other pr --------- Co-authored-by: ionica21 <ionicat@windowslive.com> * add support for foreign key converters (#438) Co-authored-by: Joakim Repomaa <mail@jreinert.com> * fix build_find_by_clause for bool values (#455) * Add context to RecordNotSaved/RecordNotDestroyed error messages (#452) * Add a check to ensure created_at and updated_at are Time (#454) If a column is named `created_at` or `updated_at` is not a type `Time?`, then the following occurs: ```There was a problem expanding macro 'macro_4801706624' Code in lib/granite/src/granite/transactions.cr:82:5 82 | {% if @type.instance_vars.select { |ivar| ivar.annotation(Granite::Column) }.map(&.name.stringify).includes? "created_at" %} ^ Called macro defined in lib/granite/src/granite/transactions.cr:82:5 82 | {% if @type.instance_vars.select { |ivar| ivar.annotation(Granite::Column) }.map(&.name.stringify).includes? "created_at" %} Which expanded to: > 1 | > 2 | if mode == :create > 3 | @created_at = time.at_beginning_of_second ^--------------------- ``` this simply adds a type check. * small formatting fixes * fix passing primary_key to has_one * fix spec: Granite no longer escapes strings, but passes them to the underlying adapter * Fix yaml spec to ignore whitespaces * working mysql spec tests * spec updates * add github workflows (#1) * update docker to use crystal 1.8 and added github action * fix workflow if statements * split workflow into separate jobs for each database * workflow: fix missing envs * workflow: add psql db var * attempt to use workflow services * split tests by database to speed things up * fix sql test * comment out workflow schedule * re-enable ameba --------- Co-authored-by: Seth T <crimsonknightstudios@gmail.com> Co-authored-by: Richard Howell-Peak <development@richardhowellpeak.com> Co-authored-by: ionica21 <ionicat@windowslive.com> Co-authored-by: Joakim Repomaa <mail@j.repomaa.com> Co-authored-by: Joakim Repomaa <mail@jreinert.com> Co-authored-by: Aurélien Delogu <aurelien.delogu@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Wasted a few hours debugging custom select statement because of this fact