odbx_lo_close(3)

✨ odbx_lo_close(3) β€” the OpenDBX glow-up close-up ✨

okay so bestie, we're in the OpenDBX manual and this one is odbx_lo_close β€” the "say bye to your large object" girlie. she's short, she's sweet, she's literally the last thing you call. πŸŽ€


🌸 NAME 🌸

odbx_lo_close β€” closes a large object reference. that's it, that's the whole job, and she does it flawlessly. πŸ’…


✨ SYNOPSIS ✨

#include <opendbx/api.h>

int odbx_lo_close (odbx_lo_t* lo);

like, one include, one function call. the way that's so clean?? 🫢


πŸ’– DESCRIPTION πŸ’–

okay so here's the tea: this function commits any changes you made with odbx_lo_write() and then closes the open large object handle. so it's not just a goodbye wave, it's a save-then-goodbye</>. iconic behavior honestly. πŸ”₯

and this is the important part, no cap: if you just... don't call this function on your open large object handles? memory leaks. like, the data structure and its dependent memory are not freed. it's giving "forgot to close the tab and now your laptop is a jet engine" 😭 so please, call her. she's not asking twice. πŸ’€

the lo parameter has to be the large object handle that was created and returned by odbx_lo_open() via its second parameter. (yes, second. pay attention bestie. πŸ™ˆ)

after you hand it over to odbx_lo_close(), that handle becomes invalid β€” it's done, it's retired, it's on a beach somewhere β€” and if you try to ship it to this function again, you'll get an error. one and done, periodt. πŸ‘‘


⭐ RETURN VALUE ⭐

odbx_lo_close() returns ODBX_ERR_SUCCESS when everything slays, or an error code whose value is less than zero if one of the operations couldn't be completed successfully. 😭

possible error codes are listed down in the error section, and you can feed them to odbx_error() and odbx_error_type() to get further details. iykyk β€” that's how you get the full story. πŸ¦‹


πŸ’€ ERRORS πŸ’€

  • -ODBX_ERR_BACKEND β€” the native database library couldn't close the large object successfully. not her fault, the backend fumbled. 🫠
  • -ODBX_ERR_HANDLE β€” lo is NULL, or the supplied large object handle is invalid. like babe, that handle is not real. πŸ™ˆ

🌈 SEE ALSO 🌈

odbx_lo_open() β€” the one who started it all. you literally can't close without her. 🧚


and that's the whole page, bestie! go forth and close your large objects πŸ“πŸ’œ

p.s. this page is from the OpenDBX crew, dated 6 February 2026 β€” mwah, thanks for reading, love u, bye! πŸ’–βœ¨
πŸ“¦ where this page comes from