Enhanced godoc
This commit is contained in:
@@ -2,7 +2,13 @@ package models
|
||||
|
||||
import "encoding/xml"
|
||||
|
||||
// DCTXDictionary represents the root element of a DCTX file
|
||||
// DCTX File Format Models
|
||||
//
|
||||
// This file defines the data structures for parsing and generating DCTX
|
||||
// (Data Dictionary) XML files, which are used by Clarion development tools
|
||||
// for database schema definitions.
|
||||
|
||||
// DCTXDictionary represents the root element of a DCTX file.
|
||||
type DCTXDictionary struct {
|
||||
XMLName xml.Name `xml:"Dictionary"`
|
||||
Name string `xml:"Name,attr"`
|
||||
@@ -11,7 +17,7 @@ type DCTXDictionary struct {
|
||||
Relations []DCTXRelation `xml:"Relation,omitempty"`
|
||||
}
|
||||
|
||||
// DCTXTable represents a table definition in DCTX
|
||||
// DCTXTable represents a table definition in DCTX format.
|
||||
type DCTXTable struct {
|
||||
Guid string `xml:"Guid,attr"`
|
||||
Name string `xml:"Name,attr"`
|
||||
@@ -25,7 +31,8 @@ type DCTXTable struct {
|
||||
Options []DCTXOption `xml:"Option,omitempty"`
|
||||
}
|
||||
|
||||
// DCTXField represents a field/column definition in DCTX
|
||||
// DCTXField represents a field/column definition in DCTX format.
|
||||
// Fields can be nested for GROUP structures.
|
||||
type DCTXField struct {
|
||||
Guid string `xml:"Guid,attr"`
|
||||
Name string `xml:"Name,attr"`
|
||||
@@ -37,7 +44,7 @@ type DCTXField struct {
|
||||
Options []DCTXOption `xml:"Option,omitempty"`
|
||||
}
|
||||
|
||||
// DCTXKey represents an index or key definition in DCTX
|
||||
// DCTXKey represents an index or key definition in DCTX format.
|
||||
type DCTXKey struct {
|
||||
Guid string `xml:"Guid,attr"`
|
||||
Name string `xml:"Name,attr"`
|
||||
@@ -49,7 +56,7 @@ type DCTXKey struct {
|
||||
Components []DCTXComponent `xml:"Component"`
|
||||
}
|
||||
|
||||
// DCTXComponent represents a component of a key (field reference)
|
||||
// DCTXComponent represents a component of a key, referencing a field in the index.
|
||||
type DCTXComponent struct {
|
||||
Guid string `xml:"Guid,attr"`
|
||||
FieldId string `xml:"FieldId,attr,omitempty"`
|
||||
@@ -57,14 +64,14 @@ type DCTXComponent struct {
|
||||
Ascend bool `xml:"Ascend,attr,omitempty"`
|
||||
}
|
||||
|
||||
// DCTXOption represents a property option in DCTX
|
||||
// DCTXOption represents a property option in DCTX format for metadata storage.
|
||||
type DCTXOption struct {
|
||||
Property string `xml:"Property,attr"`
|
||||
PropertyType string `xml:"PropertyType,attr,omitempty"`
|
||||
PropertyValue string `xml:"PropertyValue,attr"`
|
||||
}
|
||||
|
||||
// DCTXRelation represents a relationship/foreign key in DCTX
|
||||
// DCTXRelation represents a relationship/foreign key in DCTX format.
|
||||
type DCTXRelation struct {
|
||||
Guid string `xml:"Guid,attr"`
|
||||
PrimaryTable string `xml:"PrimaryTable,attr"`
|
||||
@@ -77,7 +84,7 @@ type DCTXRelation struct {
|
||||
PrimaryMappings []DCTXFieldMapping `xml:"PrimaryMapping,omitempty"`
|
||||
}
|
||||
|
||||
// DCTXFieldMapping represents a field mapping in a relation
|
||||
// DCTXFieldMapping represents a field mapping in a relation for multi-column foreign keys.
|
||||
type DCTXFieldMapping struct {
|
||||
Guid string `xml:"Guid,attr"`
|
||||
Field string `xml:"Field,attr"`
|
||||
|
||||
Reference in New Issue
Block a user