Package oracle.pgx.api.frames
Class PgxFrame
- java.lang.Object
-
- oracle.pgx.api.frames.PgxFrame
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public abstract class PgxFrame extends java.lang.Object implements java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description PgxFrame()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()CallsdestroyAsync()and wait for completion.longcount()Gives the numbers of rows in a frame.abstract PgxFuture<java.lang.Long>countAsync()Gives the numbers of rows in a framevoiddestroy()Blocking version ofdestroyAsync().abstract PgxFuture<java.lang.Void>destroyAsync()Requests destruction of this object.PgxFrameflatten(java.lang.String... columns)Create a new PgxFrame with all the specified columns and vector columns flattened into multiple columns.PgxFrameflattenAll()Create a new PgxFrame with all nested columns and vector columns flattened into multiple columns.PgxFuture<PgxFrame>flattenAllAsync()Create a new PgxFrame with all nested columns and vector columns flattened into multiple columns.PgxFrameflattenAllInPlace()Modifies the PgxFrame by flattening all nested columns and vector columns into multiple columns.PgxFuture<PgxFrame>flattenAllInPlaceAsync()Modifies the PgxFrame by flattening all nested columns and vector columns into multiple columns.PgxFuture<PgxFrame>flattenAsync(java.lang.String... columns)Create a new PgxFrame with the specified nested columns and vector columns flattened into multiple columns.PgxFrameflattenInPlace(java.lang.String... columns)Modifies the PgxFrame by flattening all the specified columns and vector columns into multiple columns.PgxFuture<PgxFrame>flattenInPlaceAsync(java.lang.String... columns)Modifies the PgxFrame by flattening all the specified columns and vector columns into multiple columns.abstract PgxFrameColumngetColumn(java.lang.String columnName)Returns the column of the frame that has the given nameColumnDescriptor[]getColumnDescriptors()Returns a list containing the description of the different columns of the frames.PgxFramehead()Extracts theheadInPlace(long)first rows of the frame and put them in a new frame Blocking version ofhead(long).PgxFramehead(long numRows)Extracts the numRows first rows of the frame and put them in a new frame Blocking version ofhead(long).PgxFuture<PgxFrame>headAsync()Extracts theheadInPlace(long)first rows of the frame and put them in a new framePgxFuture<PgxFrame>headAsync(long numRows)Extracts the numRows first rows of the frame and put them in a new framePgxFrameheadInPlace()Keeps only the firstDEFAULT_LIMITrows in the frame Blocking version ofheadInPlace().PgxFrameheadInPlace(long numRows)Keeps only the first numRows rows in the frame Blocking version ofheadInPlace(long).PgxFuture<PgxFrame>headInPlaceAsync()Modifies the frame to only keep the firstheadInPlace(long)rows in the framePgxFuture<PgxFrame>headInPlaceAsync(long numRows)Modifies the frame to only keep the first numRows rows in the framePgxFramejoin(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.PgxFramejoin(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.PgxFramejoin(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.PgxFramejoin(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.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.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.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.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.longlength()Gives the numbers of rows in a frame Blocking version oflengthAsync().PgxFuture<java.lang.Long>lengthAsync()Gives the numbers of rows in a frame.PgxFrameprint()Prints all results toSystem.out.PgxFrameprint(long numRows)PrintsnumRowsresults toSystem.out.PgxFrameprint(long numResults, long from)PrintsnumResultsresults from the frame toSystem.out.PgxFrameprint(java.io.PrintStream printStream, long numResults, long from)Prints the content of the frame Blocking version ofprintAsync(PrintStream, long, long).PgxFuture<PgxFrame>printAsync()Prints all results toSystem.out.PgxFuture<PgxFrame>printAsync(long numRows)PrintsnumRowsresults toSystem.out.PgxFuture<PgxFrame>printAsync(long numResults, long from)PrintsnumResultsresults from the frame toSystem.out.PgxFuture<PgxFrame>printAsync(java.io.PrintStream printStream, long numResults, long from)Prints the content of the framePgxFramerenameColumn(java.lang.String oldColumnName, java.lang.String newColumnName)Returns a new PgxFrame in which the specified column is renamed as specified Blocking version ofrenameColumnAsync(String, String).PgxFuture<PgxFrame>renameColumnAsync(java.lang.String oldColumnName, java.lang.String newColumnName)Returns a new PgxFrame in which the specified column is renamed as specifiedPgxFramerenameColumnInPlace(java.lang.String oldColumnName, java.lang.String newColumnName)Modifies the PgxFrame by renaming the specified column is renamed as specified Blocking version ofrenameColumnInPlaceAsync(String, String).PgxFuture<PgxFrame>renameColumnInPlaceAsync(java.lang.String oldColumnName, java.lang.String newColumnName)Modifies the PgxFrame by renaming the specified column is renamed as specifiedPgxFramerenameColumns(ColumnRenaming... columnsWithRenamings)Returns a new PgxFrame in which the specified columns are renamed as specified Blocking version ofrenameColumnsAsync(ColumnRenaming...).PgxFuture<PgxFrame>renameColumnsAsync(ColumnRenaming... columnsWithRenamings)Returns a new PgxFrame in which the specified columns are renamed as specifiedPgxFramerenameColumnsInPlace(ColumnRenaming... columnsWithRenamings)Modifies the PgxFrame to rename the specified columns as specified Blocking version ofrenameColumnsInPlaceAsync(ColumnRenaming...).PgxFuture<PgxFrame>renameColumnsInPlaceAsync(ColumnRenaming... columnsWithRenamings)Modifies the PgxFrame to rename the specified columns as specifiedPgxFrameselect(java.lang.String... columns)Returns a new PgxFrame that contains only the specified columns Blocking version ofselectAsync(String...).PgxFuture<PgxFrame>selectAsync(java.lang.String... columns)Returns a new PgxFrame that contains only the specified columnsPgxFrameselectInPlace(java.lang.String... columns)Modifies the PgxFrame to contain only the specified columns Blocking version ofselectInPlaceAsync(String...).PgxFuture<PgxFrame>selectInPlaceAsync(java.lang.String... columns)Modifies the PgxFrame to contain only the specified columnsPgxFrametail()Extracts the lastDEFAULT_LIMITrows of the frame into a new frame.PgxFrametail(long numRows)Extracts the numRows last rows of the frame and put them in a new framePgxFuture<PgxFrame>tailAsync()Extracts the lastDEFAULT_LIMITrows of the frame and put them in a new framePgxFuture<PgxFrame>tailAsync(long numRows)Extracts the numRows last rows of the frame and put them in a new framePgxFrametailInPlace()Modifies the frame to keep the lastDEFAULT_LIMITrows of the frame.PgxFrametailInPlace(long numRows)Modifies the frame to keep the lastDEFAULT_LIMITrows of the frame.PgxFuture<PgxFrame>tailInPlaceAsync()Modifies the frame to keep the lastDEFAULT_LIMITrows of the framePgxFuture<PgxFrame>tailInPlaceAsync(long numRows)Modifies the frame to keep the last numRows rows of the framePgqlResultSettoPgqlResultSet()Creates a new PgqlResultSet having the same content as this frame.abstract PgxFuture<PgqlResultSet>toPgqlResultSetAsync()Creates a new PgqlResultSet having the same content as this frame.PgxFrameunion(PgxFrame b, PgxFrame... others)Creates a new PgxFrame by concatenating the rows of this frame with the rows of b and others.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.abstract PgxGenericFrameStorerwrite()Returns aPgxGenericFrameStorerto configure the storing operation and then trigger it.
-
-
-
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 ofselectAsync(String...). CallsselectAsync(String...)and waits for the returnedPgxFutureto complete.- Parameters:
columns- the list of columns to keep in the new PgxFrame- Returns:
- a new PgxFrame with the specified columns
- Throws:
java.lang.InterruptedExceptionjava.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 ofselectInPlaceAsync(String...). CallsselectInPlaceAsync(String...)and waits for the returnedPgxFutureto complete.- Parameters:
columns- the list of columns to keep in the new PgxFrame- Returns:
- the modified PgxFrame with the specified columns
- Throws:
java.lang.InterruptedExceptionjava.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 ofrenameColumnsAsync(ColumnRenaming...). CallsrenameColumnsAsync(ColumnRenaming...)and waits for the returnedPgxFutureto 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.InterruptedExceptionjava.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 ofrenameColumnsInPlaceAsync(ColumnRenaming...). CallsrenameColumnsInPlaceAsync(ColumnRenaming...)and waits for the returnedPgxFutureto 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.InterruptedExceptionjava.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 renamenewColumnName- 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 renamenewColumnName- 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 ofrenameColumnAsync(String, String). CallsrenameColumnAsync(String, String)and waits for the returnedPgxFutureto complete.- Parameters:
oldColumnName- the name of the column to renamenewColumnName- 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.InterruptedExceptionjava.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 ofrenameColumnInPlaceAsync(String, String). CallsrenameColumnInPlaceAsync(String, String)and waits for the returnedPgxFutureto complete.- Parameters:
oldColumnName- the name of the column to renamenewColumnName- 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.InterruptedExceptionjava.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 offlattenAllAsync(). CallsflattenAllAsync()and waits for the returnedPgxFutureto complete.- Returns:
- a new frame with the columns flattened
- Throws:
java.lang.InterruptedExceptionjava.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 offlattenAllInPlaceAsync(). CallsflattenAllInPlaceAsync()and waits for the returnedPgxFutureto complete.- Returns:
- the frame with the columns flattened
- Throws:
java.lang.InterruptedExceptionjava.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 offlattenAllAsync(). CallsflattenAllAsync()and waits for the returnedPgxFutureto complete.- Returns:
- a new frame with the columns flattened
- Throws:
java.lang.InterruptedExceptionjava.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 offlattenAllInPlaceAsync(). CallsflattenAllInPlaceAsync()and waits for the returnedPgxFutureto complete.- Returns:
- the frame with the columns flattened
- Throws:
java.lang.InterruptedExceptionjava.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 theheadInPlace(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 firstheadInPlace(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 ofhead(long). Callshead(long)and waits for the returnedPgxFutureto complete.- Parameters:
numRows- the number of rows to extract from the top- Returns:
- the frame that contains the top rows
- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
head
public PgxFrame head() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
Extracts theheadInPlace(long)first rows of the frame and put them in a new frame Blocking version ofhead(long). Callshead(long)and waits for the returnedPgxFutureto complete.- Returns:
- the frame that contains the top rows
- Throws:
java.lang.InterruptedExceptionjava.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 ofheadInPlace(long). CallsheadInPlace(long)and waits for the returnedPgxFutureto complete.- Parameters:
numRows- the number of rows to keep from the top- Returns:
- this frame, after modification
- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
headInPlace
public PgxFrame headInPlace() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
Keeps only the firstDEFAULT_LIMITrows in the frame Blocking version ofheadInPlace(). CallsheadInPlace()and waits for the returnedPgxFutureto complete.- Returns:
- this frame, after modification
- Throws:
java.lang.InterruptedExceptionjava.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 lastDEFAULT_LIMITrows 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 lastDEFAULT_LIMITrows 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.InterruptedExceptionjava.util.concurrent.ExecutionException
-
tail
public PgxFrame tail() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
Extracts the lastDEFAULT_LIMITrows of the frame into a new frame. Blocking version oftail(). CallstailAsync()and waits for the returnedPgxFutureto complete.- Returns:
- the frame after modification
- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
tailInPlace
public PgxFrame tailInPlace(long numRows) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
Modifies the frame to keep the lastDEFAULT_LIMITrows of the frame. Blocking version oftailInPlace(long). CallstailInPlaceAsync(long)and waits for the returnedPgxFutureto complete.- Parameters:
numRows- the number of rows to extract from the bottom- Returns:
- the frame after modification
- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
tailInPlace
public PgxFrame tailInPlace() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
Modifies the frame to keep the lastDEFAULT_LIMITrows of the frame. Blocking version oftailInPlace(). CallstailInPlaceAsync()and waits for the returnedPgxFutureto complete.- Returns:
- the frame after modification
- Throws:
java.lang.InterruptedExceptionjava.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.ExecutionExceptionGives the numbers of rows in a frame. Blocking version ofcountAsync(). CallscountAsync()and waits for the returnedPgxFutureto complete.- Returns:
- the number of rows in the frame
- Throws:
java.lang.InterruptedExceptionjava.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.ExecutionExceptionGives the numbers of rows in a frame Blocking version oflengthAsync(). CallslengthAsync()and waits for the returnedPgxFutureto complete.- Returns:
- the number of rows in the frame
- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
write
public abstract PgxGenericFrameStorer write()
Returns aPgxGenericFrameStorerto configure the storing operation and then trigger it.- Returns:
- a
PgxGenericFrameStorerto configure the storing
-
printAsync
public PgxFuture<PgxFrame> printAsync()
Prints all results toSystem.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 toSystem.out. Blocking version ofprintAsync(). CallsprintAsync()and waits for the returnedPgxFutureto complete.- Returns:
- the original frame
- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
printAsync
public PgxFuture<PgxFrame> printAsync(long numRows)
PrintsnumRowsresults toSystem.out. IfnumRowsis 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
PrintsnumRowsresults toSystem.out. IfnumRowsis larger than the number of rows in the frame, only as many rows as in the frame are printed. Blocking version ofprintAsync(long). CallsprintAsync(long)and waits for the returnedPgxFutureto complete.- Parameters:
numRows- number of result- Returns:
- the original frame
- Throws:
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionException
-
printAsync
public PgxFuture<PgxFrame> printAsync(long numResults, long from)
PrintsnumResultsresults from the frame toSystem.out.- Parameters:
numResults- number of resultfrom- 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
PrintsnumResultsresults from the frame toSystem.out. Blocking version ofprintAsync(long, long). CallsprintAsync(long, long)and waits for the returnedPgxFutureto complete.- Parameters:
numResults- number of resultfrom- first result to be printed (start counting from 0)- Returns:
- the original frame
- Throws:
java.lang.InterruptedExceptionjava.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 ofprintAsync(PrintStream, long, long). CallsprintAsync(PrintStream, long, long)and waits for the returnedPgxFutureto complete.- Returns:
- the original frame
- Throws:
java.lang.InterruptedExceptionjava.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, usejoin(PgxFrame, String, String, String, String)Blocking version ofjoinAsync(PgxFrame, String). CallsjoinAsync(PgxFrame, String)and waits for the returnedPgxFutureto complete- Parameters:
right- PgxFrame whose columns will be added to the columns of this PgxFramejoinKeyColumn- 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.InterruptedExceptionjava.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, usejoin(PgxFrame, String, String, String, String)Blocking version ofjoinAsync(PgxFrame, String, String). Callsjoin(PgxFrame, String, String)and waits for the returnedPgxFutureto complete- Parameters:
right- PgxFrame whose columns will be added to the columns of this PgxFrameleftJoinKeyColumn- Column of this frame on which the equality test will be performed with rightJoinKeyColumnrightJoinKeyColumn- 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.InterruptedExceptionjava.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 ofjoinAsync(PgxFrame, String, String, String). Callsjoin(PgxFrame, String, String, String)and waits for the returnedPgxFutureto complete- Parameters:
right- PgxFrame whose columns will be added to the columns of this PgxFramejoinKeyColumn- Column of this and right on which the equality test will be performedleftPrefix- Prefix of the columns name of this frame in the resulting framerightPrefix- 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.InterruptedExceptionjava.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 ofjoinAsync(PgxFrame, String, String, String, String). Callsjoin(PgxFrame, String, String, String, String)and waits for the returnedPgxFutureto complete- Parameters:
right- PgxFrame whose columns will be added to the columns of this PgxFrameleftJoinKeyColumn- Column of this frame on which the equality test will be performed with rightJoinKeyColumnrightJoinKeyColumn- Column of right frame on which the equality test will be performed with leftJoinKeyColumnleftPrefix- Prefix of the columns name of this frame in the resulting framerightPrefix- 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.InterruptedExceptionjava.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, usejoin(PgxFrame, String, String, String, String)- Parameters:
right- PgxFrame whose columns will be added to the columns of this PgxFramejoinKeyColumn- 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, usejoin(PgxFrame, String, String, String, String)- Parameters:
right- PgxFrame whose columns will be added to the columns of this PgxFrameleftJoinKeyColumn- Column of this frame on which the equality test will be performed with rightJoinKeyColumnrightJoinKeyColumn- 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 PgxFramejoinKeyColumn- Column of this and right on which the equality test will be performedleftPrefix- Prefix of the columns name of this frame in the resulting framerightPrefix- 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 PgxFrameleftJoinKeyColumn- Column of this frame on which the equality test will be performed with rightJoinKeyColumnrightJoinKeyColumn- Column of right frame on which the equality test will be performed with leftJoinKeyColumnleftPrefix- Prefix of the columns name of this frame in the resulting framerightPrefix- 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 PgxFrameothers- 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 ofunionAsync(PgxFrame, PgxFrame...). CallsunionAsync(PgxFrame, PgxFrame...)and waits for the returnPgxFutureto complete- Parameters:
b- PgxFrame whose rows to append the the rows of this PgxFrameothers- additional PgxFrames whose rows to append to the result frame- Returns:
- PgxFrame containing the rows of this, b and others frames
- Throws:
java.lang.InterruptedExceptionjava.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 oftoPgqlResultSetAsync(). CallstoPgqlResultSetAsync()and waits for the returnedPgxFutureto complete.- Returns:
- a new PgqlResultSet having the same content as this frame.
- Throws:
java.lang.InterruptedExceptionjava.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()
CallsdestroyAsync()and wait for completion.- Specified by:
closein interfacejava.lang.AutoCloseable
-
destroy
public void destroy() throws java.lang.InterruptedException, java.util.concurrent.ExecutionExceptionBlocking version ofdestroyAsync(). CallsdestroyAsync()and waits for the returnedPgxFutureto 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.
-
-