Skip to content

Add fault for sql queries and parameters #21

@spearson78

Description

@spearson78

I think there is an advantage to have common error types directly in the fault library so that other libraries can throw a common fault that can be extracted from the error chain consistently.
I created such a wrapper that captures the SQL statement and parameters.

https://github.com/spearson78/fsql/blob/main/fsql.go

I propose that that withSql struct and the corresponding wrap and with methods be added to fault

This way other code that execute SQL can capture them and they can be logged consistently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions