Safe Haskell | None |
---|---|
Language | Haskell2010 |
Working example:
$ curl -XPOST http://localhost:8080/v2/query -d @- <<EOF { "type":"bigquery_run_sql", "args": { "sql":"select 3 * 4 as foo, "Hello, World!" as bar", "source":"chinook" } } EOF {"result_type":TuplesOk,"result":[["foo","bar"],["12","Hello, World!"]]}
Synopsis
- data BigQueryRunSQL = BigQueryRunSQL {
- _mrsSql :: Text
- _mrsSource :: SourceName
- runSQL :: (MonadIO m, CacheRWM m, MonadError QErr m, MetadataM m) => BigQueryRunSQL -> m EncJSON
- runDatabaseInspection :: (MonadIO m, CacheRWM m, MonadError QErr m, MetadataM m) => BigQueryRunSQL -> m EncJSON
- runSQL_ :: (MonadIO m, CacheRWM m, MonadError QErr m, MetadataM m) => (RecordSet -> Value) -> BigQueryRunSQL -> m EncJSON
- recordSetAsHeaderAndRows :: RecordSet -> Value
- recordSetAsSchema :: RecordSet -> Value
Documentation
data BigQueryRunSQL Source #
BigQueryRunSQL | |
|
Instances
Eq BigQueryRunSQL Source # | |
Defined in Hasura.Backends.BigQuery.DDL.RunSQL (==) :: BigQueryRunSQL -> BigQueryRunSQL -> Bool # (/=) :: BigQueryRunSQL -> BigQueryRunSQL -> Bool # | |
Show BigQueryRunSQL Source # | |
Defined in Hasura.Backends.BigQuery.DDL.RunSQL showsPrec :: Int -> BigQueryRunSQL -> ShowS # show :: BigQueryRunSQL -> String # showList :: [BigQueryRunSQL] -> ShowS # | |
FromJSON BigQueryRunSQL Source # | |
Defined in Hasura.Backends.BigQuery.DDL.RunSQL parseJSON :: Value -> Parser BigQueryRunSQL parseJSONList :: Value -> Parser [BigQueryRunSQL] | |
ToJSON BigQueryRunSQL Source # | |
Defined in Hasura.Backends.BigQuery.DDL.RunSQL toJSON :: BigQueryRunSQL -> Value toEncoding :: BigQueryRunSQL -> Encoding toJSONList :: [BigQueryRunSQL] -> Value toEncodingList :: [BigQueryRunSQL] -> Encoding |
runSQL :: (MonadIO m, CacheRWM m, MonadError QErr m, MetadataM m) => BigQueryRunSQL -> m EncJSON Source #
runDatabaseInspection :: (MonadIO m, CacheRWM m, MonadError QErr m, MetadataM m) => BigQueryRunSQL -> m EncJSON Source #
The SQL query in the request is ignored
runSQL_ :: (MonadIO m, CacheRWM m, MonadError QErr m, MetadataM m) => (RecordSet -> Value) -> BigQueryRunSQL -> m EncJSON Source #
recordSetAsHeaderAndRows :: RecordSet -> Value Source #
recordSetAsSchema :: RecordSet -> Value Source #