db

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2018 License: MIT Imports: 4 Imported by: 0

README

gcwebapis/db

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBcon

type DBcon struct {
	DB    *sql.DB
	Ctx   context.Context
	Qstmt *sql.Stmt
	// contains filtered or unexported fields
}

DBcon ... Project DB type

func CreateDBCon

func CreateDBCon(dbconnectionstring *string) (*DBcon, error)

CreateDBCon ... Create Project DB Connection

func (*DBcon) Close added in v1.0.1

func (c *DBcon) Close()

Close ... Close dbConntions

func (*DBcon) ExecuteQuery

func (c *DBcon) ExecuteQuery(sqlquery string) (*ExecuteResult, error)

ExecuteQuery ...

func (*DBcon) GetResultRow

func (c *DBcon) GetResultRow(sqlquery string) (*sql.Row, error)

GetResultRow ...

func (*DBcon) GetResultRows

func (c *DBcon) GetResultRows(sqlquery string) (*sql.Rows, error)

GetResultRows ...

type ExecuteResult

type ExecuteResult struct {
	LastInsertId int64 `json:"last_insert_id,omitempty"`
	RowsAffected int64 `json:"rows_affected,omitempty"`
}

ExecuteResult ...

Jump to

Keyboard shortcuts

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