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>
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"git.fsdpf.net/go/db/v2/internal/tag"
|
||||
"git.fsdpf.net/go/db/internal/tag"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -37,13 +37,14 @@ func newColumnMap(t reflect.Type, fieldIndex []int, prefixes []string) ColumnMap
|
||||
// if PkgPath is empty then it is an exported field
|
||||
columnName := getColumnName(&f, dbTag)
|
||||
if !shouldIgnoreField(dbTag) {
|
||||
if !implementsScanner(f.Type) {
|
||||
subCm := getStructColumnMap(&f, fieldIndex, []string{columnName}, prefixes)
|
||||
if len(subCm) != 0 {
|
||||
subColMaps = append(subColMaps, subCm)
|
||||
continue
|
||||
}
|
||||
}
|
||||
// 移除原来的关联结构,并 scans 字段出现 table.col
|
||||
// if !implementsScanner(f.Type) {
|
||||
// subCm := getStructColumnMap(&f, fieldIndex, []string{columnName}, prefixes)
|
||||
// if len(subCm) != 0 {
|
||||
// subColMaps = append(subColMaps, subCm)
|
||||
// continue
|
||||
// }
|
||||
// }
|
||||
ffTag := tag.New("ff", f.Tag)
|
||||
columnName = strings.Join(append(prefixes, columnName), ".")
|
||||
cm[columnName] = newColumnData(&f, columnName, fieldIndex, ffTag)
|
||||
|
||||
Reference in New Issue
Block a user