[−][src]Crate sql_audit
The companion library to sql-audit-cli, though you can just use this instead if you'd like to
generate audit programmatically.
Limitations
- Currently this lib only knows how to use
sqlx, so you must use it too.
Tour
generate_auditis the programmatic equivalent of runningsql-audit-cli.query_auditlets you query the audit table... currently only supports querying all records for a table.set_local_app_usersets the value to fill intoapp_userin the audit table for the duration of the current transaction.set_local_request_idsets the value to fill intorequest_idin the audit table for the duration of the current transaction.
Structs
| AuditRecord | A structure representing a single row of the |
Constants
| APP_USER_SETTING | A constant for the setting used to record |
| REQUEST_ID_SETTING | A constant for the setting used to record |
Functions
| generate_audit | Generate the audit infrastructure for the database that the passed |
| query_audit | Get all the audit records for a specific table. |
| set_local_app_user | Set a value to be recorded in the |
| set_local_request_id | Set a value to be recorded in the |