How to modify sql before execute it and after build it?
QeelinDarly opened this issue · comments
QeelinDarly commented
Your Question
I want to modify sql which created by gorm before executed. How can I do?
I tried to create a "before" callback method, but it will be executed before create sql. I can't get sql from "originalSQL := db.Statement.SQL.String()". If you have any idea, please help.
The document you expected this should be explained
Expected answer
Cr. commented
use Dialector
interface
refer to https://github.com/go-gorm/sharding