db

package
v1.8.6 Latest Latest
Warning

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

Go to latest
Published: May 11, 2025 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectXorm

func ConnectXorm(cfg dialect.ConnConfig) *xorm.Engine

ConnectXorm 连接数据库

func Engine

func Engine() *xorm.Engine

Engine 获取当前数据库连接

func InsertBatch

func InsertBatch(tableName string, rows ...any) error

InsertBatch 写入多行数据

func Query added in v1.8.4

func Query(opts ...xq.QueryOption) *xorm.Session

Query 生成查询

func Quote

func Quote(value string) string

Quote 转义表名或字段名

func SyncModels added in v1.8.6

func SyncModels(eng *xorm.Engine) error

SyncModels 同步数据库表结构

func UpdateBatch added in v1.8.4

func UpdateBatch(tableName, pkey string, ids any, changes map[string]any) error

UpdateBatch 更新多行数据

Types

This section is empty.

Jump to

Keyboard shortcuts

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