Foreign Key
Structs¶
None
ForeignKey¶
Represents the structure of a foreign key relationship in a database.
Fields:¶
- ConstraintName (string): The name of the foreign key constraint.
- FkTableName (string): The name of the foreign key table.
- FkColumnName (string): The name of the foreign key column.
- PkTableName (string): The name of the primary key table.
- PkColumnName (string): The name of the primary key column.
- Relation (string): The type of the relationship.
- FkColumn (Column): The foreign key column details.
- PkColumn (Column): The primary key column details.
Functions¶
GetFkTableNameInCase¶
Formats the foreign key table name into the specified case style (e.g., camel, pascal, snake, kebab).
Parameters:¶
- caseToReturn (string): The desired case style.
Returns:¶
- (string): The foreign key table name in the specified case.
GetFkColumnNameInCase¶
Formats the foreign key column name into the specified case style.
Parameters:¶
- caseToReturn (string): The desired case style.
Returns:¶
- (string): The foreign key column name in the specified case.
GetPkColumnNameInCase¶
Formats the primary key column name into the specified case style.
Parameters:¶
- caseToReturn (string): The desired case style.
Returns:¶
- (string): The primary key column name in the specified case.
GetCamelCaseFKTableName¶
Returns the foreign key table name in camel case format.
Returns:¶
- (string): The camel case formatted foreign key table name.
GetPascalCaseFKTableName¶
Returns the foreign key table name in PascalCase format.
Returns:¶
- (string): The PascalCase formatted foreign key table name.
GetCamelCaseFKColumnName¶
Returns the foreign key column name in camel case format.
Returns:¶
- (string): The camel case formatted foreign key column name.
GetPascalCaseFKColumnName¶
Returns the foreign key column name in PascalCase format.
Returns:¶
- (string): The PascalCase formatted foreign key column name.
GetCamelCasePKTableName¶
Returns the primary key table name in camel case format.
Returns:¶
- (string): The camel case formatted primary key table name.
GetPascalCasePKTableName¶
Returns the primary key table name in PascalCase format.
Returns:¶
- (string): The PascalCase formatted primary key table name.
GetCamelCasePKColumnName¶
Returns the primary key column name in camel case format.
Returns:¶
- (string): The camel case formatted primary key column name.
GetPascalCasePKColumnName¶
Returns the primary key column name in PascalCase format.
Returns:¶
- (string): The PascalCase formatted primary key column name.
GetCamelCaseFKTableNamePlural¶
Returns the camel case foreign key table name in plural form. Handles names ending in "s" properly.
Returns:¶
- (string): The pluralized camel case foreign key table name.
GetFKTableNamePluralInCase¶
Returns the foreign key table name in plural form and PascalCase format.
Returns:¶
- (string): The pluralized PascalCase foreign key table name.
GetPascalCaseFKTableNamePlural¶
Formats the foreign key table name to plural form and specified case (e.g., PascalCase).
Parameters:¶
- caseToReturn (string): The desired case style to apply.
Returns:¶
- (string): The pluralized foreign key table name in specified case format.
GetCamelCasePKTableNamePlural¶
Returns the camel case primary key table name in plural form.
Returns:¶
- (string): The pluralized camel case primary key table name.
GetPascalCasePKTableNamePlural¶
Returns the PascalCase primary key table name in plural form.
Returns:¶
- (string): The pluralized PascalCase primary key table name.