Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 22 19:19
    lganzzzo commented #439
  • Jun 22 19:18
    lganzzzo commented #439
  • Jun 22 19:07
    remioukrat opened #439
  • Jun 16 22:56
    lganzzzo labeled #438
  • Jun 16 22:56
    lganzzzo commented #438
  • Jun 15 13:51
    XunChangqing opened #438
  • Jun 14 06:33
    bamkrs commented #437
  • Jun 14 06:25
    bamkrs labeled #437
  • Jun 14 06:25
    bamkrs labeled #437
  • Jun 13 21:06
    satarovbekzhan edited #437
  • Jun 13 21:03
    satarovbekzhan opened #437
  • Jun 11 12:57
    lganzzzo commented #382
  • Jun 11 12:57

    lganzzzo on better_json

    (compare)

  • Jun 11 12:46
    bamkrs closed #382
  • Jun 11 12:46

    bamkrs on v1.3.0

    json::mapping::Serializer::Conf… (compare)

  • Jun 11 12:46
    bamkrs commented #382
  • Jun 11 11:23
    lganzzzo labeled #436
  • Jun 11 11:23
    lganzzzo commented #436
  • Jun 11 09:54
    lganzzzo commented #435
  • Jun 11 09:53

    lganzzzo on master

    Add option to link with MSVC st… Make MSVC runtime setting avail… Merge pull request #435 from Ya… (compare)

oat++
@oatpp_io_twitter
👍
Zach
@acidtonic
Hey I may have found a bug not sure
I can't get postgres to work with a DTO that has Float32
the underlying type is REAL, I can't map with Float8 it doesn't exist, so I use Float32 and get this. [oatpp::postgresql::mapping::Deserializer::deserializeFloat32()]: Error. Unknown OID.
oat++
@oatpp_io_twitter
Please post here what postgres type you have in DDL, and the query from the db client
@acidtonic
Zach
@acidtonic
yep let me get that together for you
oat++
@oatpp_io_twitter
Please post it here,- I'll answer as soon as I test it.- in about 5h
Zach
@acidtonic
just realized what it was, migration failed, field was not a real on the backend db.
oat++
@oatpp_io_twitter
Oh, good,no bug then:)
Gaswigue
@Gaswigue

@oatpp_io_twitter

oatpp::String binaryData(myBuffer.data, myBuffer.size, true);
auto response = OutgoingResponse::createShared(Status::CODE_200, binaryData);

I try but MSVC tell me that it cannot convert binaryData oatpp::string to ...::http::outgoing:body

oat++
@oatpp_io_twitter
No need to create Response object directly
Hey @Gaswigue , just use the convenience Controller::createResponse() method
José María Martín
@jose-martin-m

@oatpp_io_twitter to add the content type header i have to do:

API_CALL("POST", "api/controller.cgi", doPost, BODY_STRING(String, body), HEADER(String, cookie, "Cookie"),  HEADER(String, content_type, "Content-Type"))

and

auto response = client_->doPost("parameter1=example1&parameter2=example2", "sample cookie data", "application/x-www-form-urlencoded");

right?

Yeah, that was it. Thanks!
sunrongyi
@sunrongyi
dbResult->fetch<oatpp::String>() ; Can I use like this?
Gaswigue
@Gaswigue
It was so simple ! I didn't find this function ;) Thank you @oatpp_io_twitter
oat++
@oatpp_io_twitter

Hey @sunrongyi ,

dbResult->fetch<oatpp::String>() ; Can I use like this?

No, for a single value you have to do like this:

auto dataset = dbResult->fetch<oatpp::Vector<oatpp::Vector<oatpp::String>>>();
oatpp::String value = dataset[0][0];

For more info - see this issue - oatpp/oatpp-sqlite#9

Zach
@acidtonic

I have a report of some oddities with floating point numbers, wondering if this is normal (ieee754 related) or something I maybe didn't line up right....

Version number send : 3.3
Version number received : 3.299999952316284

