primaryKey
Returns the value of the
primaryKey record component.- Returns:
- the value of the
primaryKeyrecord component
name - the table nameprimaryKey - the primary key definition, may be null if no primary key existscolumns - the list of all columns in this tableforeignKeys - the list of foreign key relationships from this table to othersThis immutable record encapsulates all metadata for a single database table, including its columns, primary key, and foreign key relationships. It provides utility methods for generating SQL statements and filtering columns based on their characteristics.
Tables are typically discovered through database metadata analysis and are
used by TableFiller to generate appropriate data for each column.
Table(String name,
PrimaryKey primaryKey,
List<Column> columns,
List<ForeignKey> foreignKeys) Table record class.columns()columns record component.final booleanfindColumn(String name) foreignKeys record component.final inthashCode()name()name record component.primaryKey record component.final StringtoString()Table record class.name - the value for the name record componentprimaryKey - the value for the primaryKey record componentcolumns - the value for the columns record componentforeignKeys - the value for the foreignKeys record componentCreates a parameterized INSERT statement using question mark placeholders for all non-auto-increment columns. Auto-increment columns are excluded as they are populated automatically by the database.
Objects::equals(Object,Object).primaryKey record component.primaryKey record componentforeignKeys record component.foreignKeys record component