APIJSON icon indicating copy to clipboard operation
APIJSON copied to clipboard

[Feature] 关于mysql MULTIPOLYGON 类型函数的支持

Open QingShan512 opened this issue 2 years ago • 3 comments

Description

SELECT id,camera_name FROM ivs_video_device WHERE st_contains(view_area, POINT(3, 3)); update ivs_video_device set view_area = st_geomfromtext('MULTIPOLYGON(((2 2, 2 7, 7 7, 7 2, 2 2)))') where id = 1694855561796;

我希望可以对MULTIPOLYGON使用查询和新增函数,但是目前未找到解决方案

QingShan512 avatar Oct 31 '23 03:10 QingShan512

用 @raw,把 POINT(3, 3) / st_contains(view_area, POINT(3, 3)) 和 st_geomfromtext('MULTIPOLYGON(((2 2, 2 7, 7 7, 7 2, 2 2)))') 作为原始 SQL 片段 https://github.com/Tencent/APIJSON/issues/588

TommyLemon avatar Nov 12 '23 10:11 TommyLemon

新增支持多字段 IN,SQL 函数 作为 表达式 左侧 值 等条件 https://github.com/Tencent/APIJSON/commit/0e947d2d851bcd13cc60d957d4321ea5336e6d66 image

"st_contains_view_area_point_3_3": 1, "@key":"st_contains_view_area_point_3_3:st_contains(view_area,POINT(3,3))"

TommyLemon avatar Nov 12 '23 10:11 TommyLemon

收到

QingShan512 avatar Nov 13 '23 02:11 QingShan512