Method InsertSql(AuditProvider)
INSERT statement. This is the one statement of the audit log that runs through the redb.Route.Sql
connector (the writer route), so its placeholders are written :#name, as that connector reads
them; @ there belongs to the database. Every other statement here and in the dead-letter store
runs on raw ADO.NET and keeps .
The writer route binds every value as it arrives in the audit.* headers — the event id, the
timestamp (ISO-8601 "o") and the payload as text — so each goes through the dialect's cast for
its column type: PostgreSQL refuses text for uuid / timestamptz / jsonb (42804)
without one.
public static string InsertSql(AuditProvider provider)