database

package module
v0.0.0-...-69900c2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(pDatabase *sql.DB)

Close データベース接続プールを削除

func Open

func Open(pServerHostName string, pDatabaseName string, pUsername string) (pDatabase *sql.DB)

Open データベース接続プールを生成

func Start

func Start()

Types

type Transaction

type Transaction struct {
	// contains filtered or unexported fields
}

Transaction トランザクション

func Begin

func Begin(pDatabase *sql.DB) (pTransaction Transaction, pError error)

Begin トランザクションを開始

func (*Transaction) Commit

func (pTransaction *Transaction) Commit() bool

Commit ロールバック

func (*Transaction) Execute

func (pTransaction *Transaction) Execute(pSQL string, args ...interface{}) bool

Execute SQLを実行(DML)

func (*Transaction) Query

func (pTransaction *Transaction) Query(pSQL string, args ...interface{}) (pRows *sql.Rows, pErr error)

Query カーソルを開く

func (*Transaction) Rollback

func (pTransaction *Transaction) Rollback() bool

Rollback ロールバック

Jump to

Keyboard shortcuts

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