Commit Graph

45 Commits

Author SHA1 Message Date
Eneko Lakasta
ae48a01e26 extract setICUEnvVariable() to it's own module 2018-01-11 11:57:11 +01:00
Daniel García Aubert
a987f6ac05 Fix issue when the sql has single quotes defined and the aggregation metadata query was not able to estimate row count 2017-12-14 14:14:55 +01:00
Daniel García Aubert
006dd86614 Merge branch 'master' into mapconfig-aggregation 2017-12-11 17:36:58 +01:00
Daniel García Aubert
dab204ea71 Do not aggregate if rows cout is lower than threshold or the layer's sql has geometries distinct of points 2017-12-11 17:32:06 +01:00
Raul Marin
dfe01c836c Escape getQueryRowCount with $$ 2017-12-11 11:27:13 +01:00
Raul Marin
fcbf5ffcc5 Move sql helper functions to query-utils.js 2017-12-11 11:27:13 +01:00
Mario de Frutos
ed56094be2 PR changes 2017-05-18 11:51:12 +02:00
Raul Ochoa
c539d4fbbd Change camshaft naming from filters 2016-07-06 21:11:39 +02:00
Raul Ochoa
863128013d Use psql client instead of pg query runner to use proper params 2016-06-21 12:08:40 +02:00
Raul Ochoa
403dcbebcd Use an empty array as default value for falsy ramps
Fixes #507
2016-06-20 13:27:39 +02:00
Raul Ochoa
01a69ef15c Merge remote-tracking branch 'origin/master' into mapconfig-reorg 2016-05-23 15:14:25 +02:00
Raul Ochoa
fb045f1836 Merge branch 'master' into turbo-carto-tokens 2016-05-23 15:06:55 +02:00
Raul Ochoa
ee49b8b2a2 Turbo-carto adapter into adapters package 2016-05-23 14:18:58 +02:00
Raul Ochoa
b308259e6f Merge branch 'master' into turbo-carto-category
Conflicts:
	lib/cartodb/utils/style/postgres-datasource.js
2016-05-19 16:58:31 +02:00
Raul Ochoa
14a0afc7c0 Merge branch 'master' into turbo-carto-tokens 2016-05-19 16:56:00 +02:00
Raul Ochoa
424cc6d93b Fail on turbo-carto invalid quantification methods 2016-05-19 15:54:58 +02:00
Raul Ochoa
3bacfecc49 Merge branch 'master' into turbo-carto-category 2016-05-19 13:43:35 +02:00
Raul Ochoa
ee94b8a587 Very raw implementation of SubstitutionTokens based on origin data 2016-05-19 12:13:49 +02:00
Raul Ochoa
ba08745c23 Adds hasTokens method to SubstitutionTokens 2016-05-19 12:10:19 +02:00
Raul Ochoa
573932efba Simplify condition and use positive naming for parsing cartocss 2016-05-19 11:48:57 +02:00
Javier Goizueta
e98a5aeff0 Small code clean-up 2016-05-18 15:48:30 +02:00
Javier Goizueta
4c375780c7 replace underscore functions by standard (ES5) equivalents
Note: _.find(a,...) is not replaced by a.find(...)
because it is not available for all the collections
we need it for.
2016-05-18 15:43:20 +02:00
Javier Goizueta
48415fb1f3 Merge branch 'master' into overviews-widgets-2 2016-05-18 13:58:55 +02:00
Javier Goizueta
cb3706e5cf Update Query Rewriter comments 2016-05-18 08:04:11 +02:00
Raul Ochoa
a1934c87d5 Adds turbo-carto category quantification with exact strategy 2016-05-17 19:45:37 +02:00
Javier Goizueta
42ef40282b 💄 shorten long lines 2016-05-17 15:46:13 +02:00
Javier Goizueta
7f7204df6c Add filter stats information to query rewriter data 2016-05-17 15:41:31 +02:00
Raul Ochoa
8fb35571fe Adds support for mapnik substitution token at turbo-carto level
Goes green and fixes #455
2016-05-17 15:00:18 +02:00
Javier Goizueta
df63fbbd04 Refactor filter application into own model
This also avoids storing an object in the overviews query rewriter
for the bbox filter (a plain data structure is used instead).
2016-05-17 13:55:00 +02:00
Javier Goizueta
9d82e8c27c Use bounding box of dataviews to select overviews level 2016-05-13 20:47:36 +02:00
Javier Goizueta
224eb392ba Add overviews-dependent dataviews behaviour
Now QueryRewriter is used in dataview objects they can decide
whether overviews are applicable, have the oportunity to
adapt queries for overviews, etc.
This is done by having overviews-related behaviour in models/dataview/overviews
and falling back to the regular models/dataview.
2016-05-13 18:46:58 +02:00
Raul Ochoa
2e26e2e126 Use split strategy for head/tails turbo-carto quantification 2016-05-13 12:57:43 +02:00
Raul Ochoa
61765d20e1 Fail on turbo-carto specific errors
This will try to fallback on postcss errors so it still targets
carto parser in those cases.

Closes #434
2016-05-13 12:10:05 +02:00
Javier Goizueta
b574489950 Refactor to reduce cyclomatic complexity 2016-05-12 18:47:24 +02:00
Javier Goizueta
85788f42a6 Adapt QueryRewriter to new requirements 2016-05-12 18:30:10 +02:00
Raul Ochoa
dd731399dc Starts using turbo-carto dependency 2016-04-26 16:28:05 +02:00
Javier Goizueta
a0445b5cdd 💄 Fix indentation
2 spaces were used instead of 4 in some places
2016-04-20 17:47:43 +02:00
Javier Goizueta
7902b276ad Support unneeded schema names in overviews queries
Fixes #420
Keep table schema of overviews base tables and use it
to support queries that use the schema name when not
strictly needed.
2016-04-19 22:50:05 +02:00
Javier Goizueta
fa2e884605 Support overviews for named layer wrapped queries
Fix #405
2016-04-01 15:40:44 +02:00
Daniel García Aubert
dab4b6d56b Implemented integration of turbo-cartocss for named maps 2016-03-10 20:45:00 +01:00
Daniel García Aubert
a0073da4b3 Added regression test for turbo-cartocss' integration 2016-03-09 11:48:07 +01:00
Daniel García Aubert
ab6004f21e Integrated turbo-cartocss for anonymous maps 2016-03-08 14:34:57 +01:00
Javier Goizueta
4e40a61795 Change form of overviews queries so they can be optimized
The PostgreSQL planner wasn't applying the spatial filtering of
tile bounds to the queries efficiently.
2016-03-02 19:25:08 +01:00
Javier Goizueta
56095926e0 Remove CartCSS handling from QueryRewriter
QueryRewriter doesn't require a style method anymore
2016-02-05 08:23:02 +01:00
Javier Goizueta
0a218da835 Implement an Overviews query rewriter
Use the Windshaft query-rewriter interface to adapt queries so
they use available overview tables.

This requires a version of Windshaft that implements the query-rewriter
interface (package.json/npm-shrinkwap.json have yet to be updated)
2016-02-04 10:26:31 +01:00