ERD family
API reference for Beep.Skia.ERD (15 public types)
Complete API surface of the Beep.Skia.ERD assembly: 15 public types with their documented members. Follow the family guide for usage patterns.
Types in this assembly
ColumnInfoclassConstraintInfoclassDDLExporterclassDDLImporterclassERDAttributeclassERDControlclassERDEntityclassERDRelationshipclassMigrationScriptGeneratorclassSchemaChangeclassSchemaChangeKindenumSchemaComparerclassSchemaComparisonResultclassSQLDialectenumTableInfoclass
ColumnInfo (class)
ConstraintInfo (class)
DDLExporter (class)
Exports ERD entities and relationships to DDL (Data Definition Language) statements. Supports standard SQL with basic dialect hints.
| Member | Kind | Description |
|---|---|---|
DDLExporter(SQLDialect dialect = SQLDialect.ANSI) | Method | Initializes a new instance of the DDLExporter class. |
string ExportEntity(ERDEntity entity) | Method | Exports a single ERDEntity to a CREATE TABLE statement. |
string ExportEntities(IEnumerable<ERDEntity> entities) | Method | Exports multiple entities to a complete DDL script. |
DDLImporter (class)
Parses SQL CREATE TABLE statements into entity definitions. Dialect-aware parsing for SQL Server, PostgreSQL, MySQL, Oracle, and SQLite.
| Member | Kind | Description |
|---|---|---|
DDLImporter(SQLDialect dialect = SQLDialect.ANSI) { _dialect = dialect; } | Method | Initializes a new instance of the DDLImporter class. |
List<TableInfo> Parse(string ddl) | Method | Parses DDL and returns table definitions. |
List<ERDEntity> ImportToEntities(string ddl, SQLDialect dialect) | Method | Creates ERDEntity instances from a DDL string. |
ERDAttribute (class)
ERD Attribute: ellipse with optional underline (for key) and double ellipse (for multivalued).
| Member | Kind | Description |
|---|---|---|
string NameText | Property | Gets or sets the name text. |
bool IsKey | Property | Gets or sets the is key. |
bool IsMultivalued | Property | Gets or sets the is multivalued. |
ERDAttribute() | Method | Initializes a new instance of the ERDAttribute class. |
ERDControl (class)
Base class for ERD nodes (entities, relationships, attributes). Inherits MaterialControl; provides common sizing and port layout helpers.
| Member | Kind | Description |
|---|---|---|
int InPortCount | Property | Gets or sets the in port count. |
int OutPortCount | Property | Gets or sets the out port count. |
ERDEntity (class)
ERD Entity: rectangle with title band and attribute list area.
| Member | Kind | Description |
|---|---|---|
string EntityName | Property | Entity name/title |
string RowsText | Property | One row name per line or comma-separated |
IReadOnlyList<string> Rows | Property | Gets or sets the rows. |
string RowIdsCsv | Property | Gets or sets the row ids csv. |
ERDEntity() | Method | Initializes a new instance of the ERDEntity class. |
new int InPortCount | Property | Gets or sets the in port count. |
new int OutPortCount | Property | Gets or sets the out port count. |
string Columns | Property | Public JSON property exposing columns in a structured form for enterprise editors. On set, updates the internal rows and connection points. |
string Indexes | Property | Public JSON property exposing table indexes. Mirrors NodeProperties["Indexes"]. |
string ForeignKeys | Property | Public JSON property exposing foreign keys. Mirrors NodeProperties["ForeignKeys"]. |
static ERDEntity FromTableInfo(DDLImporter.TableInfo table) | Method | Creates an ERDEntity from a parsed DDL table definition. |
ERDRelationship (class)
ERD Relationship: diamond shape with ports on left/right, optional degree text.
| Member | Kind | Description |
|---|---|---|
string Label | Property | Gets or sets the label. |
string Degree | Property | Gets or sets the degree. |
bool Identifying | Property | Gets or sets the identifying. |
ERDRelationship() | Method | Initializes a new instance of the ERDRelationship class. |
MigrationScriptGenerator (class)
Generates forward and rollback migration scripts from a SchemaComparisonResult. Dialect-aware DDL for SQL Server, PostgreSQL, MySQL, Oracle, SQLite, and ANSI.
| Member | Kind | Description |
|---|---|---|
string GenerateForward(SchemaComparisonResult diff, DDLImporter.SQLDialect dialect = DDLImporter.SQLDialect.ANSI) | Method | Generates the script that migrates the source schema to the target schema. |
string GenerateRollback(SchemaComparisonResult diff, DDLImporter.SQLDialect dialect = DDLImporter.SQLDialect.ANSI) | Method | Generates the script that reverses GenerateForward (target -> source). |
SchemaChange (class)
A single schema difference. For altered columns, Column is the target definition and PreviousColumn is the source definition (used to build rollback scripts).
| Member | Kind | Description |
|---|---|---|
SchemaChangeKind Kind | Property | Gets or sets the kind. |
string TableName | Property | Gets or sets the table name. |
DDLImporter.ColumnInfo? Column | Property | Gets or sets the column. |
DDLImporter.ColumnInfo? PreviousColumn | Property | Gets or sets the previous column. |
DDLImporter.ConstraintInfo? Constraint | Property | Gets or sets the constraint. |
DDLImporter.TableInfo? Table | Property | Gets or sets the table. |
DDLImporter.TableInfo? PreviousTable | Property | Gets or sets the previous table. |
override string ToString() | Method | Gets or sets the to string. |
SchemaChangeKind (enum)
Kind of schema change detected between a source (current) and target (desired) schema.
SchemaComparer (class)
Compares a source schema against a target schema and reports the changes needed to migrate source to target. Tables/columns are matched case-insensitively.
| Member | Kind | Description |
|---|---|---|
SchemaComparisonResult Compare( IEnumerable<DDLImporter.TableInfo> source, IEnumerable<DDLImporter.TableInfo> target) | Method | Gets or sets the compare. |
SchemaComparisonResult (class)
Result of comparing two schemas.
| Member | Kind | Description |
|---|---|---|
List<SchemaChange> Changes | Property | Gets or sets the changes. |
bool HasChanges | Property | Gets or sets the has changes. |
IEnumerable<SchemaChange> OfKind(SchemaChangeKind kind) | Method | Gets or sets the of kind. |
string Summary() | Method | Human-readable one-line-per-change summary. |