Record Class DataSourceController.TableRow

java.lang.Object
java.lang.Record
io.micronaut.controlpanel.panels.datasource.DataSourceController.TableRow
Record Components:
schema - Table schema
name - Table name
defaultSchema - Whether the table uses the default schema label
columnCount - Number of columns
relationshipCount - Number of foreign-key relationships
selectAllSql - SQL query that selects all rows from the table
jsonQuerySql - SQL query that selects rows as JSON, if supported
relationshipJsonSql - SQL query that selects rows as JSON with relationships, if supported
Enclosing class:
DataSourceController

public static record DataSourceController.TableRow(String schema, String name, boolean defaultSchema, int columnCount, int relationshipCount, String selectAllSql, @Nullable String jsonQuerySql, @Nullable String relationshipJsonSql) extends Record
View model for a datasource table row.
Since:
2.0.0
Author:
Álvaro Sánchez-Mariscal
  • Constructor Details

    • TableRow

      public TableRow(String schema, String name, boolean defaultSchema, int columnCount, int relationshipCount, String selectAllSql, @Nullable String jsonQuerySql, @Nullable String relationshipJsonSql)
      Creates an instance of a TableRow record class.
      Parameters:
      schema - the value for the schema record component
      name - the value for the name record component
      defaultSchema - the value for the defaultSchema record component
      columnCount - the value for the columnCount record component
      relationshipCount - the value for the relationshipCount record component
      selectAllSql - the value for the selectAllSql record component
      jsonQuerySql - the value for the jsonQuerySql record component
      relationshipJsonSql - the value for the relationshipJsonSql record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • schema

      public String schema()
      Returns the value of the schema record component.
      Returns:
      the value of the schema record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • defaultSchema

      public boolean defaultSchema()
      Returns the value of the defaultSchema record component.
      Returns:
      the value of the defaultSchema record component
    • columnCount

      public int columnCount()
      Returns the value of the columnCount record component.
      Returns:
      the value of the columnCount record component
    • relationshipCount

      public int relationshipCount()
      Returns the value of the relationshipCount record component.
      Returns:
      the value of the relationshipCount record component
    • selectAllSql

      public String selectAllSql()
      Returns the value of the selectAllSql record component.
      Returns:
      the value of the selectAllSql record component
    • jsonQuerySql

      public @Nullable String jsonQuerySql()
      Returns the value of the jsonQuerySql record component.
      Returns:
      the value of the jsonQuerySql record component
    • relationshipJsonSql

      public @Nullable String relationshipJsonSql()
      Returns the value of the relationshipJsonSql record component.
      Returns:
      the value of the relationshipJsonSql record component