sqlite

package
v0.0.0-...-2910145 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package sqlite 实现了 gdb.Driver 接口,该接口支持对 SQLite 数据库的操作。

注意: 1. 此包不支持 Save 功能。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() db类.Driver

New 创建并返回一个实现了 gdb.Driver 接口的驱动器,该驱动器支持对 SQLite 的操作。

Types

type Driver

type Driver struct {
	*db类.Core
}

Driver 是用于 SQLite 数据库的驱动程序。

func (*Driver) New

func (d *Driver) New(core *db类.Core, node *db类.X配置项) (db类.DB, error)

New 创建并返回一个用于 sqlite 的数据库对象。 它实现了 gdb.Driver 接口,以便进行额外的数据库驱动安装。

func (*Driver) X取表名称数组

func (d *Driver) X取表名称数组(上下文 context.Context, schema ...string) (表名称数组 []string, 错误 error)

Tables 获取并返回当前模式的表。 它主要用于cli工具链中,用于自动生成模型。

func (*Driver) X取表字段信息Map

func (d *Driver) X取表字段信息Map(上下文 context.Context, 表名称 string, schema ...string) (字段信息Map map[string]*db类.TableField, err error)

TableFields 获取并返回当前模式下指定表的字段信息。

另请参阅 DriverMysql.TableFields。

func (*Driver) X底层DoFilter

func (d *Driver) X底层DoFilter(ctx context.Context, link db类.Link, sql string, args []interface{}) (newSql string, newArgs []interface{}, err error)

DoFilter 在将SQL字符串提交给底层SQL驱动程序之前对其进行处理。

func (*Driver) X底层Open

func (d *Driver) X底层Open(配置对象 *db类.X配置项) (db *sql.DB, err error)

Open创建并返回一个用于sqlite的底层sql.DB对象。 参考链接:https://github.com/glebarez/go-sqlite

func (*Driver) X底层取数据库安全字符

func (d *Driver) X底层取数据库安全字符() (左字符 string, 右字符 string)

GetChars 返回此类型数据库的安全字符。

Jump to

Keyboard shortcuts

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