lithium icon indicating copy to clipboard operation
lithium copied to clipboard

Pgsql doesn't seem to compile with ToT anymore

Open oxcug opened this issue 3 years ago • 2 comments

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?

Screen Shot 2022-06-09 at 08 11 06

oxcug avatar Jun 09 '22 14:06 oxcug

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.

matt-42 avatar Jun 10 '22 07:06 matt-42

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.

oxcug avatar Jun 30 '22 04:06 oxcug