Reference documentation and code samples for the BigQuery API class Google::Cloud::Bigquery::Time.
Time
A TIME data type represents a time, independent of a specific date.
Inherits
Struct
Examples
require"google/cloud/bigquery"
bigquery=Google::Cloud::Bigquery.newfourpm=Google::Cloud::Bigquery::Time.new"16:00:00"
data=bigquery.query"SELECTname " \"FROM`my_project.my_dataset.my_table`"\"WHEREtime_of_date=@time",params:{time:fourpm}# Iterate over the first page of resultsdata.eachdo|row|putsrow[:name]end# Retrieve the next page of resultsdata=data.nextifdata.next?
Create Time with fractional seconds:
require"google/cloud/bigquery"
bigquery=Google::Cloud::Bigquery.newprecise_time=Google::Cloud::Bigquery::Time.new"16:35:15.376541"
data=bigquery.query"SELECTname " \"FROM`my_project.my_dataset.my_table`"\"WHEREtime_of_date>=@time",params:{time:precise_time}# Iterate over the first page of resultsdata.eachdo|row|putsrow[:name]end# Retrieve the next page of resultsdata=data.nextifdata.next?