Skip to content

AirGateway/pgext

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-pg extensions

Faster JSON encoding by segmentio

import (
    "github.com/AirGateway/pg/pgjson"
    "github.com/AirGateway/pgext"
)

func init() {
    pgjson.SetProvider(pgext.SegmentJSONProvider{})
}

Tracing using OpenTelemetryHook

For more details see documentation:

db := pg.Connect(&pg.Options{...})
db.AddQueryHook(&pgext.OpenTelemetryHook{})

Print failed queries using DebugHook

db := pg.Connect(&pg.Options{...})

if debug {
    db.AddQueryHook(&pgext.DebugHook{
        //Verbose: true,
    })
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Go 100.0%