Skip to content
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 #group_by to list of methods delegated to the Query Builder in BuilderMethods #388

Closed
wants to merge 1 commit into from
Closed

Add #group_by to list of methods delegated to the Query Builder in BuilderMethods #388

wants to merge 1 commit into from

Conversation

sardaukar
Copy link

@sardaukar sardaukar commented Apr 8, 2020

Not sure how to spec this out, or even test my fork of the shard locally - any pointers?

Fixes #387

@Blacksmoke16
Copy link
Contributor

Blacksmoke16 commented Apr 8, 2020

I would update the version of granite you're using in your project to your forked branch. I.e.

granite:
  github: sardaukar/granite
  branch: add-group_by-to-builder-methods

Then see if everything works.

If everything works now, add a spec to https://github.com/amberframework/granite/blob/master/spec/granite/querying/query_builder_spec.cr.

I imagine the output of using .group_by is like Hash(String, T)? If so creating three records, two with the same name, and another that is diff, then using group_by to ensure the value of the one has 2 and the value of the other has 1.

@sardaukar
Copy link
Author

Closing this PR due to shards error:

Failed git tag --list --contains add-group_by-to-builder-methods --column=never (malformed object name add-group_by-to-builder-methods). Maybe a commit, branch or file doesn't exist?

Gonna try with a shorter name...?

@sardaukar sardaukar closed this Apr 13, 2020
@sardaukar sardaukar deleted the add-group_by-to-builder-methods branch April 13, 2020 19:24
@sardaukar
Copy link
Author

sardaukar commented Apr 13, 2020

@Blacksmoke16 I don't get it 🤷

Changed the branch name to add-group-by and finally dev to get rid of hyphens but still getting:

Failed git tag --list --contains dev --column=never (malformed object name dev). Maybe a commit, branch or file doesn't exist?

when I run shards. Any thoughts? I even added a tag to my repo with the name dev but still same error.

@Blacksmoke16
Copy link
Contributor

Blacksmoke16 commented Apr 13, 2020

I'm not sure I follow. What exactly are you doing?

Really, assuming you forked Granite, you just need to do like:

dependencies:
  granite:
    github: sardaukar/granite
    branch: add-group-by

You don't need to tag anything, just update the github reference and branch in your shard.yml to point to your repo/branch.

EDIT: Be sure you also update your repo to your own, as of course that branch doesn't exist in this repo.

@sardaukar
Copy link
Author

I'm doing just that, but I get that error message from shards

@Blacksmoke16
Copy link
Contributor

Are you sure? I don't suppose you can share your shard.yml of your project where you're trying to test with this branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with group_by ?
3 participants