drogonframework / drogon

Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows
MIT License
11.04k stars 1.06k forks source link

drogon_ctl create model treats charvar[] (arrays) as std::string. #2026

Open Ayman250 opened 1 month ago

Ayman250 commented 1 month ago

I have columns of type character varying[] in postgres and the classes generated by create model treat them as strings. Is there a reason for this? What is the proper way to handle columns of charvar arrays?

Ayman250 commented 1 month ago

This doesn't seem to work out of the box, for now I have to parse it in and out of a string from the HttpRequest and change the DB column to charvar.

an-tao commented 1 month ago

I'm not sure but you could try the drogon::orm::ArrayParser to do this.