REAL in postgres, mapped as Float32 in the DTO
oat++
@oatpp_io_twitter
Yes, for 32-bit float it's ok
Louis Jean
@Bycob
I'm receiving an uploaded file as form/multipart. I used multipart "stream part to file" example here: https://oatpp.io/docs/features/upload-file/
Is it possible to read the file name or any information about the part, before creating the filePartReader? I need the upload file name / content type to determine the output file path
oat++
@oatpp_io_twitter
Hello @Bycob , as of now the common way to do it is to read file to a random temporary file, and then, if success, move that file to the desired destination
With the current API you have to create part readers before receiving the data
Louis Jean
@Bycob
allright I'll do like that, thanks!
Jason Melton
@jasonmelton
Hello friends, I am trying to evaluate if the ORM bits of Oat++ would be a good match for my project, but I am not having much luck getting the example-postgresql to work. Getting a SIGSEV. Pastebin of the complete procedure including valgrind: https://pastebin.com/hnjYDWdm
Would appreciate any help or a simple postgresql orm Only example to try out. Thanks!
oat++
@oatpp_io_twitter
Hey @jasonmelton ,
to clarify - are you using the latest example-postgresql ?
The code is unmodified?
If so, I would suggest pulling the latest master of oatpp + oatpp-swagger + oatpp-postgres
Jason Melton
@jasonmelton
yes
oat++
@oatpp_io_twitter
And reinstall everything
Jason Melton
@jasonmelton
I'm willing to give it another go round! I'll try rebuilding everying tomorrow
oat++
@oatpp_io_twitter
Do you have this crash on the startup of the example project? - most probably it's something wrong with the installation - maybe some old files left from the previous installations

I'm willing to give it another go round! I'll try rebuilding everying tomorrow

Thanks, please let me know if it worked

Jason Melton
@jasonmelton
yes, i have been messing with it for some times, so it is probably best to start from square 1. I'll give it a go and report back, I want to find a good answer for my needs here and I like the way oat++ looks
oat++
@oatpp_io_twitter
Thanks,
Please let me know even if the crash persists - so that we have the information to fix that
Denis
@elgatito
Building with sanitizer often helps to see the problem
Jason Melton
@jasonmelton
Did a rebuild of everything before quitting for the day, still seg fault: https://pastebin.com/pGXbe6Vj
It does create the tables, so it is partially working, can't see why though
oat++
@oatpp_io_twitter
Have you rebuilt the swagger also ?
@jasonmelton
On the app startup it does DB-Migrations and caching swagger-ui files + swagger generation
So most probably that crash is caused by one of those
since we see migrations work fine - I guess it might be the swagger problem
Jason Melton
@jasonmelton
Hm. I did rebuild everything (oat, oat-postsgres, oat-swagger). Do I need swagger? I'm only interested in database ORM, not API/web stuff
oat++
@oatpp_io_twitter
For ORM you don't need swagger. It's needed for the exaple project
However you can try to remove it. We just need to nail down what causes the crash on your machine.
Jason Melton
@jasonmelton
ok, is there anything i should do before trying to pull out swagger then? I have some time to do some testing, but I'm not sure what to do to help isolate the issue
Jason Melton
@jasonmelton
Alright, I basically just pulled out the swagger stuff and no segfault, so I assume the problem is there. As it isn't an area of interest I am going to proceed with trying to adopt the remainder of the example -- thank you for the help
oat++
@oatpp_io_twitter

@jasonmelton ,

Interesting why swagger has failed on your machine. There was a similar issue discussed here some time ago. It was fixed by removing cache and reinstalling oatpp + oatpp/swagger.
I don't know if this is the same case.

Zach
@acidtonic

I also had similar "oddness" in the past with crashes around allocators and the COMPONENT macros. I run Gentoo and it's possible (easy?) to upgrade various parts of the operating system without getting it all done correctly. Something simple such as a minor GCC upgrade sometimes means libraries are hanging around partially built with the new/old compilers as the linker combines things. The postgres library libpqxx is rather sensitive to any differences in the lower level libraries it uses (glibc/gcc/etc) and if you get weird crashes it sometimes is related to simple mismatch or partial compiler upgrade without rebuilding all the downstream libraries.

So maybe this would be resolved simply by double checking the library link consistency (revdep-rebuilld equivalent for other operating systems)