db

package
v5.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: MIT Imports: 6 Imported by: 0

README

== Database utils

* link:sql.go[] - Getting a DB mock and SqlMock without SqlMock options (example option: link:https://github.com/DATA-DOG/go-sqlmock?tab=readme-ov-file#customize-sql-query-matching[QueryMatcherOptions])
* link:gorm.go[] - Getting a GORM and SqlMock instances

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockForGorm

func NewMockForGorm(dialector gorm.Dialector) *gorm.DB

func NewMockForGormPostgreSQL

func NewMockForGormPostgreSQL() (sqlmock.Sqlmock, *gorm.DB)

func NewSQLMock

func NewSQLMock() (*sql.DB, goSqlMock.Sqlmock)

Types

This section is empty.

Jump to

Keyboard shortcuts

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