Last active
November 30, 2018 15:05
-
-
Save dbauszus-glx/8f64d67ba45684e239dc6d6e5ed964b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = async (layer, table, id) => { | |
const q = ` | |
DELETE FROM ${table}__mvts | |
WHERE | |
ST_Intersects( | |
tile, | |
(SELECT ${layer.geom_3857} FROM ${table} WHERE ${layer.qID} = $1) | |
);`; | |
await global.pg.dbs[layer.dbs](q, [id]); | |
return; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment