jsql

package module
v0.0.0-...-df6dcac Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSqlServerString

func CreateSqlServerString(server string, user string, pass string, db string) string

func CreateSqliteString

func CreateSqliteString(file string, config string) string

func CreateSqliteStringWithPass

func CreateSqliteStringWithPass(file string, user string, pass string, config string) string

Types

type SqlServerUtils

type SqlServerUtils struct {
	SqlUtils
	IsOpen bool
}

* add by yjh 211125 * for sqlserver *

func BuildSqlServer

func BuildSqlServer() *SqlServerUtils

func (*SqlServerUtils) CloseSqlServer

func (s *SqlServerUtils) CloseSqlServer()

func (*SqlServerUtils) ConnectSqlServer

func (s *SqlServerUtils) ConnectSqlServer(constr string) bool

func (*SqlServerUtils) ConnectSqlServerString

func (s *SqlServerUtils) ConnectSqlServerString(server string, user string, pass string, db string) bool

type SqlUtils

type SqlUtils struct {
	Db     *sql.DB
	Result sql.Result
	Tx     *sql.Tx
	Stmt   *sql.Stmt
	// contains filtered or unexported fields
}

* add by yjh 211109 * define base type *

func (*SqlUtils) Begin

func (s *SqlUtils) Begin() bool

func (*SqlUtils) End

func (s *SqlUtils) End() bool

func (*SqlUtils) Error

func (s *SqlUtils) Error() string

func (*SqlUtils) ExecBatch

func (s *SqlUtils) ExecBatch(args ...interface{}) bool

func (*SqlUtils) ExecCmd

func (s *SqlUtils) ExecCmd(cmd string) bool

func (*SqlUtils) ExecCmdWithArgs

func (s *SqlUtils) ExecCmdWithArgs(cmd string, args ...interface{}) bool

func (*SqlUtils) GetInt

func (s *SqlUtils) GetInt(cmd string) (int64, bool)

func (*SqlUtils) GetString

func (s *SqlUtils) GetString(cmd string) (string, bool)

func (*SqlUtils) Prepare

func (s *SqlUtils) Prepare(cmd string) bool

func (*SqlUtils) SetError

func (s *SqlUtils) SetError(err error)

type SqliteUtils

type SqliteUtils struct {
	SqlUtils
	DbFile string
}

* add by yjh 211125 * for sqlserver *

func BuildSqlite

func BuildSqlite() *SqliteUtils

func (*SqliteUtils) OpenFile

func (s *SqliteUtils) OpenFile(dbFile string) bool

func (*SqliteUtils) OpenFileWithPass

func (s *SqliteUtils) OpenFileWithPass(dbFile string, user string, pass string) bool

Jump to

Keyboard shortcuts

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