The afsql module has only one driver, that is the sql() destination driver. The sql() driver sends messages to a SQL database.
This driver has multilevel dependencies. To compile the driver needs the libdbi package, which is supported and updated on macOS. However, to use any specific database system, you need the corresponding supporting system-specific packages as well. For instance, using mySQL requies the libdbi-dbd-mysql package. These database system-specific packages, unfortunately, are not supported on the latest version of macOS.