Ejemplo n.º 1
0
 /// <summary>
 /// Asynchronously lists the rows within this table, similar to a <c>SELECT * FROM ...</c> query.
 /// This method just creates a <see cref="TableReference"/> and delegates to <see cref="BigqueryClient.ListRowsAsync(TableReference, TableSchema, ListRowsOptions)"/>.
 /// </summary>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <returns>An asynchronous sequence of the rows within the table.</returns>
 public IPagedAsyncEnumerable <TableDataList, BigqueryRow> ListRowsAsync(ListRowsOptions options = null) => _client.ListRowsAsync(Reference, Schema, options);
Ejemplo n.º 2
0
 /// <summary>
 /// Lists the rows within a table, similar to a <c>SELECT * FROM ...</c> query.
 /// </summary>
 /// <param name="tableReference">A fully-qualified identifier for the table. Must not be null.</param>
 /// <param name="schema">The schema to use when interpreting results. This may be null, in which case it will be fetched from
 /// the table first.</param>
 /// <returns>The results of listing the rows within the table.</returns>
 public virtual BigqueryResult ListRows(TableReference tableReference, TableSchema schema = null, ListRowsOptions options = null)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Lists the rows within a table specified by project ID, dataset ID and table ID, similar to a <c>SELECT * FROM ...</c> query.
 /// This method just creates a <see cref="TableReference"/> and delegates to <see cref="ListRows(TableReference, TableSchema, ListRowsOptions)"/>.
 /// </summary>
 /// <param name="projectId">The project ID. Must not be null.</param>
 /// <param name="datasetId">The dataset ID. Must not be null.</param>
 /// <param name="tableId">The table ID. Must not be null.</param>
 /// <param name="schema">The schema to use when interpreting results. This may be null, in which case it will be fetched from
 /// the table first.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <returns>The results of listing the rows within the table.</returns>
 public virtual BigqueryResult ListRows(string projectId, string datasetId, string tableId, TableSchema schema = null, ListRowsOptions options = null) =>
 ListRows(GetTableReference(projectId, datasetId, tableId), schema, options);
Ejemplo n.º 4
0
 /// <summary>
 /// Lists the rows within this table, similar to a <c>SELECT * FROM ...</c> query.
 /// </summary>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <returns>The results of listing the rows within the table.</returns>
 public BigqueryResult ListRows(ListRowsOptions options = null) => _client.ListRows(Reference, Schema, options);
 /// <summary>
 /// Lists the rows within a table, similar to a <c>SELECT * FROM ...</c> query.
 /// </summary>
 /// <param name="tableReference">A fully-qualified identifier for the table. Must not be null.</param>
 /// <param name="schema">The schema to use when interpreting results. This may be null, in which case it will be fetched from
 /// the table first.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <returns>An asynchronous sequence of the rows within the table.</returns>
 public virtual IPagedAsyncEnumerable <TableDataList, BigqueryRow> ListRowsAsync(TableReference tableReference, TableSchema schema = null, ListRowsOptions options = null)
 {
     throw new NotImplementedException();
 }
 /// <summary>
 /// Lists the rows within a table within this client's project specified by dataset ID and table ID, similar to a <c>SELECT * FROM ...</c> query.
 /// This method just creates a <see cref="TableReference"/> and delegates to <see cref="ListRowsAsync(TableReference, TableSchema, ListRowsOptions)"/>.
 /// </summary>
 /// <param name="datasetId">The dataset ID. Must not be null.</param>
 /// <param name="tableId">The table ID. Must not be null.</param>
 /// <param name="schema">The schema to use when interpreting results. This may be null, in which case it will be fetched from
 /// the table first.</param>
 /// <param name="options">The options for the operation. May be null, in which case defaults will be supplied.</param>
 /// <returns>An asynchronous sequence of the rows within the table.</returns>
 public virtual IPagedAsyncEnumerable <TableDataList, BigqueryRow> ListRowsAsync(string datasetId, string tableId, TableSchema schema = null, ListRowsOptions options = null) =>
 ListRowsAsync(GetTableReference(datasetId, tableId), schema, options);
Ejemplo n.º 7
0
        /// <inheritdoc />
        public override BigqueryResult ListRows(TableReference tableReference, TableSchema schema = null, ListRowsOptions options = null)
        {
            GaxRestPreconditions.CheckNotNull(tableReference, nameof(tableReference));
            schema = schema ?? GetSchema(tableReference);

            Func <TabledataResource.ListRequest> requestProvider = () =>
            {
                var request = Service.Tabledata.List(tableReference.ProjectId, tableReference.DatasetId, tableReference.TableId);
                options?.ModifyRequest(request);
                return(request);
            };
            var firstResponse = requestProvider().Execute();

            return(new BigqueryResult(this, firstResponse, schema, requestProvider));
        }
        /// <inheritdoc />
        public override IPagedAsyncEnumerable <TableDataList, BigqueryRow> ListRowsAsync(TableReference tableReference, TableSchema schema = null, ListRowsOptions options = null)
        {
            GaxPreconditions.CheckNotNull(tableReference, nameof(tableReference));
            schema = schema ?? GetSchema(tableReference);

            var pageManager = new TableRowPageManager(this, schema);

            Func <TabledataResource.ListRequest> requestProvider = () =>
            {
                var request = Service.Tabledata.List(tableReference.ProjectId, tableReference.DatasetId, tableReference.TableId);
                options?.ModifyRequest(request);
                return(request);
            };

            return(new PagedAsyncEnumerable <TabledataResource.ListRequest, TableDataList, BigqueryRow>(
                       requestProvider,
                       pageManager));
        }