Interface Table<R extends Table.Row>

  • Type Parameters:
    R - The row type this table uses
    All Known Implementing Classes:
    PGTypeTable

    public interface Table<R extends Table.Row>
    A system table object. Providing a POJO type for the row and some matching SQL and a list of instances can be fetched from the database with no other work. This is used for system queries.
    • Method Detail

      • getSQL

        java.lang.String getSQL​(Version currentVersion)
        Returns the SQL that is needed to load all rows of this table.
        Parameters:
        currentVersion - Current version of the server that will execute it
        Returns:
        SQL text of the query
      • createRow

        R createRow​(Context context,
                    ResultBatch resultBatch,
                    int rowIdx)
             throws java.io.IOException
        Creates and instance of the row type of this table.
        Returns:
        An instance of the table's row type
        Throws:
        java.io.IOException
      • query

        default java.util.List<R> query​(BasicContext context,
                                        java.lang.String queryTxt,
                                        long timeout,
                                        java.lang.Object... params)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • getFieldOfRow

        static <T> T getFieldOfRow​(ResultBatch resultBatch,
                                   int rowIdx,
                                   int fieldIdx,
                                   Context context,
                                   java.lang.Class<T> targetType)
                            throws java.io.IOException
        Throws:
        java.io.IOException