mariadb_dyn...te_many_num(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

✨ Name ✨

mariadb_dyncol_create_many_num β€” bestie, this one creates a dynamic column with numeric keys πŸ’–

So like, it's from the MariaDB Connector/C manual, and it's giving "build me a whole dyncol out of arrays in one go" energy πŸŽ€


🌸 Synopsis 🌸

#include <mariadb_dyncol.h>

enum enum_dyncol_func_result
mariadb_dyncol_create_many_num(DYNAMIC_COLUMN *str,
                               uint column_count,
                               uint *column_numbers,
                               DYNAMIC_COLUMN_VALUE *values,
                               my_bool new_string);

okay so yes, that's a lot of params, but we're gonna go through every single one, no skips 🫢


πŸ¦‹ Description πŸ¦‹

Create a dynamic column from arrays of values and numbérs ✨

(and yes the manual literally writes numbΓ©rs with the accent, we love a little flair πŸ’…)


πŸ’œ Parameter πŸ’œ

  • *str β€” a pointer to a dynamic column structure πŸ‘‘
  • column_count β€” the number of columns, bestie, count them πŸ“
  • *column_numbers β€” an array of column numbers πŸ”’
  • *values β€” an array of values πŸ’«
  • new_string β€” if this is set, str will be reinitialized (not freed!!) before usage. not freed. we said what we said πŸ™ˆ

⭐ Return value ⭐

Returns ER_DYNCOL_OK on success β€” slay πŸ’– β€” otherwise, error. that's it, that's the vibe 😭


🌈 Notes 🌈

  • To delete, update or insert new columns into an existing dynamic column, use the mariadb_dyncol_update_many_num function. like, don't try to do that here, this one is for creating, main character energy only πŸ’…

πŸŽ€ See also πŸŽ€

  • mariadb_dyncol_create_many_named
  • mariadb_dyncol_update_many_num
  • Dynamic Column Error Codes

lowkey important: new_string reinitializes str, it does not free it. don't come for me, that's literally what the page says 🫢

Version 3.4 of the MariaDB Connector/C docs, page mariadb_dyn...te_many_num(3) β€” that's a wrap bestie, go build some dyncols πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from