sql

package
v0.0.0-...-99c0e08 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//CmdInsert 插入
	CmdInsert = 1
	//CmdSelect 查询
	CmdSelect = 2
	//CmdUpdate 更新
	CmdUpdate = 3
	//CmdDelete 删除
	CmdDelete = 4
)

Variables

This section is empty.

Functions

func ParserSQL

func ParserSQL(s string) (cmd interface{}, err error)

ParserSQL 解析SQL

Types

type DeleteCommand

type DeleteCommand struct {
	SQL   string
	Table string
	Where string
}

DeleteCommand 删除

type SelectCommand

type SelectCommand struct {
	SQL    string
	Fields []string
	Table  string
	Where  string
	Limit  []int //100
}

SelectCommand 字符串

type UpdateCommand

type UpdateCommand struct {
	SQL    string
	Fields []string
	Table  string
	Where  string
}

UpdateCommand 更新

Jump to

Keyboard shortcuts

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