testrecords

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

testrecords

GitHub release (latest SemVer) GitHub Workflow Status GitHub GitHub go.mod Go version

A Go library to help inserting records to DB for testing.

Requirements

  • Go 1.24+

Installation

go get github.com/Siroshun09/testrecords

License

This project is under the Apache License version 2.0. Please see LICENSE for more info.

Copyright © 2025, Siroshun09

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn interface {
	ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)
}

type Inserter

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

func NewInserter

func NewInserter(flavor sqlbuilder.Flavor) Inserter

func NewInserterForMySQL

func NewInserterForMySQL() Inserter

func NewInserterForPostgreSQL

func NewInserterForPostgreSQL() Inserter

func (Inserter) Add

func (i Inserter) Add(tableName string, records ...any) Inserter

func (Inserter) InsertAll

func (i Inserter) InsertAll(ctx context.Context, conn Conn) error

Jump to

Keyboard shortcuts

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