Add quota functions to client #302
This commit is contained in:
parent
efb10e43e4
commit
37a3214f67
@ -377,3 +377,16 @@
|
|||||||
multi_field: true
|
multi_field: true
|
||||||
params:
|
params:
|
||||||
- { name: aggregate_type, type: text, default: 'NULL' }
|
- { name: aggregate_type, type: text, default: 'NULL' }
|
||||||
|
|
||||||
|
- name: cdb_service_params
|
||||||
|
return_type: SETOF cdb_dataservices_client.service_params
|
||||||
|
multi_row: true
|
||||||
|
no_params: true
|
||||||
|
params:
|
||||||
|
- {}
|
||||||
|
|
||||||
|
- name: cdb_enough_quota
|
||||||
|
return_type: BOOLEAN
|
||||||
|
params:
|
||||||
|
- { name: service, type: cdb_dataservices_client.service_type }
|
||||||
|
- { name: input_size, type: NUMERIC }
|
@ -18,3 +18,21 @@ CREATE TYPE cdb_dataservices_client.obs_meta_denominator AS (denom_id text, deno
|
|||||||
CREATE TYPE cdb_dataservices_client.obs_meta_geometry AS (geom_id text, geom_name text, geom_description text, geom_weight text, geom_aggregate text, geom_license text, geom_source text, valid_numer boolean, valid_denom boolean, valid_timespan boolean, score numeric, numtiles bigint, notnull_percent numeric, numgeoms numeric, percentfill numeric, estnumgeoms numeric, meanmediansize numeric);
|
CREATE TYPE cdb_dataservices_client.obs_meta_geometry AS (geom_id text, geom_name text, geom_description text, geom_weight text, geom_aggregate text, geom_license text, geom_source text, valid_numer boolean, valid_denom boolean, valid_timespan boolean, score numeric, numtiles bigint, notnull_percent numeric, numgeoms numeric, percentfill numeric, estnumgeoms numeric, meanmediansize numeric);
|
||||||
|
|
||||||
CREATE TYPE cdb_dataservices_client.obs_meta_timespan AS (timespan_id text, timespan_name text, timespan_description text, timespan_weight text, timespan_aggregate text, timespan_license text, timespan_source text, valid_numer boolean, valid_denom boolean, valid_geom boolean);
|
CREATE TYPE cdb_dataservices_client.obs_meta_timespan AS (timespan_id text, timespan_name text, timespan_description text, timespan_weight text, timespan_aggregate text, timespan_license text, timespan_source text, valid_numer boolean, valid_denom boolean, valid_geom boolean);
|
||||||
|
|
||||||
|
|
||||||
|
-- For quotas and services configuration
|
||||||
|
CREATE TYPE cdb_dataservices_client.service_type AS ENUM (
|
||||||
|
'isolines',
|
||||||
|
'hires_geocoder',
|
||||||
|
'routing',
|
||||||
|
'observatory',
|
||||||
|
'internal_geocoder'
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TYPE cdb_dataservices_client.service_params AS (
|
||||||
|
service cdb_dataservices_client.service_type,
|
||||||
|
monthly_quota NUMERIC,
|
||||||
|
used_quota NUMERIC,
|
||||||
|
soft_limit BOOLEAN,
|
||||||
|
provider TEXT
|
||||||
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user