1 package goqu_test 2 3 import ( 4 "fmt" 5 6 "github.com/doug-martin/goqu/v9" 7 ) 8 9 func ExampleRegisterDialect() { 10 opts := goqu.DefaultDialectOptions() 11 opts.QuoteRune = '`' 12 goqu.RegisterDialect("custom-dialect", opts) 13 14 dialect := goqu.Dialect("custom-dialect") 15 16 ds := dialect.From("test") 17 18 sql, args, _ := ds.ToSQL() 19 fmt.Println(sql, args) 20 21 // Output: 22 // SELECT * FROM `test` [] 23 } 24