Class PgxFrame

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public abstract class PgxFrame
    extends java.lang.Object
    implements java.lang.AutoCloseable
    • Constructor Detail

      • PgxFrame

        public PgxFrame()
    • Method Detail

      • getColumnDescriptors

        public ColumnDescriptor[] getColumnDescriptors()
        Returns a list containing the description of the different columns of the frames.
        Returns:
        a list of column descriptions
      • getColumn

        public abstract PgxFrameColumn getColumn​(java.lang.String columnName)
        Returns the column of the frame that has the given name
        Parameters:
        columnName - the name of the column to get back
        Returns:
        a handle on the column of the frame with the given name
      • selectAsync

        public PgxFuture<PgxFrame> selectAsync​(java.lang.String... columns)
        Returns a new PgxFrame that contains only the specified columns
        Parameters:
        columns - the list of columns to keep in the new PgxFrame
        Returns:
        a future on the new PgxFrame with the specified columns
      • selectInPlaceAsync

        public PgxFuture<PgxFrame> selectInPlaceAsync​(java.lang.String... columns)
        Modifies the PgxFrame to contain only the specified columns
        Parameters:
        columns - the list of columns to keep in the new PgxFrame
        Returns:
        a future on the modified PgxFrame with the specified columns
      • select

        public PgxFrame select​(java.lang.String... columns)
                        throws java.lang.InterruptedException,
                               java.util.concurrent.ExecutionException
        Returns a new PgxFrame that contains only the specified columns Blocking version of selectAsync(String...). Calls selectAsync(String...) and waits for the returned PgxFuture to complete.
        Parameters:
        columns - the list of columns to keep in the new PgxFrame
        Returns:
        a new PgxFrame with the specified columns
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • selectInPlace

        public PgxFrame selectInPlace​(java.lang.String... columns)
                               throws java.lang.InterruptedException,
                                      java.util.concurrent.ExecutionException
        Modifies the PgxFrame to contain only the specified columns Blocking version of selectInPlaceAsync(String...). Calls selectInPlaceAsync(String...) and waits for the returned PgxFuture to complete.
        Parameters:
        columns - the list of columns to keep in the new PgxFrame
        Returns:
        the modified PgxFrame with the specified columns
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • renameColumnsAsync

        public PgxFuture<PgxFrame> renameColumnsAsync​(ColumnRenaming... columnsWithRenamings)
        Returns a new PgxFrame in which the specified columns are renamed as specified
        Parameters:
        columnsWithRenamings - the list of columns to rename and their new names
        Returns:
        a future on the new PgxFrame
      • renameColumnsInPlaceAsync

        public PgxFuture<PgxFrame> renameColumnsInPlaceAsync​(ColumnRenaming... columnsWithRenamings)
        Modifies the PgxFrame to rename the specified columns as specified
        Parameters:
        columnsWithRenamings - the list of columns to rename and their new names
        Returns:
        a future on the modified PgxFrame
      • renameColumns

        public PgxFrame renameColumns​(ColumnRenaming... columnsWithRenamings)
                               throws java.lang.InterruptedException,
                                      java.util.concurrent.ExecutionException
        Returns a new PgxFrame in which the specified columns are renamed as specified Blocking version of renameColumnsAsync(ColumnRenaming...). Calls renameColumnsAsync(ColumnRenaming...) and waits for the returned PgxFuture to complete.
        Parameters:
        columnsWithRenamings - the list of columns to rename and their new names
        Returns:
        a new PgxFrame with all the columns of the original frame renamed for the ones that have to be
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • renameColumnsInPlace

        public PgxFrame renameColumnsInPlace​(ColumnRenaming... columnsWithRenamings)
                                      throws java.lang.InterruptedException,
                                             java.util.concurrent.ExecutionException
        Modifies the PgxFrame to rename the specified columns as specified Blocking version of renameColumnsInPlaceAsync(ColumnRenaming...). Calls renameColumnsInPlaceAsync(ColumnRenaming...) and waits for the returned PgxFuture to complete.
        Parameters:
        columnsWithRenamings - the list of columns to rename and their new names
        Returns:
        the PgxFrame with all the columns of the original frame renamed for the ones that have to be
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • renameColumnAsync

        public PgxFuture<PgxFrame> renameColumnAsync​(java.lang.String oldColumnName,
                                                     java.lang.String newColumnName)
        Returns a new PgxFrame in which the specified column is renamed as specified
        Parameters:
        oldColumnName - the name of the column to rename
        newColumnName - the name of the column in the new frame
        Returns:
        a future on the new PgxFrame
      • renameColumnInPlaceAsync

        public PgxFuture<PgxFrame> renameColumnInPlaceAsync​(java.lang.String oldColumnName,
                                                            java.lang.String newColumnName)
        Modifies the PgxFrame by renaming the specified column is renamed as specified
        Parameters:
        oldColumnName - the name of the column to rename
        newColumnName - the name of the column in the new frame
        Returns:
        the future on the modified frame
      • renameColumn

        public PgxFrame renameColumn​(java.lang.String oldColumnName,
                                     java.lang.String newColumnName)
                              throws java.lang.InterruptedException,
                                     java.util.concurrent.ExecutionException
        Returns a new PgxFrame in which the specified column is renamed as specified Blocking version of renameColumnAsync(String, String). Calls renameColumnAsync(String, String) and waits for the returned PgxFuture to complete.
        Parameters:
        oldColumnName - the name of the column to rename
        newColumnName - the name of the column in the new frame
        Returns:
        a new PgxFrame with all the columns of the original frame renamed for the one that has to be
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • renameColumnInPlace

        public PgxFrame renameColumnInPlace​(java.lang.String oldColumnName,
                                            java.lang.String newColumnName)
                                     throws java.lang.InterruptedException,
                                            java.util.concurrent.ExecutionException
        Modifies the PgxFrame by renaming the specified column is renamed as specified Blocking version of renameColumnInPlaceAsync(String, String). Calls renameColumnInPlaceAsync(String, String) and waits for the returned PgxFuture to complete.
        Parameters:
        oldColumnName - the name of the column to rename
        newColumnName - the name of the column in the new frame
        Returns:
        the PgxFrame with all the columns of the original frame renamed for the one that has to be
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • flattenAsync

        public PgxFuture<PgxFrame> flattenAsync​(java.lang.String... columns)
        Create a new PgxFrame with the specified nested columns and vector columns flattened into multiple columns.
        Returns:
        the future on the new frame with the columns flattened
      • flattenInPlaceAsync

        public PgxFuture<PgxFrame> flattenInPlaceAsync​(java.lang.String... columns)
        Modifies the PgxFrame by flattening all the specified columns and vector columns into multiple columns.
        Returns:
        the future on the frame with the columns flattened
      • flatten

        public PgxFrame flatten​(java.lang.String... columns)
                         throws java.lang.InterruptedException,
                                java.util.concurrent.ExecutionException
        Create a new PgxFrame with all the specified columns and vector columns flattened into multiple columns. Blocking version of flattenAllAsync(). Calls flattenAllAsync() and waits for the returned PgxFuture to complete.
        Returns:
        a new frame with the columns flattened
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • flattenInPlace

        public PgxFrame flattenInPlace​(java.lang.String... columns)
                                throws java.lang.InterruptedException,
                                       java.util.concurrent.ExecutionException
        Modifies the PgxFrame by flattening all the specified columns and vector columns into multiple columns. Blocking version of flattenAllInPlaceAsync(). Calls flattenAllInPlaceAsync() and waits for the returned PgxFuture to complete.
        Returns:
        the frame with the columns flattened
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • flattenAllAsync

        public PgxFuture<PgxFrame> flattenAllAsync()
        Create a new PgxFrame with all nested columns and vector columns flattened into multiple columns.
        Returns:
        the future on the new frame with the columns flattened
      • flattenAllInPlaceAsync

        public PgxFuture<PgxFrame> flattenAllInPlaceAsync()
        Modifies the PgxFrame by flattening all nested columns and vector columns into multiple columns.
        Returns:
        the future on the frame with the columns flattened
      • flattenAll

        public PgxFrame flattenAll()
                            throws java.lang.InterruptedException,
                                   java.util.concurrent.ExecutionException
        Create a new PgxFrame with all nested columns and vector columns flattened into multiple columns. Blocking version of flattenAllAsync(). Calls flattenAllAsync() and waits for the returned PgxFuture to complete.
        Returns:
        a new frame with the columns flattened
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • flattenAllInPlace

        public PgxFrame flattenAllInPlace()
                                   throws java.lang.InterruptedException,
                                          java.util.concurrent.ExecutionException
        Modifies the PgxFrame by flattening all nested columns and vector columns into multiple columns. Blocking version of flattenAllInPlaceAsync(). Calls flattenAllInPlaceAsync() and waits for the returned PgxFuture to complete.
        Returns:
        the frame with the columns flattened
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • headAsync

        public PgxFuture<PgxFrame> headAsync​(long numRows)
        Extracts the numRows first rows of the frame and put them in a new frame
        Parameters:
        numRows - the number of rows to extract from the top
        Returns:
        a future on the frame that contains the top rows
      • headAsync

        public PgxFuture<PgxFrame> headAsync()
        Extracts the headInPlace(long) first rows of the frame and put them in a new frame
        Returns:
        a future on the frame that contains the top rows
      • headInPlaceAsync

        public PgxFuture<PgxFrame> headInPlaceAsync​(long numRows)
        Modifies the frame to only keep the first numRows rows in the frame
        Parameters:
        numRows - the number of rows to keep from the top
        Returns:
        a future on the from that contains the top rows
      • headInPlaceAsync

        public PgxFuture<PgxFrame> headInPlaceAsync()
        Modifies the frame to only keep the first headInPlace(long) rows in the frame
        Returns:
        a future on the from that contains the top rows
      • head

        public PgxFrame head​(long numRows)
                      throws java.lang.InterruptedException,
                             java.util.concurrent.ExecutionException
        Extracts the numRows first rows of the frame and put them in a new frame Blocking version of head(long). Calls head(long) and waits for the returned PgxFuture to complete.
        Parameters:
        numRows - the number of rows to extract from the top
        Returns:
        the frame that contains the top rows
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • head

        public PgxFrame head()
                      throws java.lang.InterruptedException,
                             java.util.concurrent.ExecutionException
        Extracts the headInPlace(long) first rows of the frame and put them in a new frame Blocking version of head(long). Calls head(long) and waits for the returned PgxFuture to complete.
        Returns:
        the frame that contains the top rows
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • headInPlace

        public PgxFrame headInPlace​(long numRows)
                             throws java.lang.InterruptedException,
                                    java.util.concurrent.ExecutionException
        Keeps only the first numRows rows in the frame Blocking version of headInPlace(long). Calls headInPlace(long) and waits for the returned PgxFuture to complete.
        Parameters:
        numRows - the number of rows to keep from the top
        Returns:
        this frame, after modification
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • headInPlace

        public PgxFrame headInPlace()
                             throws java.lang.InterruptedException,
                                    java.util.concurrent.ExecutionException
        Keeps only the first DEFAULT_LIMIT rows in the frame Blocking version of headInPlace(). Calls headInPlace() and waits for the returned PgxFuture to complete.
        Returns:
        this frame, after modification
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • tailAsync

        public PgxFuture<PgxFrame> tailAsync​(long numRows)
        Extracts the numRows last rows of the frame and put them in a new frame
        Parameters:
        numRows - the number of rows to extract from the bottom
        Returns:
        a future on the frame that contains the bottom rows
      • tailAsync

        public PgxFuture<PgxFrame> tailAsync()
        Extracts the last DEFAULT_LIMIT rows of the frame and put them in a new frame
        Returns:
        a future on the frame that contains the bottom rows
      • tailInPlaceAsync

        public PgxFuture<PgxFrame> tailInPlaceAsync​(long numRows)
        Modifies the frame to keep the last numRows rows of the frame
        Parameters:
        numRows - the number of rows to extract from the bottom
        Returns:
        a future on the frame after modification
      • tailInPlaceAsync

        public PgxFuture<PgxFrame> tailInPlaceAsync()
        Modifies the frame to keep the last DEFAULT_LIMIT rows of the frame
        Returns:
        a future on the frame after modification
      • tail

        public PgxFrame tail​(long numRows)
                      throws java.lang.InterruptedException,
                             java.util.concurrent.ExecutionException
        Extracts the numRows last rows of the frame and put them in a new frame
        Parameters:
        numRows - the number of rows to extract from the bottom
        Returns:
        the frame that contains the bottom rows
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • tail

        public PgxFrame tail()
                      throws java.lang.InterruptedException,
                             java.util.concurrent.ExecutionException
        Extracts the last DEFAULT_LIMIT rows of the frame into a new frame. Blocking version of tail(). Calls tailAsync() and waits for the returned PgxFuture to complete.
        Returns:
        the frame after modification
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • tailInPlace

        public PgxFrame tailInPlace​(long numRows)
                             throws java.lang.InterruptedException,
                                    java.util.concurrent.ExecutionException
        Modifies the frame to keep the last DEFAULT_LIMIT rows of the frame. Blocking version of tailInPlace(long). Calls tailInPlaceAsync(long) and waits for the returned PgxFuture to complete.
        Parameters:
        numRows - the number of rows to extract from the bottom
        Returns:
        the frame after modification
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • tailInPlace

        public PgxFrame tailInPlace()
                             throws java.lang.InterruptedException,
                                    java.util.concurrent.ExecutionException
        Modifies the frame to keep the last DEFAULT_LIMIT rows of the frame. Blocking version of tailInPlace(). Calls tailInPlaceAsync() and waits for the returned PgxFuture to complete.
        Returns:
        the frame after modification
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • countAsync

        public abstract PgxFuture<java.lang.Long> countAsync()
        Gives the numbers of rows in a frame
        Returns:
        a future on the number of rows in the frame
      • count

        public long count()
                   throws java.lang.InterruptedException,
                          java.util.concurrent.ExecutionException
        Gives the numbers of rows in a frame. Blocking version of countAsync(). Calls countAsync() and waits for the returned PgxFuture to complete.
        Returns:
        the number of rows in the frame
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • lengthAsync

        public PgxFuture<java.lang.Long> lengthAsync()
        Gives the numbers of rows in a frame.
        Returns:
        a future on the number of rows in the frame
      • length

        public long length()
                    throws java.lang.InterruptedException,
                           java.util.concurrent.ExecutionException
        Gives the numbers of rows in a frame Blocking version of lengthAsync(). Calls lengthAsync() and waits for the returned PgxFuture to complete.
        Returns:
        the number of rows in the frame
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • printAsync

        public PgxFuture<PgxFrame> printAsync()
        Prints all results to System.out.
        Returns:
        a future on the original frame, completed once the printing has been done
      • print

        public PgxFrame print()
                       throws java.lang.InterruptedException,
                              java.util.concurrent.ExecutionException
        Prints all results to System.out. Blocking version of printAsync(). Calls printAsync() and waits for the returned PgxFuture to complete.
        Returns:
        the original frame
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • printAsync

        public PgxFuture<PgxFrame> printAsync​(long numRows)
        Prints numRows results to System.out. If numRows is larger than the number of rows in the frame, only as many rows as in the frame are printed.
        Parameters:
        numRows - number of result
        Returns:
        a future on the original frame, completed once the printing has been done
      • print

        public PgxFrame print​(long numRows)
                       throws java.lang.InterruptedException,
                              java.util.concurrent.ExecutionException
        Prints numRows results to System.out. If numRows is larger than the number of rows in the frame, only as many rows as in the frame are printed. Blocking version of printAsync(long). Calls printAsync(long) and waits for the returned PgxFuture to complete.
        Parameters:
        numRows - number of result
        Returns:
        the original frame
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • printAsync

        public PgxFuture<PgxFrame> printAsync​(long numResults,
                                              long from)
        Prints numResults results from the frame to System.out.
        Parameters:
        numResults - number of result
        from - first result to be printed (start counting from 0)
        Returns:
        a future on the original frame, completed once the printing has been done
      • print

        public PgxFrame print​(long numResults,
                              long from)
                       throws java.lang.InterruptedException,
                              java.util.concurrent.ExecutionException
        Prints numResults results from the frame to System.out. Blocking version of printAsync(long, long). Calls printAsync(long, long) and waits for the returned PgxFuture to complete.
        Parameters:
        numResults - number of result
        from - first result to be printed (start counting from 0)
        Returns:
        the original frame
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • printAsync

        public PgxFuture<PgxFrame> printAsync​(java.io.PrintStream printStream,
                                              long numResults,
                                              long from)
        Prints the content of the frame
        Returns:
        a future on the original frame, completed once the printing has been done
      • print

        public PgxFrame print​(java.io.PrintStream printStream,
                              long numResults,
                              long from)
                       throws java.lang.InterruptedException,
                              java.util.concurrent.ExecutionException
        Prints the content of the frame Blocking version of printAsync(PrintStream, long, long). Calls printAsync(PrintStream, long, long) and waits for the returned PgxFuture to complete.
        Returns:
        the original frame
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • join

        public PgxFrame join​(PgxFrame right,
                             java.lang.String joinKeyColumn)
                      throws java.lang.InterruptedException,
                             java.util.concurrent.ExecutionException
        Creates a new PgxFrame by adding the columns of the right frame to this frame aligned on equality of entries in column joinKeyColumn. The resulting frame will contain the columns of this frame and the columns of right frame without any prefixes. For different prefixes, use join(PgxFrame, String, String, String, String) Blocking version of joinAsync(PgxFrame, String). Calls joinAsync(PgxFrame, String) and waits for the returned PgxFuture to complete
        Parameters:
        right - PgxFrame whose columns will be added to the columns of this PgxFrame
        joinKeyColumn - Column on which the equality test will be performed in order to align the rows between the two frames
        Returns:
        PgxFrame containing the columns of this frame and right frame aligned based on equality of column joinKeyColumn
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • join

        public PgxFrame join​(PgxFrame right,
                             java.lang.String leftJoinKeyColumn,
                             java.lang.String rightJoinKeyColumn)
                      throws java.lang.InterruptedException,
                             java.util.concurrent.ExecutionException
        Creates a new PgxFrame by adding the columns of the right frame to this frame aligned on equality of entries in column leftJoinKeyColumn for this frame and column rightJoinKeyColumn for the right frame. The resulting frame will contain the columns of this frame and the columns of right frame without any prefixes. For different prefixes, use join(PgxFrame, String, String, String, String) Blocking version of joinAsync(PgxFrame, String, String). Calls join(PgxFrame, String, String) and waits for the returned PgxFuture to complete
        Parameters:
        right - PgxFrame whose columns will be added to the columns of this PgxFrame
        leftJoinKeyColumn - Column of this frame on which the equality test will be performed with rightJoinKeyColumn
        rightJoinKeyColumn - Column of right frame on which the equality test will be performed with leftJoinKeyColumn
        Returns:
        PgxFrame containing the columns of this frame and right frame aligned based on equality of columns leftJoinKeyColumn and rightJoinKeyColumn
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • join

        public PgxFrame join​(PgxFrame right,
                             java.lang.String joinKeyColumn,
                             java.lang.String leftPrefix,
                             java.lang.String rightPrefix)
                      throws java.lang.InterruptedException,
                             java.util.concurrent.ExecutionException
        Creates a new PgxFrame by adding the columns of the right frame to this frame, aligned on equality of entries in column leftJoinKeyColumn for this frame and column rightJoinKeyColumn for the right frame. The resulting frame will contain the columns of this frame prefixed by leftPrefix and the columns of right frame prefixed by rightPrefix (if the prefixes are not null). Blocking version of joinAsync(PgxFrame, String, String, String). Calls join(PgxFrame, String, String, String) and waits for the returned PgxFuture to complete
        Parameters:
        right - PgxFrame whose columns will be added to the columns of this PgxFrame
        joinKeyColumn - Column of this and right on which the equality test will be performed
        leftPrefix - Prefix of the columns name of this frame in the resulting frame
        rightPrefix - Prefix of the columns name of right frame in the resulting frame
        Returns:
        PgxFrame containing the columns of this frame and right frame aligned based on equality of column joinKeyColumn
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • join

        public PgxFrame join​(PgxFrame right,
                             java.lang.String leftJoinKeyColumn,
                             java.lang.String rightJoinKeyColumn,
                             java.lang.String leftPrefix,
                             java.lang.String rightPrefix)
                      throws java.lang.InterruptedException,
                             java.util.concurrent.ExecutionException
        Creates a new PgxFrame by adding the columns of the right frame to this frame, aligned on equality of entries in column leftJoinKeyColumn for this frame and column rightJoinKeyColumn for the right frame. The resulting frame will contain the columns of this frame prefixed by leftPrefix and the columns of right frame prefixed by rightPrefix (if the prefixes are not null). Blocking version of joinAsync(PgxFrame, String, String, String, String). Calls join(PgxFrame, String, String, String, String) and waits for the returned PgxFuture to complete
        Parameters:
        right - PgxFrame whose columns will be added to the columns of this PgxFrame
        leftJoinKeyColumn - Column of this frame on which the equality test will be performed with rightJoinKeyColumn
        rightJoinKeyColumn - Column of right frame on which the equality test will be performed with leftJoinKeyColumn
        leftPrefix - Prefix of the columns name of this frame in the resulting frame
        rightPrefix - Prefix of the columns name of right frame in the resulting frame
        Returns:
        PgxFrame containing the columns of this frame and right frame aligned based on equality of columns leftJoinKeyColumn and rightJoinKeyColumn
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • joinAsync

        public PgxFuture<PgxFrame> joinAsync​(PgxFrame right,
                                             java.lang.String joinKeyColumn)
        Creates a new PgxFrame by adding the columns of the right frame to this frame aligned on equality of entries in column joinKeyColumn. The resulting frame will contain the columns of this frame and the columns of right frame without any prefixes. For different prefixes, use join(PgxFrame, String, String, String, String)
        Parameters:
        right - PgxFrame whose columns will be added to the columns of this PgxFrame
        joinKeyColumn - Column of this and right on which the equality test will be performed
        Returns:
        PgxFrame containing the columns of this frame and right frame aligned based on equality of column joinKeyColumn
      • joinAsync

        public PgxFuture<PgxFrame> joinAsync​(PgxFrame right,
                                             java.lang.String leftJoinKeyColumn,
                                             java.lang.String rightJoinKeyColumn)
        Creates a new PgxFrame by adding the columns of the right frame to this frame aligned on equality of entries in column leftJoinKeyColumn for this frame and column rightJoinKeyColumn for the right frame The resulting frame will contain the columns of this frame and the columns of right frame without any prefixes. For different prefixes, use join(PgxFrame, String, String, String, String)
        Parameters:
        right - PgxFrame whose columns will be added to the columns of this PgxFrame
        leftJoinKeyColumn - Column of this frame on which the equality test will be performed with rightJoinKeyColumn
        rightJoinKeyColumn - Column of right frame on which the equality test will be performed with leftJoinKeyColumn
        Returns:
        PgxFrame containing the columns of this frame and right frame aligned based on equality of columns leftJoinKeyColumn and rightJoinKeyColumn
      • joinAsync

        public PgxFuture<PgxFrame> joinAsync​(PgxFrame right,
                                             java.lang.String joinKeyColumn,
                                             java.lang.String leftPrefix,
                                             java.lang.String rightPrefix)
        Creates a new PgxFrame by adding the columns of the right frame to this frame, aligned on equality of entries in column leftJoinKeyColumn for this frame and column rightJoinKeyColumn for the right frame. The resulting frame will contain the columns of this frame prefixed by leftPrefix and the columns of right frame prefixed by rightPrefix (if the prefixes are not null).
        Parameters:
        right - PgxFrame whose columns will be added to the columns of this PgxFrame
        joinKeyColumn - Column of this and right on which the equality test will be performed
        leftPrefix - Prefix of the columns name of this frame in the resulting frame
        rightPrefix - Prefix of the columns name of right frame in the resulting frame
        Returns:
        PgxFrame containing the columns of this frame and right frame aligned based on equality of columns leftJoinKeyColumn and rightJoinKeyColumn
      • joinAsync

        public abstract PgxFuture<PgxFrame> joinAsync​(PgxFrame right,
                                                      java.lang.String leftJoinKeyColumn,
                                                      java.lang.String rightJoinKeyColumn,
                                                      java.lang.String leftPrefix,
                                                      java.lang.String rightPrefix)
        Creates a new PgxFrame by adding the columns of the right frame to this frame, aligned on equality of entries in column leftJoinKeyColumn for this frame and column rightJoinKeyColumn for the right frame. The resulting frame will contain the columns of this frame prefixed by leftPrefix and the columns of right frame prefixed by rightPrefix.
        Parameters:
        right - PgxFrame whose columns will be added to the columns of this PgxFrame
        leftJoinKeyColumn - Column of this frame on which the equality test will be performed with rightJoinKeyColumn
        rightJoinKeyColumn - Column of right frame on which the equality test will be performed with leftJoinKeyColumn
        leftPrefix - Prefix of the columns name of this frame in the resulting frame
        rightPrefix - Prefix of the columns name of right frame in the resulting frame
        Returns:
        PgxFrame containing the columns of this frame and right frame aligned based on equality of columns leftJoinKeyColumn and rightJoinKeyColumn
      • unionAsync

        public abstract PgxFuture<PgxFrame> unionAsync​(PgxFrame b,
                                                       PgxFrame... others)
        Creates a new PgxFrame by concatenating the rows of this frame with the rows of b and others. The different frames should have the same columns (same names, types and dimensions), in the same order. The resulting frame is not guaranteed to have any specific ordering of its rows.
        Parameters:
        b - PgxFrame whose rows to append the the rows of this PgxFrame
        others - additional PgxFrames whose rows to append to the result frame
        Returns:
        PgxFrame containing the rows of this, b and others frames
      • union

        public PgxFrame union​(PgxFrame b,
                              PgxFrame... others)
                       throws java.lang.InterruptedException,
                              java.util.concurrent.ExecutionException
        Creates a new PgxFrame by concatenating the rows of this frame with the rows of b and others. The different frames should have the same columns (same names, types and dimensions), in the same order. The resulting frame is not guaranteed to have any specific ordering of its rows. Blocking version of unionAsync(PgxFrame, PgxFrame...). Calls unionAsync(PgxFrame, PgxFrame...) and waits for the return PgxFuture to complete
        Parameters:
        b - PgxFrame whose rows to append the the rows of this PgxFrame
        others - additional PgxFrames whose rows to append to the result frame
        Returns:
        PgxFrame containing the rows of this, b and others frames
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • toPgqlResultSetAsync

        public abstract PgxFuture<PgqlResultSet> toPgqlResultSetAsync()
        Creates a new PgqlResultSet having the same content as this frame. The result set content is accessible as long as the frame is not destroyed or mutated in place.
        Returns:
        a new PgqlResultSet having the same content as this frame.
      • toPgqlResultSet

        public PgqlResultSet toPgqlResultSet()
                                      throws java.lang.InterruptedException,
                                             java.util.concurrent.ExecutionException
        Creates a new PgqlResultSet having the same content as this frame. The result set content is accessible as long as the frame is not destroyed. Blocking version of toPgqlResultSetAsync(). Calls toPgqlResultSetAsync() and waits for the returned PgxFuture to complete.
        Returns:
        a new PgqlResultSet having the same content as this frame.
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • destroyAsync

        public abstract PgxFuture<java.lang.Void> destroyAsync()
        Requests destruction of this object. After this method returns, the behavior of any method of this class becomes undefined.
        Returns:
        a future which will be completed once the destruction request finishes.
      • close

        public void close()
        Calls destroyAsync() and wait for completion.
        Specified by:
        close in interface java.lang.AutoCloseable
      • destroy

        public void destroy()
                     throws java.lang.InterruptedException,
                            java.util.concurrent.ExecutionException
        Blocking version of destroyAsync(). Calls destroyAsync() and waits for the returned PgxFuture to complete.
        Throws:
        java.lang.InterruptedException - if the caller thread gets interrupted while waiting for completion.
        java.util.concurrent.ExecutionException - if any exception occurred during asynchronous execution. The actual exception will be nested.