PX_PUT_DATA_BYTES(3)

πŸ’… PX_PUT_DATA_BYTES(3) β€” the paradox library, bestie edition ✨

okay so picture this: you're deep in the paradox library, you've got a pxdoc_t in one hand and a raw record in the other, and you need to shove some bytes into a field. that's literally what this page is about. no cap. 🫢


🌸 NAME 🌸

PX_put_data_bytes β€” put a value into a bytes data field πŸ’–


✨ SYNOPSIS ✨

#include <paradox.h>

void PX_put_data_bytes(pxdoc_t *pxdoc, char *data, int len, char *value)

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the tea is: this function simply copies a sequence of bytes into a data field exactly as it's stored in the database file. like, that's the whole job. iconic of it honestly. πŸŽ€

and listen β€” you should use this function instead of accessing the record data directly. it's giving "please don't rawdog the record buffer," fr fr. πŸ™ˆ

data points to the start of the data field in the record. and the way you figure out where that is? you gotta sum up all the field lengths before the field you're operating on and add that to the base pointer of the record. math but make it ✨structurally necessary✨.

this function is similar to PX_put_data_alpha(3) β€” except without recoding. it's mostly used to store field data of Type pxfBytes. so if that's your type, this is your girl. πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

your little friend group of related functions, all besties, all doing similar but different things:


πŸ‘‘ AUTHOR πŸ‘‘

this manual page was written by Uwe Steinmann uwe@steinmann.cx. thank you for your service, king. 🫑


and that's the whole page bestie, you made it to the end of PX_PUT_DATA_BYTES(3) from the Library Functions Manual β€” go forth and copy those bytes responsibly, mwah πŸ’‹β­