Class GoogleDataProtocolAPI
- java.lang.Object
-
- org.teiid.spring.data.google.dataprotocol.GoogleDataProtocolAPI
-
public class GoogleDataProtocolAPI extends Object
This class is used to make requests to Google Visualization Data Protocol. The most important method is executeQuery.- Author:
- fnguyen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
GoogleDataProtocolAPI.DataProtocolQueryStrategy
Logic to query portion of data from Google Visualization Data Protocol.
-
Constructor Summary
Constructors Constructor Description GoogleDataProtocolAPI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.teiid.translator.google.api.result.RowsResult
executeQuery(org.teiid.translator.google.api.metadata.SpreadsheetInfo info, String worksheetTitle, String query, int batchSize, Integer offset, Integer limit)
Most important method that will issue query [1] to specific worksheet.List<org.teiid.translator.google.api.metadata.Column>
getMetadata(String key, String worksheetTitle)
void
setCredentialUtil(GoogleCredentialUtil util)
-
-
-
Field Detail
-
ENCODING
public static String ENCODING
-
-
Method Detail
-
setCredentialUtil
public void setCredentialUtil(GoogleCredentialUtil util)
-
executeQuery
public org.teiid.translator.google.api.result.RowsResult executeQuery(org.teiid.translator.google.api.metadata.SpreadsheetInfo info, String worksheetTitle, String query, int batchSize, Integer offset, Integer limit)
Most important method that will issue query [1] to specific worksheet. The columns in the query should be identified by their real alphabetic name (A, B, C...). There is one important restriction to query. It should not contain offset and limit clauses. To achieve functionality of offset and limit please use corresponding parameters in this method. [1] https://developers.google.com/chart/interactive/docs/querylanguage- Parameters:
info
- The google spreadsheetInfoworksheetTitle
- The spreadsheet titlequery
- The query defined in [1]batchSize
- How big portions of data should be returned by one roundtrip to Google.offset
- The offset to use, if not nulllimit
- The limit to use, if not null- Returns:
- Iterable RowsResult that will actually perform the roundtrips to Google for data
-
-