Column
Monstarillo colum
Column & Table Info
ColumnName
(string): The name of the column.DataType
(string): The data type of the column.DatabaseType
(string): The type of database (e.g., MySQL, PostgreSQL).TableName
(string): The name of the table the column belongs to.PkTableName
(string): The name of the primary key table if the column is a foreign key.PkColumnName
(string): The name of the primary key column if the column is a foreign key.IsPrimaryKey
(bool): Whether the column is a primary key.IsNullable
(bool): Whether the column allows null values.IsAutoIncrement
(bool): Whether the column is auto-incremented.IsForeignKey
(bool): Whether the column is a foreign key.OrdinalPosition
(int): The position of the column in the table.NumericPrecision
(int): The numeric precision for numeric types.NumericScale
(int): The numeric scale for numeric types.CharacterMaximumLength
(int): The maximum character length for string types.
Naming Convention Methods
GetCamelCaseColumnName
: Converts the column name to camelCase.GetTitleCaseColumnName
: Converts the column name to Title Case.GetPascalCaseColumnName
: Converts the column name to PascalCase.GetPascalCaseTableName
: Converts the table name to PascalCase.GetTitleCaseTableName
: Converts the table name to Title Case.
JavaScript Data Type Methods
GetJavascriptDataType
: Returns the JavaScript data type based on the column’s data type and database type.GetJavascriptDefaultValue
: Returns the default JavaScript value for the column based on its data type.
Java Data Type Methods
GetJavaDataType
: Returns the Java data type for the column based on its database type.
Go Data Type Methods
GetGoDataType
: Returns the Go data type for the column based on its database type.IsGoIntFamilyType
: Determines if the column’s Go data type belongs to the integer family.
C# Data Type Methods
GetCSharpDataType
: Returns the C# data type for the column.GetAspNetRouteConstraintType
: Returns the ASP.NET route constraint type for the column.
Unit Test Value Methods
GetCSharpFirstUnitTestValueFromFile
: Returns the first unit test value for C# from a file.GetJavaFirstUnitTestValueFromFile
: Returns the first unit test value for Java from a file.GetCSharpSecondUnitTestValueFromFile
: Returns the second unit test value for C# from a file.GetJavaSecondUnitTestValueFromFile
: Returns the second unit test value for Java from a file.
Miscellaneous Methods
IsBinary
: Returnstrue
if the column is binary (e.g.,byte[]
in Java).GetSetString
: Returns a string representation for setting the column’s value.GetSetStringJson
: Returns a string representation for setting the column’s JSON value.