datamodeldiagram

package
v0.621.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateDataModel

func GenerateDataModel(pclass cmdutils.ClassLabeler, outmap map[string]string, mod *sysl.Module,
	stmts []*sysl.Statement, title, project, outDir string, epName bool)

func GenerateDataModels

func GenerateDataModels(datagenParams *cmdutils.CmdContextParamDatagen,
	model *sysl.Module, logger *logrus.Logger) (map[string]string, error)

func GenerateDataModelsWithProjectMannerModule

func GenerateDataModelsWithProjectMannerModule(datagenParams *cmdutils.CmdContextParamDatagen,
	model *sysl.Module, logger *logrus.Logger) (map[string]string, error)

func GenerateDataModelsWithPureModule

func GenerateDataModelsWithPureModule(datagenParams *cmdutils.CmdContextParamDatagen,
	model *sysl.Module, logger *logrus.Logger) (map[string]string, error)

*

  • It is added to help reviewing generated data model with sysl
  • file produced by command import. Generate data model diagrams using the following command:
  • sysl data -d --root=/Users/guest/data -t Test -o Test.png Test
  • sysl datamodel -d --root=/Users/guest/data -t Test -o Test.png Test.sysl

Types

type DataArgs

type DataArgs struct {
	Root     string
	Title    string
	Output   string
	Project  string
	Modules  string
	Expected map[string]string
}

type DataModelParam

type DataModelParam struct {
	cmdutils.ClassLabeler
	Mod     *sysl.Module
	App     *sysl.Application
	Project string
	Title   string
	Epname  bool // If %(epname) is specified
}

type DataModelView

type DataModelView struct {
	cmdutils.ClassLabeler
	Mod           *sysl.Module
	StringBuilder *strings.Builder
	Symbols       map[string]*cmdutils.Var
	Project       string
	Title         string
}

func MakeDataModelView

func MakeDataModelView(
	p cmdutils.ClassLabeler, mod *sysl.Module, stringBuilder *strings.Builder,
	title, project string,
) *DataModelView

func (*DataModelView) DrawEnum added in v0.473.0

func (v *DataModelView) DrawEnum(name string, entity *sysl.Type_Enum)

func (*DataModelView) DrawPrimitive

func (v *DataModelView) DrawPrimitive(
	viewParam EntityViewParam,
	entity string,
	relationshipMap map[string]map[string]RelationshipParam,
)

func (*DataModelView) DrawRelation

func (v *DataModelView) DrawRelation(
	viewParam EntityViewParam,
	entity *sysl.Type_Relation,
	relationshipMap map[string]map[string]RelationshipParam,
)

func (*DataModelView) DrawRelationship

func (v *DataModelView) DrawRelationship(relationshipMap map[string]map[string]RelationshipParam, viewType string)

func (*DataModelView) DrawTuple

func (v *DataModelView) DrawTuple(
	viewParam EntityViewParam,
	entity *sysl.Type_Tuple,
	relationshipMap map[string]map[string]RelationshipParam,
)

nolint: funlen

func (*DataModelView) GenerateDataView

func (v *DataModelView) GenerateDataView(dataParam *DataModelParam) string

func (*DataModelView) UniqueVarForAppName

func (v *DataModelView) UniqueVarForAppName(nameParts ...string) string

type EntityViewParam

type EntityViewParam struct {
	EntityColor  string
	EntityHeader string
	EntityName   string
	EntityAlias  string
	IgnoredTypes map[string]struct{}
	Types        map[string]*sysl.Type
}

type RelationshipParam

type RelationshipParam struct {
	Entity       string
	Relationship string
	Count        uint32
}

Jump to

Keyboard shortcuts

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