- Implement functionality to create, update, delete, and view relationships between tables. - Introduce new UI screens for managing relationships, including forms for adding and editing relationships. - Enhance table editor with navigation to relationship management. - Ensure relationships are displayed in a structured table format for better usability.
37 lines
1.1 KiB
Go
37 lines
1.1 KiB
Go
// Package reflectutil provides reflection utilities for analyzing Go code structures.
|
|
//
|
|
// # Overview
|
|
//
|
|
// The reflectutil package offers helper functions for working with Go's reflection
|
|
// capabilities, particularly for parsing Go struct definitions and extracting type
|
|
// information. This is used by readers that parse ORM model files.
|
|
//
|
|
// # Features
|
|
//
|
|
// - Struct tag parsing and extraction
|
|
// - Type information analysis
|
|
// - Field metadata extraction
|
|
// - ORM tag interpretation (GORM, Bun, etc.)
|
|
//
|
|
// # Usage
|
|
//
|
|
// This package is primarily used internally by readers like GORM and Bun to parse
|
|
// Go struct definitions and convert them to database schema models.
|
|
//
|
|
// // Example: Parse struct tags
|
|
// tags := reflectutil.ParseStructTags(field)
|
|
// columnName := tags.Get("db")
|
|
//
|
|
// # Supported ORM Tags
|
|
//
|
|
// The package understands tag conventions from:
|
|
// - GORM (gorm tag)
|
|
// - Bun (bun tag)
|
|
// - Standard database/sql (db tag)
|
|
//
|
|
// # Purpose
|
|
//
|
|
// This package enables RelSpec to read existing ORM models and convert them to
|
|
// a unified schema representation for transformation to other formats.
|
|
package reflectutil
|