Fork me on GitHub
#pedestal
<
2017-04-29
>
rui.yang12:04:32

Hi, wonder if there is any way to automatically do type casting in routing, e.g. for :path-params

rui.yang12:04:01

seems that pedestal always return path-params as string

rui.yang12:04:12

but for route /orders/:order_id, ideally, :order_id could be Integer. If without type casting, postgresql will complain cannot compare integer with char.

rui.yang12:04:40

Currently, I have to do it manually.

skylar17:04:03

Thanks @ddeaguiar, that helps a lot