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 of Column objects representing the table’s columns.
  • ForeignKeys ([]ForeignKey): A list of ForeignKey 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 Returns true if the table has more than one primary key (composite primary key).

  • GetNullableColumns Returns a list of columns that are marked as nullable.

  • HasJavascriptStringColumn Returns true if any column in the table maps to a String in JavaScript.

  • HasJavascriptNumberColumn Returns true if any column in the table maps to a Number in JavaScript.

  • HasJavaTypeColumn Returns true 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 Returns true if any column in the table is auto-incremented.

  • HasAnyDateColumn Returns true if the table has any column with a date, datetime, year, or timestamp data type.

  • HasDateColumn Returns true if the table has a column with a date data type.

  • HasYearColumn Returns true if the table has a column with a year data type.

  • HasDateTimeColumn Returns true if the table has a column with a datetime data type.

  • HasTimestampColumn Returns true if the table has a column with a timestamp 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).