DTDBLOAD(3)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

πŸ’– NAME πŸ’–

okay so bestie, welcome to the DtDbLoad(library call) page β€” this is the function that loads the actions and data types database into your app. That's the whole main-character job. πŸ’…

✨ SYNOPSIS ✨

#include &<Dt/Action.h>
void DtDbLoad(void)

πŸ¦‹ DESCRIPTION πŸ¦‹

DtDbLoad is the glow-up move: it loads the actions and data types database into the application. The moment this function returns, boom β€” the database has been loaded. No cap. ✨

An environment variable decides which set of directories gets searched. DtDbLoad loads all actions and data types defined in files with a .dt suffix located in those directories. Periodt. πŸŽ€

The directory search path is based on the value of the DTDATABASESEARCHPATH environment variable and internal defaults. DTDATABASESEARCHPATH contains a comma-separated list of directories in [host:]/path format. Your application must call DtDbLoad before calling any of the routines that query either the action or data type databases. If you call it multiple times, the old databases are freed before the new ones are created β€” out with the old, in with the new, literally. πŸ’€

🌸 RETURN VALUE 🌸

The DtDbLoad function returns no value. That's it. It just does the thing and leaves. Iconic. 🫢

🌈 APPLICATION USAGE 🌈

If this function is used in a long-lived application, the application must dynamically reload the databases when they are modified. To do this, the client must register to receive notification whenever the actions and data types database needs to be modified. It is up to the application to recall DtDbLoad after receiving notification. This is done with a call to DtDbReloadNotify(3). Lowkey important, bestie. πŸ”₯

If errors are encountered when reading the database files, error messages are written to the user's errorlog file ($HOME/.dt/errorlog). Records containing errors are not incorporated into the internal database. So the messy records get left outside the club. πŸ™ˆ

⭐ SEE ALSO ⭐


πŸ’– That's the DtDbLoad(library call) footer, bestie β€” this library-call legend is signing off. Stay loaded, stay iconic. πŸŽ€

πŸ“¦ where this page comes from