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

feat: Enable custom join statements #430

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

darwin67
Copy link

@darwin67 darwin67 commented Sep 9, 2024

resolves #423

Add a new CustomJoin type to allow users to fill in whatever non standard join statement they might use.

In my case of using ClickHouse, we use ARRAY JOIN <nested col> AS <col>, and with this change, it can now be written as

goqu.Select("*").From("test").CustomJoin(goqu.L("ARRAY JOIN nested").As("foo"))

which should result in a query like

SELECT * FROM test ARRAY JOIN nested AS foo

CustomJoin will not add anything, and will take whatever the user passes it, so it's up to the user to make sure if the syntax of the JOIN statement is accurate or not.

@darwin67 darwin67 mentioned this pull request Sep 9, 2024
4 tasks
@darwin67
Copy link
Author

darwin67 commented Sep 19, 2024

ping: @doug-martin or anyone that can review this.

@iredmail
Copy link

I suggest not submitting your own files which are not related to this PR: .envrc, flake.lock, flake.nix, also don't change .gitignore in this PR.

@darwin67
Copy link
Author

darwin67 commented Sep 21, 2024

I suggest not submitting your own files which are not related to this PR: .envrc, flake.lock, flake.nix, also don't change .gitignore in this PR.

I don't mind deleting them, but I use Nix for handling all dependencies related to a project, so I won't have access to any Golang tooling without them.
Also, flake.nix has a quirkiness where the file needs to be within git control to work.

On the flip side, these files will work for anyone using Nix and have everything they need to work on this repo the moment they cd into it.

Regardless, I'd like to get a review or a conditional approval for the PR before removing them. Otherwise I'll need re-add them to follow up for changes, and it's a waste of time.

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.

Custom join statement
2 participants