pop
pop copied to clipboard
Using a custom dialect?
Loosely related issues: https://github.com/gobuffalo/pop/issues/234 https://github.com/gobuffalo/pop/issues/4
Description
I’ve been trying to find a way to integrate newRelic with pop, particularly with the postgres driver. The summary of my effort is that I need to replace the postgres dialect with a new, context driven dialect. This is impossible at the moment, mostly because a lot of the required interfaces and vars are private. This issue is a feature request to expose support for integrating custom dialects.
I have an incomplete branch which serves as a proof of concept: https://github.com/gobuffalo/pop/compare/master...Jwonsever:jwonsever/new_relic_2?expand=1
That feature branch has a few other changes which are necessary for my specific use case, which I'm happy to adjust if we move it towards a PR. Notably, I added a context to the transaction struct, and I hacked in a special configuration for the sql driver, which would be better as an actual config option.
Expected Behavior
It should be possible to supply a custom sql dialect and configure that dialect using database.yml.
Actual Behavior
It is not possible to use a dialect not supported by pop.
Info
Using buffalo, branch example is off of pop 11.4.
I'm having this issue also. I've created a custom "ssh+mysql" dialect that I want to integrate. I think of just forking pop and adding a dialect_ssh_mysql.go
file.