TableInspector GitHub

📊 Overview: 1 Constructor 14 Functions

📝 Description

Parse 4D catalog.4DCatalog file and extract table metadata for documentation

🕐 Last updated: 2025-11-14T16:53:01.518Z


📑 Table of Contents


Constructor

constructor

[🏗️ constructor]

Class constructor($TableName : Text)

Parse 4D catalog.4DCatalog file and extract table metadata for documentation

Parameters:

Name Type Optional Description
$TableName Text - -

Functions

Regular Functions

_parseCatalog

Function _parseCatalog

Parse the catalog.4DCatalog XML file to extract table information


_parseTableAttributes

Function _parseTableAttributes($Line : Text)

Extract UUID

Parameters:

Name Type Optional Description
$Line Text - -

_parseField

Function _parseField($Line : Text) -> Object

Parse field from XML line

Parameters:

Name Type Optional Description
$Line Text - -

Returns: Object


_parseFieldExtra

Function _parseFieldExtra($Field : Object; $Line : Text)

Parse field_extra attributes

Parameters:

Name Type Optional Description
$Field Object - -
$Line Text - -

_parsePrimaryKey

Function _parsePrimaryKey($Line : Text)

Parse primary key

Parameters:

Name Type Optional Description
$Line Text - -

_parseIndex

Function _parseIndex($Lines : Collection; $Line : Text)

Check if this index references our table

Parameters:

Name Type Optional Description
$Lines Collection - -
$Line Text - -

_parseRelation

Function _parseRelation($Lines : Collection; $Line : Text)

Parse relation definition

Parameters:

Name Type Optional Description
$Lines Collection - -
$Line Text - -

_getTypeName

Function _getTypeName($TypeCode : Text) -> Text

Get human-readable type name from type code

Parameters:

Name Type Optional Description
$TypeCode Text - -

Returns: Text


_getIndexTypeName

Function _getIndexTypeName($TypeCode : Text) -> Text

Get human-readable index type name

Parameters:

Name Type Optional Description
$TypeCode Text - -

Returns: Text


_getRelationStateName

Function _getRelationStateName($StateCode : Text) -> Text

Get human-readable relation state name

Parameters:

Name Type Optional Description
$StateCode Text - -

Returns: Text


_mergeExistingComments

Function _mergeExistingComments

Merge table comment


toObject

Function toObject -> Object

Convert to object for JSON export

Returns: Object


toJSON

Function toJSON -> Text

Convert to JSON string

Returns: Text


saveToFile

Function saveToFile

Save to JSON file



Generated from TableInspector.4dm