I never really understood where to find the documentation of what functions are available from the slick-pg library, but I finally found them! And as I was scanning through to search for something else that I wanted, I saw the asGeoJSON function! I'm pretty sure that we are creating geoJSON manually in some places, or using other libraries. We should try to do it directly from slick-pg! It will likely be faster to do this on the db side, and could simplify our code! Here's the documentation:
https://github.com/tminglei/slick-pg/tree/slick2/core/src/main/scala/com/github/tminglei/slickpg/geom#geometry-outputs
And if you look one directory up, it has all the documentation divvied up by data type! There are likely places where I've resorted to writing plain SQL instead of using Slick because I couldn't figure out how to do it using Slick, and we can probably convert some of those to Slick after looking through this!
Brief description of problem/feature
I never really understood where to find the documentation of what functions are available from the slick-pg library, but I finally found them! And as I was scanning through to search for something else that I wanted, I saw the
asGeoJSON
function! I'm pretty sure that we are creating geoJSON manually in some places, or using other libraries. We should try to do it directly from slick-pg! It will likely be faster to do this on the db side, and could simplify our code! Here's the documentation: https://github.com/tminglei/slick-pg/tree/slick2/core/src/main/scala/com/github/tminglei/slickpg/geom#geometry-outputsAnd if you look one directory up, it has all the documentation divvied up by data type! There are likely places where I've resorted to writing plain SQL instead of using Slick because I couldn't figure out how to do it using Slick, and we can probably convert some of those to Slick after looking through this!