Table
Monstarillo table
Table Info
TableName
(string): The name of the database table.DatabaseType
(string): The type of the database (e.g., MySQL, PostgreSQL).Columns
([]Column): A list ofColumn
objects representing the table’s columns.ForeignKeys
([]ForeignKey): A list ofForeignKey
objects representing foreign keys.ReferencedForeignKeys
([]ForeignKey): A list of foreign keys that reference this table.GuiListTable
(GuiListTable): Metadata for GUI-related functionality.
Column Management
GetPrimaryColumnJavaTypesAndVariables
Returns a string containing the primary key columns with their Java data types and camel-case variable names.GetPrimaryColumnVariables
Returns a string containing the camel-case variable names of the primary key columns.GetFirstPrimaryColumn
Returns the first primary column in the table.HasCompositePrimaryKey
Returnstrue
if the table has more than one primary key (composite primary key).GetNullableColumns
Returns a list of columns that are marked as nullable.
JavaScript Related
HasJavascriptStringColumn
Returnstrue
if any column in the table maps to aString
in JavaScript.HasJavascriptNumberColumn
Returnstrue
if any column in the table maps to aNumber
in JavaScript.
Java & C# Related
HasJavaTypeColumn
Returnstrue
if any column in the table matches the specified Java data type.GetJavaFirstPrimaryUnitTestValue
Returns the first unit test value for the table’s primary key in Java.GetJavaSecondPrimaryUnitTestValue
Returns the second unit test value for the table’s primary key in Java.GetCSharpFirstPrimaryUnitTestValue
Returns the first unit test value for the table’s primary key in C#.GetCSharpSecondPrimaryUnitTestValue
Returns the second unit test value for the table’s primary key in C#.GetColumnListWithCSharpTypes
Returns a formatted string of column names and their C# data types, separated by commas.
Foreign Key Management
GetFkTableNameForColumn
Returns the name of the table referenced by the foreign key for the specified column.
Auto Increment & Date Columns
HasAutoIncrementColumn
Returnstrue
if any column in the table is auto-incremented.HasAnyDateColumn
Returnstrue
if the table has any column with adate
,datetime
,year
, ortimestamp
data type.HasDateColumn
Returnstrue
if the table has a column with adate
data type.HasYearColumn
Returnstrue
if the table has a column with ayear
data type.HasDateTimeColumn
Returnstrue
if the table has a column with adatetime
data type.HasTimestampColumn
Returnstrue
if the table has a column with atimestamp
data type.
Naming Conventions
GetCamelCaseTableName
Returns the table name in camelCase.GetCamelCaseTableNamePlural
Returns the table name in plural form in camelCase, using a pluralization client.GetPascalCaseTableName
Returns the table name in PascalCase.GetPascalCaseTableNamePlural
Returns the table name in plural form in PascalCase, using a pluralization client.GetCamelCaseTableNameEF
Returns the table name in singular form in camelCase, used for Entity Framework (EF).GetPascalCaseTableNameEF
Returns the table name in singular form in PascalCase, used for Entity Framework (EF).