lithium
lithium copied to clipboard
Pgsql doesn't seem to compile with ToT anymore
Hey @matt-42 ! I just pulled from ToT and looks like there are some pgsql specific compiler errors when I import #include <lithium_pgsql.hh>. Any chance we could get a fix for this?
Hi @oxcug Could you post the line that is triggering this error ? Seems like you are passing a type to lithium pgsql that is not supported but I'm not sure about it.
Sorry about the delay, the error came from a lack of support for uint64_t from the read_optional template function in the sql headers. e.g:
auto stmt = conn.prepare("SELECT some, foo FROM things WHERE foo=?");
const auto an_optional = stmt(thing).read_optional<uint64_t /* <- looks like this is unsupported */, std::string>();
if (an_optional.has_value()) {
Looks like it's just a "you're holding it wrong" kind of problem but would be nice to have more type support. Changing the type to int fixed my issue.