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

Comment From: a631807682

use Dialector interface refer to https://github.com/go-gorm/sharding