Documentation ¶
Index ¶
- type Config
- type ConfigBatch
- type Options
- func (opt *Options) WithColumnNamePatternFieldName(columnNamePatternFieldName string) *Options
- func (opt *Options) WithColumnNamingStrategies(pattern gormmomname.ColumnNamePattern, naming gormmomname.Naming) *Options
- func (opt *Options) WithDefaultColumnNamePattern(pattern gormmomname.ColumnNamePattern) *Options
- func (opt *Options) WithIndexNamingStrategies(pattern gormidxname.IndexNamePattern, naming gormidxname.Naming) *Options
- func (opt *Options) WithNamingTagName(namingTagName string) *Options
- func (opt *Options) WithRenewIndexName(renewIndexName bool) *Options
- func (opt *Options) WithSkipBasicNaming(skipBasicNaming bool) *Options
- type SchemaCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func NewConfig ¶
func NewConfig(schemaCache *SchemaCache, options *Options) *Config
func (*Config) GenReplace ¶
func (cfg *Config) GenReplace()
func (*Config) GetNewCode ¶ added in v0.0.24
type ConfigBatch ¶ added in v0.0.24
type ConfigBatch struct {
// contains filtered or unexported fields
}
func NewConfigBatch ¶ added in v0.0.24
func NewConfigBatch(schemaCaches []*SchemaCache, options *Options) *ConfigBatch
func (*ConfigBatch) GenReplaces ¶ added in v0.0.24
func (c *ConfigBatch) GenReplaces()
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
func NewOptions ¶
func NewOptions() *Options
func (*Options) WithColumnNamePatternFieldName ¶ added in v0.0.24
func (*Options) WithColumnNamingStrategies ¶ added in v0.0.24
func (opt *Options) WithColumnNamingStrategies(pattern gormmomname.ColumnNamePattern, naming gormmomname.Naming) *Options
func (*Options) WithDefaultColumnNamePattern ¶ added in v0.0.24
func (opt *Options) WithDefaultColumnNamePattern(pattern gormmomname.ColumnNamePattern) *Options
func (*Options) WithIndexNamingStrategies ¶ added in v0.0.24
func (opt *Options) WithIndexNamingStrategies(pattern gormidxname.IndexNamePattern, naming gormidxname.Naming) *Options
func (*Options) WithNamingTagName ¶ added in v0.0.24
func (*Options) WithRenewIndexName ¶ added in v0.0.24
func (*Options) WithSkipBasicNaming ¶ added in v0.0.24
type SchemaCache ¶ added in v0.0.24
type SchemaCache struct {
// contains filtered or unexported fields
}
func NewSchemaCache ¶ added in v0.0.24
func NewSchemaCache(sourcePath string, structName string, sch *schema.Schema) *SchemaCache
NewSchemaCache 创建参数信息
func NewSchemaCacheV2 ¶ added in v0.0.24
func NewSchemaCacheV2[T any](sourcePath string) *SchemaCache
NewSchemaCacheV2 使用泛型创建参数信息。T 只能传类型名称而非带指针的类型名
func NewSchemaCacheV3 ¶ added in v0.0.24
func NewSchemaCacheV3(sourcePath string, object interface{}) *SchemaCache
NewSchemaCacheV3 使用对象创建参数信息 object 传对象或者对象指针都行
func NewSchemaCaches ¶ added in v0.0.24
func NewSchemaCaches(root string, objects []interface{}) []*SchemaCache
func (*SchemaCache) Validate ¶ added in v0.0.24
func (a *SchemaCache) Validate()
Click to show internal directories.
Click to hide internal directories.