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 void
close()
CallsdestroyAsync()
and wait for completion.long
count()
Gives the numbers of rows in a frame.abstract PgxFuture<java.lang.Long>
countAsync()
Gives the numbers of rows in a framevoid
destroy()
Blocking version ofdestroyAsync()
.abstract PgxFuture<java.lang.Void>
destroyAsync()
Requests destruction of this object.PgxFrame
flatten(java.lang.String... columns)
Create a new PgxFrame with all the specified columns and vector columns flattened into multiple columns.PgxFrame
flattenAll()
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.PgxFrame
flattenAllInPlace()
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.PgxFrame
flattenInPlace(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 PgxFrameColumn
getColumn(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.PgxFrame
head()
Extracts theheadInPlace(long)
first rows of the frame and put them in a new frame Blocking version ofhead(long)
.PgxFrame
head(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 framePgxFrame
headInPlace()
Keeps only the firstDEFAULT_LIMIT
rows in the frame Blocking version ofheadInPlace()
.PgxFrame
headInPlace(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 framePgxFrame
join(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.PgxFrame
join(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.PgxFrame
join(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.PgxFrame
join(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.long
length()
Gives the numbers of rows in a frame Blocking version oflengthAsync()
.PgxFuture<java.lang.Long>
lengthAsync()
Gives the numbers of rows in a frame.PgxFrame
print()
Prints all results toSystem.out
.PgxFrame
print(long numRows)
PrintsnumRows
results toSystem.out
.PgxFrame
print(long numResults, long from)
PrintsnumResults
results from the frame toSystem.out
.PgxFrame
print(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)
PrintsnumRows
results toSystem.out
.PgxFuture<PgxFrame>
printAsync(long numResults, long from)
PrintsnumResults
results from the frame toSystem.out
.PgxFuture<PgxFrame>
printAsync(java.io.PrintStream printStream, long numResults, long from)
Prints the content of the framePgxFrame
renameColumn(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 specifiedPgxFrame
renameColumnInPlace(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 specifiedPgxFrame
renameColumns(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 specifiedPgxFrame
renameColumnsInPlace(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 specifiedPgxFrame
select(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 columnsPgxFrame
selectInPlace(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 columnsPgxFrame
tail()
Extracts the lastDEFAULT_LIMIT
rows of the frame into a new frame.PgxFrame
tail(long numRows)
Extracts the numRows last rows of the frame and put them in a new framePgxFuture<PgxFrame>
tailAsync()
Extracts the lastDEFAULT_LIMIT
rows 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 framePgxFrame
tailInPlace()
Modifies the frame to keep the lastDEFAULT_LIMIT
rows of the frame.PgxFrame
tailInPlace(long numRows)
Modifies the frame to keep the lastDEFAULT_LIMIT
rows of the frame.PgxFuture<PgxFrame>
tailInPlaceAsync()
Modifies the frame to keep the lastDEFAULT_LIMIT
rows of the framePgxFuture<PgxFrame>
tailInPlaceAsync(long numRows)
Modifies the frame to keep the last numRows rows of the framePgqlResultSet
toPgqlResultSet()
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.PgxFrame
union(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 PgxGenericFrameStorer
write()
Returns aPgxGenericFrameStorer
to 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 returnedPgxFuture
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 ofselectInPlaceAsync(String...)
. CallsselectInPlaceAsync(String...)
and waits for the returnedPgxFuture
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 ofrenameColumnsAsync(ColumnRenaming...)
. CallsrenameColumnsAsync(ColumnRenaming...)
and waits for the returnedPgxFuture
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 ofrenameColumnsInPlaceAsync(ColumnRenaming...)
. CallsrenameColumnsInPlaceAsync(ColumnRenaming...)
and waits for the returnedPgxFuture
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 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 returnedPgxFuture
to 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.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 ofrenameColumnInPlaceAsync(String, String)
. CallsrenameColumnInPlaceAsync(String, String)
and waits for the returnedPgxFuture
to 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.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 offlattenAllAsync()
. CallsflattenAllAsync()
and waits for the returnedPgxFuture
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 offlattenAllInPlaceAsync()
. CallsflattenAllInPlaceAsync()
and waits for the returnedPgxFuture
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 offlattenAllAsync()
. CallsflattenAllAsync()
and waits for the returnedPgxFuture
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 offlattenAllInPlaceAsync()
. CallsflattenAllInPlaceAsync()
and waits for the returnedPgxFuture
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 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 returnedPgxFuture
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 theheadInPlace(long)
first rows of the frame and put them in a new frame Blocking version ofhead(long)
. Callshead(long)
and waits for the returnedPgxFuture
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 ofheadInPlace(long)
. CallsheadInPlace(long)
and waits for the returnedPgxFuture
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 firstDEFAULT_LIMIT
rows in the frame Blocking version ofheadInPlace()
. CallsheadInPlace()
and waits for the returnedPgxFuture
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 lastDEFAULT_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 lastDEFAULT_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 lastDEFAULT_LIMIT
rows of the frame into a new frame. Blocking version oftail()
. CallstailAsync()
and waits for the returnedPgxFuture
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 lastDEFAULT_LIMIT
rows of the frame. Blocking version oftailInPlace(long)
. CallstailInPlaceAsync(long)
and waits for the returnedPgxFuture
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 lastDEFAULT_LIMIT
rows of the frame. Blocking version oftailInPlace()
. CallstailInPlaceAsync()
and waits for the returnedPgxFuture
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 ofcountAsync()
. CallscountAsync()
and waits for the returnedPgxFuture
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 oflengthAsync()
. CallslengthAsync()
and waits for the returnedPgxFuture
to complete.- Returns:
- the number of rows in the frame
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
-
write
public abstract PgxGenericFrameStorer write()
Returns aPgxGenericFrameStorer
to configure the storing operation and then trigger it.- Returns:
- a
PgxGenericFrameStorer
to 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 returnedPgxFuture
to complete.- Returns:
- the original frame
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
-
printAsync
public PgxFuture<PgxFrame> printAsync(long numRows)
PrintsnumRows
results toSystem.out
. IfnumRows
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
PrintsnumRows
results toSystem.out
. IfnumRows
is 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 returnedPgxFuture
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)
PrintsnumResults
results 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
PrintsnumResults
results from the frame toSystem.out
. Blocking version ofprintAsync(long, long)
. CallsprintAsync(long, long)
and waits for the returnedPgxFuture
to complete.- Parameters:
numResults
- number of resultfrom
- 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 ofprintAsync(PrintStream, long, long)
. CallsprintAsync(PrintStream, long, long)
and waits for the returnedPgxFuture
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, usejoin(PgxFrame, String, String, String, String)
Blocking version ofjoinAsync(PgxFrame, String)
. CallsjoinAsync(PgxFrame, String)
and waits for the returnedPgxFuture
to 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.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, usejoin(PgxFrame, String, String, String, String)
Blocking version ofjoinAsync(PgxFrame, String, String)
. Callsjoin(PgxFrame, String, String)
and waits for the returnedPgxFuture
to 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.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 ofjoinAsync(PgxFrame, String, String, String)
. Callsjoin(PgxFrame, String, String, String)
and waits for the returnedPgxFuture
to 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.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 ofjoinAsync(PgxFrame, String, String, String, String)
. Callsjoin(PgxFrame, String, String, String, String)
and waits for the returnedPgxFuture
to 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.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, 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 returnPgxFuture
to 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.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 oftoPgqlResultSetAsync()
. CallstoPgqlResultSetAsync()
and waits for the returnedPgxFuture
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()
CallsdestroyAsync()
and wait for completion.- Specified by:
close
in interfacejava.lang.AutoCloseable
-
destroy
public void destroy() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
Blocking version ofdestroyAsync()
. CallsdestroyAsync()
and waits for the returnedPgxFuture
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.
-
-