db

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: 1 Imported by: 0

Documentation

Overview

Package db implement database driver

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver[T any] interface {
	Query(ctx context.Context, sql string, args ...any) (Rows[T], error)
}

Driver is an interface for database driver.

type Rows

type Rows[T any] interface {
	CollectOne() (T, error)
	CollectAll() ([]T, error)
}

Rows is an interface for database rows.

Directories

Path Synopsis
Package pg implement database driver for PostgreSQL using pgxpool
Package pg implement database driver for PostgreSQL using pgxpool

Jump to

Keyboard shortcuts

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