Create comprehensive documentation for future Claude Code instances working in this repository, including: - Development commands for testing, building, and code quality - Core architecture overview of the SQL query builder system - Directory structure and component explanations - Testing patterns and conventions - Key dependencies and their purposes 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
24 lines
372 B
Go
24 lines
372 B
Go
package db_test
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
dbv2 "git.fsdpf.net/go/db"
|
|
)
|
|
|
|
func ExampleRegisterDialect() {
|
|
opts := dbv2.DefaultDialectOptions()
|
|
opts.QuoteRune = '`'
|
|
dbv2.RegisterDialect("custom-dialect", opts)
|
|
|
|
dialect := dbv2.Dialect("custom-dialect")
|
|
|
|
ds := dialect.From("test")
|
|
|
|
sql, args, _ := ds.ToSQL()
|
|
fmt.Println(sql, args)
|
|
|
|
// Output:
|
|
// SELECT * FROM `test` []
|
|
}
|