entdb

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package entdb provides helper for creating pgx dabase for ent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(ctx context.Context, uri string, t *app.Telemetry) (*ent.Client, error)

Open new connection.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func New

func New(ent *ent.Client) *DB

func (DB) CreateTask

func (db DB) CreateTask(ctx context.Context, title string) (*example.Task, error)

func (DB) DeleteTask

func (db DB) DeleteTask(ctx context.Context, id int64) error

func (DB) GenerateError

func (db DB) GenerateError(ctx context.Context) error

func (DB) ListTasks

func (db DB) ListTasks(ctx context.Context) ([]*example.Task, error)

Jump to

Keyboard shortcuts

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