- execute(email, key, project, query, service, params)
executes a query using Google Bigquery API
- authFastly(token, service)
authenticates token and service with Fastly
- loadQuery(query)
reads a query file and loads it into memory
- cleanQueryParams(query, params)
strips params object of helix query parameters
- queryReplace(query, params)
replaces helix query parameter placeholders denoted by ^param in a query with value in param object. Example; SELECT * FROM ^tablename ^tabename is the query parameter; so it's expected that the params object contains {tablename: 'some-value'}
- getExtraParameters(query)
processes additional parameters to be passed into request for example; --- Cache-Control: max-age: 300.
- cleanRequestParams(params)
removes used up parameters from request
executes a query using Google Bigquery API
Kind: global function
Param | Type | Description |
---|---|---|
string |
email address of the Google service account | |
key | string |
private key of the global Google service account |
project | string |
the Google project ID |
query | string |
the name of a .sql file in queries directory |
service | string |
the serviceid of the published site |
params | object |
parameters for substitution into query |
authenticates token and service with Fastly
Kind: global function
Param | Type | Description |
---|---|---|
token | string |
Fastly Authentication Token |
service | string |
serviceid for a helix-project |
reads a query file and loads it into memory
Kind: global function
Param | Type | Description |
---|---|---|
query | string |
name of the query file |
strips params object of helix query parameters
Kind: global function
Param | Type | Description |
---|---|---|
query | string |
the content read from a query file |
params | object |
query parameters, that are inserted into query |
replaces helix query parameter placeholders denoted by ^param in a query with value in param object. Example; SELECT * FROM ^tablename ^tabename is the query parameter; so it's expected that the params object contains {tablename: 'some-value'}
Kind: global function
Param | Type | Description |
---|---|---|
query | string |
the content read from a query file |
params | * |
query parameters, that are inserted into query |
processes additional parameters to be passed into request for example; --- Cache-Control: max-age: 300.
Kind: global function
Param | Type | Description |
---|---|---|
query | string |
the content read from a query file |
removes used up parameters from request
Kind: global function
Param | Type | Description |
---|---|---|
params | object |
all parameters contained in a request |