Files
db/sql_dialect_example_test.go
T
whatandClaude 304d553b3c docs: Add CLAUDE.md with codebase guidance
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>
2025-09-27 15:47:28 +08:00

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` []
}