Skip to content

imbence/pgdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pgdb

Simple helper package to insert and upsert data into PostgreSQL using Bun ORM in Go.

This is a small utility package for personal and internal use — but feel free to use or adapt it.

Features

  • Connect to PostgreSQL via Bun + pgx
  • Generic ToDb function to insert or upsert slices of data
  • Automatically builds ON CONFLICT DO UPDATE clause based on primary key and columns
  • No hardcoding of column names — uses information_schema dynamically
  • set DEBUG_SQL=true to log SQL queries for debugging

Installation

go get github.com/imbence/pgdb

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages