Class: Google::Apis::BigqueryV2::QueryResponse

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/bigquery_v2/classes.rb,
lib/google/apis/bigquery_v2/representations.rb,
lib/google/apis/bigquery_v2/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ QueryResponse

Returns a new instance of QueryResponse.



7785
7786
7787
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7785

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#cache_hitBoolean Also known as: cache_hit?

Whether the query result was fetched from the query cache. Corresponds to the JSON property cacheHit

Returns:

  • (Boolean)


7691
7692
7693
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7691

def cache_hit
  @cache_hit
end

#dml_statsGoogle::Apis::BigqueryV2::DmlStatistics

Detailed statistics for DML statements Corresponds to the JSON property dmlStats



7697
7698
7699
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7697

def dml_stats
  @dml_stats
end

#errorsArray<Google::Apis::BigqueryV2::ErrorProto>

Output only. The first errors or warnings encountered during the running of the job. The final message includes the number of errors that caused the process to stop. Errors here do not necessarily mean that the job has completed or was unsuccessful. For more information about error messages, see Error messages. Corresponds to the JSON property errors



7706
7707
7708
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7706

def errors
  @errors
end

#job_completeBoolean Also known as: job_complete?

Whether the query has completed or not. If rows or totalRows are present, this will always be true. If this is false, totalRows will not be available. Corresponds to the JSON property jobComplete

Returns:

  • (Boolean)


7712
7713
7714
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7712

def job_complete
  @job_complete
end

#job_creation_reasonGoogle::Apis::BigqueryV2::JobCreationReason

Reason about why a Job was created from a jobs.query method when used with JOB_CREATION_OPTIONAL Job creation mode. For jobs.insert method calls it will always be REQUESTED. Preview Corresponds to the JSON property jobCreationReason



7723
7724
7725
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7723

def job_creation_reason
  @job_creation_reason
end

#job_referenceGoogle::Apis::BigqueryV2::JobReference

A job reference is a fully qualified identifier for referring to a job. Corresponds to the JSON property jobReference



7728
7729
7730
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7728

def job_reference
  @job_reference
end

#kindString

The resource type. Corresponds to the JSON property kind

Returns:

  • (String)


7733
7734
7735
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7733

def kind
  @kind
end

#num_dml_affected_rowsFixnum

Output only. The number of rows affected by a DML statement. Present only for DML statements INSERT, UPDATE or DELETE. Corresponds to the JSON property numDmlAffectedRows

Returns:

  • (Fixnum)


7739
7740
7741
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7739

def num_dml_affected_rows
  @num_dml_affected_rows
end

#page_tokenString

A token used for paging results. A non-empty token indicates that additional results are available. To see additional results, query the jobs. getQueryResults method. For more information, see Paging through table data. Corresponds to the JSON property pageToken

Returns:

  • (String)


7748
7749
7750
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7748

def page_token
  @page_token
end

#query_idString

Auto-generated ID for the query. Preview Corresponds to the JSON property queryId

Returns:

  • (String)


7754
7755
7756
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7754

def query_id
  @query_id
end

#rowsArray<Google::Apis::BigqueryV2::TableRow>

An object with as many results as can be contained within the maximum permitted reply size. To get any additional rows, you can call GetQueryResults and specify the jobReference returned above. Corresponds to the JSON property rows



7761
7762
7763
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7761

def rows
  @rows
end

#schemaGoogle::Apis::BigqueryV2::TableSchema

Schema of a table Corresponds to the JSON property schema



7766
7767
7768
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7766

def schema
  @schema
end

#session_infoGoogle::Apis::BigqueryV2::SessionInfo

[Preview] Information related to sessions. Corresponds to the JSON property sessionInfo



7771
7772
7773
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7771

def session_info
  @session_info
end

#total_bytes_processedFixnum

The total number of bytes processed for this query. If this query was a dry run, this is the number of bytes that would be processed if the query were run. Corresponds to the JSON property totalBytesProcessed

Returns:

  • (Fixnum)


7777
7778
7779
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7777

def total_bytes_processed
  @total_bytes_processed
end

#total_rowsFixnum

The total number of rows in the complete query result set, which can be more than the number of rows in this single page of results. Corresponds to the JSON property totalRows

Returns:

  • (Fixnum)


7783
7784
7785
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7783

def total_rows
  @total_rows
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7790

def update!(**args)
  @cache_hit = args[:cache_hit] if args.key?(:cache_hit)
  @dml_stats = args[:dml_stats] if args.key?(:dml_stats)
  @errors = args[:errors] if args.key?(:errors)
  @job_complete = args[:job_complete] if args.key?(:job_complete)
  @job_creation_reason = args[:job_creation_reason] if args.key?(:job_creation_reason)
  @job_reference = args[:job_reference] if args.key?(:job_reference)
  @kind = args[:kind] if args.key?(:kind)
  @num_dml_affected_rows = args[:num_dml_affected_rows] if args.key?(:num_dml_affected_rows)
  @page_token = args[:page_token] if args.key?(:page_token)
  @query_id = args[:query_id] if args.key?(:query_id)
  @rows = args[:rows] if args.key?(:rows)
  @schema = args[:schema] if args.key?(:schema)
  @session_info = args[:session_info] if args.key?(:session_info)
  @total_bytes_processed = args[:total_bytes_processed] if args.key?(:total_bytes_processed)
  @total_rows = args[:total_rows] if args.key?(:total_rows)
end