Tags: goware/pgkit
Tags
Log tracer - Simple tool to debug queries locally and report sql erro… …rs + long running queries (#17) * upgrade to 1.21 to allow using slog * log queries and errors * log query if it exceeds defined threshold * implement comments from Vojtech * tests for slog tracer * add test for slow query * log only first query in batch action to prevent noise * enable tracing using context value * add slog sql tracing example * lower pg_sleep to 100 miliseconds * remove extra module * exaplanation for not satisfying all interfaces * sort imports * check if logger is not nil * use data.Err directly * let client to define which log level to use for queries * let client define how to log each section * fix batch query test * refactor tests * better naming for hooks * extract getting ctx values to helper functions * rename to log tracer * use slog.Duration * replace placeholders using byte scanning method
Ignore error when new column is added to DB schema (allow backward-co… …mpatible migrations) (#15) * Add extra column to test #13 backward-compatibility #13 * Fix panic in test * Ignore scany errors on unknown columns Fixes this error: scany: column: 'new_field': no corresponding field found, or it's unexported in data.Collection
PreviousNext