dsl

package
v1.11.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicRelationTypes

func BasicRelationTypes() []types.RelationType

BasicRelationTypes 返回 ECMDB 内置预设的基础关联类型定义

func Relation

func Relation(sourceModelUID, relationTypeUID, targetModelUID string) *relationItem

Types

type SchemaBuilder

type SchemaBuilder struct {
	// contains filtered or unexported fields
}

func (*SchemaBuilder) Build

func (b *SchemaBuilder) Build() types.Schema

func (*SchemaBuilder) Model

func (b *SchemaBuilder) Model(model types.ModelSpec) *SchemaBuilder

func (*SchemaBuilder) ModelGroup

func (b *SchemaBuilder) ModelGroup(name string) *SchemaBuilder

func (*SchemaBuilder) ModelGroups

func (b *SchemaBuilder) ModelGroups(groups ...types.ModelGroupSpec) *SchemaBuilder

func (*SchemaBuilder) Models

func (b *SchemaBuilder) Models(models ...types.ModelSpec) *SchemaBuilder

func (*SchemaBuilder) Relation

func (b *SchemaBuilder) Relation(sourceModelUID, relationTypeUID, targetModelUID, mapping string) *SchemaBuilder

func (*SchemaBuilder) RelationType

func (b *SchemaBuilder) RelationType(relationType types.RelationType) *SchemaBuilder

func (*SchemaBuilder) RelationTypes

func (b *SchemaBuilder) RelationTypes(relationTypes ...types.RelationType) *SchemaBuilder

func (*SchemaBuilder) Setup

func (b *SchemaBuilder) Setup(items ...SetupItem) *SchemaBuilder

type SetupItem

type SetupItem interface {
	ApplyToSchema(schema *types.Schema)
}

SetupItem 描述能够对 Schema 执行配置注入的项目接口

func ModelGroup

func ModelGroup(name string) SetupItem

func RelationTypes

func RelationTypes(relationTypes ...types.RelationType) SetupItem

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL