mariadb_dyn...mn_cmp_named(3)

πŸ“¦
version 13.0.2 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ mariadb_dyn...mn_cmp_named πŸ’…

okay so bestie, we're in the MariaDB Connector/C manual, and today's main character is mariadb_dyncol_column_cmp_named. yes the name is a whole mouthful, no we are not renaming it, it's iconic as is. πŸŽ€


🌸 Name 🌸

mariadb_dyncol_column_cmp_named β€” literally just compares two column names. that's the whole job. that's the vibe. ✨


πŸ¦‹ Synopsis πŸ¦‹

#include <mariadb_dyncol.h>

int mariadb_dyncol_column_cmp_named(const MYSQL_LEX_STRING *s1,
                                    const MYSQL_LEX_STRING *s2);

πŸ’– Description πŸ’–

so what it does is it compares two dynamic column keys, and those keys are handed to it as a pointer to a MYSQL_LEX_STRING structure. that's it. two keys walk in, a comparison walks out. 🫢


πŸŽ€ Parameter πŸŽ€

  • s1 β€” the first key, the one going in first, no pressure bestie πŸ’œ
  • s2 β€” the second key, the challenger πŸ¦‹

⭐ Return value ⭐

it hands you back an integer, and the sign is the whole story: it's less than, equal to, or greater than zero depending on whether the first bytes of s1 are found, respectively, to be less than, to match, or be greater than the first bytes of s2. yes that sentence is a lot. no you can't skip it. that's the contract, periodt. πŸ‘‘


ngl, the sign is the entire point here β€” don't just check for zero and call it a day, that's not the vibe check the function is doing. πŸ™ˆ

and that's the page!! Version 3.4, straight out of the MariaDB Connector/C manual, mwah πŸ’‹ go forth and compare those column names, you absolute legend πŸ§šβ€β™€οΈπŸ’–βœ¨

πŸ“¦ where this page comes from