mt_dbflag(3)

πŸ“¦
version 0.9.35 Β· 4 versions
, in ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– mt_dbflag(3) πŸ’– β€” Transaction DB Flags

okay bestie, pull up a chair πŸͺ‘ because today we're talking about mt_dbflag from the Library Functions Manual, and it's genuinely one of those tiny pages that's giving quiet main character energy. It's not a function, it's not a struct β€” it's a lil grab-bag of macros that describe what's going on with a DB handle inside a transaction. No cap. 🌸


✨ NAME ✨

mt_dbflag β€” Transaction DB Flags

that's it. that's the whole name section. short, sweet, iconic. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

Macros

#define DB_DIRTY   0x01
#define DB_STALE   0x02
#define DB_NEW   0x04
#define DB_VALID   0x08
#define DB_USRVALID   0x10
#define DB_DUPDATA   0x20

six macros. six little flag bits. a whole personality in hex. πŸ¦‹


🌈 Detailed Description 🌈

so like. this page is basically just the macro list plus a little explainer for each one. there's no functions here, no arguments, no return values β€” just flags you can check. it's giving "reference card", it's giving "cheat sheet", it's giving "I read this once and now I understand everything." ✨


πŸ”₯ Macro Definition Documentation πŸ”₯

okay here's the actual tea, one flag at a time, no skips, no shortcuts, we are thorough in this household. πŸ’–

  • #define DB_DIRTY 0x01 β€” DB was written in this txn. like, someone touched it, it's messy now, it's been edited. πŸ–ŠοΈ
  • #define DB_STALE 0x02 β€” Named-DB record is older than txnID. it's stale, bestie. it's giving leftovers in the back of the fridge. 😭
  • #define DB_NEW 0x04 β€” Named-DB handle opened in this txn. fresh out the box, brand new, unopened, we love to see it. 🎁
  • #define DB_VALID 0x08 β€” DB handle is valid, see also MDB_VALID. it passed the vibe check βœ… (and yes, the original literally says "see also MDB_VALID", so go look at that too, iykyk).
  • #define DB_USRVALID 0x10 β€” As DB_VALID, but not set for FREE_DBI. same energy as DB_VALID, just a liiittle more exclusive β€” FREE_DBI doesn't get an invite to this party. πŸ™ˆ
  • #define DB_DUPDATA 0x20 β€” DB is MDB_DUPSORT data. it's the duplicates-sorted kind of data, periodt. πŸ‘‘
real talk: these are bit flags, so treat them like bits β€” don't go inventing your own meanings for them, and definitely don't assume behaviour that isn't written down here. the page says what it says. 🫢

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for LMDB from the source code. so technically nobody wrote this with their own two hands β€” Doxygen did, and honestly? slay, automated queen. πŸ€–πŸ’…


aaaand that's the whole page, bestie!! πŸ₯³ you now know every single one of the six mt_dbflag macros, exactly what they mean, and you did it without falling asleep. so proud. πŸ’œ

this little cutie came from the LMDB manual, page mt_dbflag(3), and it's the version that lives at the bottom of the page β€” go forth and check your flags, mwah πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from