1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
open Awso_redshift_data
open Awso_sync
module Io = Http.Io
let eval ?endpoint_url ?cfg endpoint input =
Io.bind (Io.resolve_cfg cfg)
(fun cfg ->
let meth = Endpoints.method_of_endpoint endpoint in
let uri = Endpoints.uri_of_endpoint endpoint input in
Io.map
(Io.call ?endpoint_url ~cfg ~service:Values.service meth
(Endpoints.to_request endpoint input) uri)
(fun resp_result -> Endpoints.of_response endpoint resp_result))
let batch_execute_statement ?endpoint_url ?cfg input =
eval ?endpoint_url ?cfg Endpoints.BatchExecuteStatement input
let cancel_statement ?endpoint_url ?cfg input =
eval ?endpoint_url ?cfg Endpoints.CancelStatement input
let describe_statement ?endpoint_url ?cfg input =
eval ?endpoint_url ?cfg Endpoints.DescribeStatement input
let describe_table ?endpoint_url ?cfg input =
eval ?endpoint_url ?cfg Endpoints.DescribeTable input
let execute_statement ?endpoint_url ?cfg input =
eval ?endpoint_url ?cfg Endpoints.ExecuteStatement input
let get_statement_result ?endpoint_url ?cfg input =
eval ?endpoint_url ?cfg Endpoints.GetStatementResult input
let get_statement_result_v2 ?endpoint_url ?cfg input =
eval ?endpoint_url ?cfg Endpoints.GetStatementResultV2 input
let list_databases ?endpoint_url ?cfg input =
eval ?endpoint_url ?cfg Endpoints.ListDatabases input
let list_schemas ?endpoint_url ?cfg input =
eval ?endpoint_url ?cfg Endpoints.ListSchemas input
let list_statements ?endpoint_url ?cfg input =
eval ?endpoint_url ?cfg Endpoints.ListStatements input
let list_tables ?endpoint_url ?cfg input =
eval ?endpoint_url ?cfg Endpoints.ListTables input