pg

package
v0.0.0-...-ba70d0f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package pg implement database driver for PostgreSQL using pgxpool

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver[T any] struct {
	// contains filtered or unexported fields
}

Driver is a PostgreSQL driver that implements db.Driver interface.

func New

func New[T any](conf *celestinal.Config) (*Driver[T], error)

New creates a new PostgreSQL driver instance.

func (*Driver[T]) Query

func (d *Driver[T]) Query(ctx context.Context, sql string, args ...any) (db.Rows[T], error)

Query executes a SQL query and returns the result as db.Rows.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL