Skip to content

teltechsystems/logging-sql-driver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logging SQL Driver

This driver is intended to wrap around existing sql drivers to provide logging functionality. This is great for timing queries, inspecting arguments, and quickly peeking at the actual results without needing to log them on your own

Usage

package main

import (
	"database/sql"
	"fmt"
	_ "github.com/teltechsystems/logging-sql-driver"
)

func main() {
	conn, err := sql.Open("logging:mysql", "DSN")
	fmt.Printf("conn: %s", conn)
	fmt.Printf("err: %s", err)
	defer conn.Close()

	// ....
}

About

A golang sql driver that allows you to log every sql query that pumps through it

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages