sqlx

package
v0.0.0-...-ece948e Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{}

Provider 把 SQLX 数据库连接注册进容器。

中文说明:

  • 与 orm.gorm 并存,面向更适合手写 SQL 的场景。
  • 对外暴露 contract.SQLXKey,供列表查询、报表查询等直接使用。
  • 从 framework 抽离视角看,这里不再默认补 sqlite/demo.db; provider 只消费已经明确提供的 database 配置。

func NewProvider

func NewProvider() *Provider

func (*Provider) Boot

func (p *Provider) Boot(contract.Container) error

func (*Provider) IsDefer

func (p *Provider) IsDefer() bool

func (*Provider) Name

func (p *Provider) Name() string

func (*Provider) Provides

func (p *Provider) Provides() []string

func (*Provider) Register

func (p *Provider) Register(c contract.Container) error

Jump to

Keyboard shortcuts

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