Full-featured ORM library for Golang with associations, hooks, transactions, migrations, and developer-friendly chainable API
Overall
score
81%
Build a tool that generates SQL statements from GORM queries without executing them, useful for query debugging and logging.
@generates
The tool should accept GORM query builders and return the SQL that would be executed, along with any parameter bindings.
package inspector
import "gorm.io/gorm"
// GenerateSQL takes a GORM query and returns the SQL string that would be executed
// along with the parameter values. Returns an error if SQL generation fails.
func GenerateSQL(db *gorm.DB) (sql string, vars []interface{}, err error)Provides ORM functionality with SQL generation capabilities.
Install with Tessl CLI
npx tessl i tessl/golang-gorm-io--gormdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10