Skip to content

Commit

Permalink
Merge pull request #621 from mziccard/bigquery-hierachies
Browse files Browse the repository at this point in the history
Make Table methods public
  • Loading branch information
aozarov committed Feb 5, 2016
2 parents f7990c0 + 7761a9e commit 8ba9230
Showing 1 changed file with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ public boolean delete() {
* @param rows rows to be inserted
* @throws BigQueryException upon failure
*/
InsertAllResponse insert(Iterable<InsertAllRequest.RowToInsert> rows) throws BigQueryException {
public InsertAllResponse insert(Iterable<InsertAllRequest.RowToInsert> rows)
throws BigQueryException {
return bigquery.insertAll(InsertAllRequest.of(tableId(), rows));
}

Expand All @@ -197,8 +198,8 @@ InsertAllResponse insert(Iterable<InsertAllRequest.RowToInsert> rows) throws Big
* to be invalid
* @throws BigQueryException upon failure
*/
InsertAllResponse insert(Iterable<InsertAllRequest.RowToInsert> rows, boolean skipInvalidRows,
boolean ignoreUnknownValues) throws BigQueryException {
public InsertAllResponse insert(Iterable<InsertAllRequest.RowToInsert> rows,
boolean skipInvalidRows, boolean ignoreUnknownValues) throws BigQueryException {
InsertAllRequest request = InsertAllRequest.builder(tableId(), rows)
.skipInvalidRows(skipInvalidRows)
.ignoreUnknownValues(ignoreUnknownValues)
Expand All @@ -212,7 +213,7 @@ InsertAllResponse insert(Iterable<InsertAllRequest.RowToInsert> rows, boolean sk
* @param options table data list options
* @throws BigQueryException upon failure
*/
Page<List<FieldValue>> list(BigQuery.TableDataListOption... options) throws BigQueryException {
public Page<List<FieldValue>> list(BigQuery.TableDataListOption... options) throws BigQueryException {
return bigquery.listTableData(tableId(), options);
}

Expand All @@ -225,7 +226,7 @@ Page<List<FieldValue>> list(BigQuery.TableDataListOption... options) throws BigQ
* @param options job options
* @throws BigQueryException upon failure
*/
Job copy(String destinationDataset, String destinationTable, BigQuery.JobOption... options)
public Job copy(String destinationDataset, String destinationTable, BigQuery.JobOption... options)
throws BigQueryException {
return copy(TableId.of(destinationDataset, destinationTable), options);
}
Expand All @@ -238,7 +239,8 @@ Job copy(String destinationDataset, String destinationTable, BigQuery.JobOption.
* @param options job options
* @throws BigQueryException upon failure
*/
Job copy(TableId destinationTable, BigQuery.JobOption... options) throws BigQueryException {
public Job copy(TableId destinationTable, BigQuery.JobOption... options)
throws BigQueryException {
CopyJobConfiguration configuration = CopyJobConfiguration.of(destinationTable, tableId());
return bigquery.create(JobInfo.of(configuration), options);
}
Expand All @@ -253,7 +255,7 @@ Job copy(TableId destinationTable, BigQuery.JobOption... options) throws BigQuer
* @param options job options
* @throws BigQueryException upon failure
*/
Job extract(String format, String destinationUri, BigQuery.JobOption... options)
public Job extract(String format, String destinationUri, BigQuery.JobOption... options)
throws BigQueryException {
return extract(format, ImmutableList.of(destinationUri), options);
}
Expand All @@ -268,7 +270,7 @@ Job extract(String format, String destinationUri, BigQuery.JobOption... options)
* @param options job options
* @throws BigQueryException upon failure
*/
Job extract(String format, List<String> destinationUris, BigQuery.JobOption... options)
public Job extract(String format, List<String> destinationUris, BigQuery.JobOption... options)
throws BigQueryException {
ExtractJobConfiguration extractConfiguration =
ExtractJobConfiguration.of(tableId(), destinationUris, format);
Expand All @@ -285,7 +287,7 @@ Job extract(String format, List<String> destinationUris, BigQuery.JobOption... o
* @param options job options
* @throws BigQueryException upon failure
*/
Job load(FormatOptions format, String sourceUri, BigQuery.JobOption... options)
public Job load(FormatOptions format, String sourceUri, BigQuery.JobOption... options)
throws BigQueryException {
return load(format, ImmutableList.of(sourceUri), options);
}
Expand All @@ -300,7 +302,7 @@ Job load(FormatOptions format, String sourceUri, BigQuery.JobOption... options)
* @param options job options
* @throws BigQueryException upon failure
*/
Job load(FormatOptions format, List<String> sourceUris, BigQuery.JobOption... options)
public Job load(FormatOptions format, List<String> sourceUris, BigQuery.JobOption... options)
throws BigQueryException {
LoadJobConfiguration loadConfig = LoadJobConfiguration.of(tableId(), sourceUris, format);
return bigquery.create(JobInfo.of(loadConfig), options);
Expand Down

0 comments on commit 8ba9230

Please sign in to comment.