tessl install tessl/golang-gorm-io--gorm@1.31.0Full-featured ORM library for Golang with associations, hooks, transactions, migrations, and developer-friendly chainable API
Agent Success
Agent success rate when using this tile
81%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.13x
Baseline
Agent success rate without this tile
72%
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.