What Type Argument for BigQueryResult<T>

I have this code:

BigQueryResult<T> bqResult = conn.executeSelect("SELECT * from ZeroPage");

What is T supposed to be? There is no doc or example on this.

 

Solved Solved
0 1 143
1 ACCEPTED SOLUTION

Hi @Bill6502,

Welcome to Google Cloud Community!

BigQueryResult<T> Type Argument Summary:

  1. Generic Class: BigQueryResult<T> holds data of type T.
  2. T Matches Query Result: Analyze your query's SELECT to determine T.
  3. Single Column: Use that column's data type directly for T.
  4. Multiple Columns: Create a custom class/struct to combine them for T.
  5. Library Documentation: Check library/framework for specific details.
  6. Experimentation: Try different types if unsure, observe results.

Remember, matching T to your actual query and data types is crucial!

View solution in original post

1 REPLY 1

Hi @Bill6502,

Welcome to Google Cloud Community!

BigQueryResult<T> Type Argument Summary:

  1. Generic Class: BigQueryResult<T> holds data of type T.
  2. T Matches Query Result: Analyze your query's SELECT to determine T.
  3. Single Column: Use that column's data type directly for T.
  4. Multiple Columns: Create a custom class/struct to combine them for T.
  5. Library Documentation: Check library/framework for specific details.
  6. Experimentation: Try different types if unsure, observe results.

Remember, matching T to your actual query and data types is crucial!