db

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

* @Author: kamalyes 501893067@qq.com * @Date: 2025-11-11 00:00:00 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2025-11-13 11:03:15 * @FilePath: \go-sqlbuilder\constant\error.go * @Description: * * Copyright (c) 2025 by kamalyes, All Rights Reserved.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GormHandler

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

GormHandler 标准 GORM 处理器实现

func (*GormHandler) DB

func (h *GormHandler) DB() *gorm.DB

DB 返回底层 GORM 实例

type Handler

type Handler interface {
	// DB 返回 GORM 数据库实例
	DB() *gorm.DB
}

Handler 数据库处理器接口 所有 Repository 都基于这个接口工作 用户需要提供 GORM DB 实例的包装

func NewGormHandler

func NewGormHandler(db *gorm.DB) Handler

NewGormHandler 创建 GORM 处理器

Jump to

Keyboard shortcuts

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