mysql

package
v0.0.1-0...-6deec57 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnection

func NewConnection(ctx context.Context, cfg ConnectionConfig) (db *sql.DB)

NewConnection provides new mysql connection

Types

type ConnectionConfig

type ConnectionConfig struct {
	Host            string
	Port            int
	User            string
	Pass            string
	Database        string
	ConnMaxLifetime time.Duration
	MaxIdleConns    int
	MaxOpenConns    int
}

ConnectionConfig provides values for gRPC connection configuration

type NullBool

type NullBool struct{ sql.NullBool }

NullBool is an alias for sql.NullBool data type

func (NullBool) MarshalJSON

func (nb NullBool) MarshalJSON() ([]byte, error)

MarshalJSON for NullBool

func (NullBool) UnmarshalJSON

func (nb NullBool) UnmarshalJSON(b []byte) error

UnmarshalJSON for NullBool

type NullFloat64

type NullFloat64 struct{ sql.NullFloat64 }

NullFloat64 is an alias for sql.NullFloat64 data type

func (NullFloat64) MarshalJSON

func (nf NullFloat64) MarshalJSON() ([]byte, error)

MarshalJSON for NullFloat64

func (NullFloat64) UnmarshalJSON

func (nf NullFloat64) UnmarshalJSON(b []byte) error

UnmarshalJSON for NullFloat64

type NullInt64

type NullInt64 struct{ sql.NullInt64 }

NullInt64 is an alias for sql.NullInt64 data type

func (NullInt64) MarshalJSON

func (ni NullInt64) MarshalJSON() ([]byte, error)

MarshalJSON for NullInt64

func (NullInt64) UnmarshalJSON

func (ni NullInt64) UnmarshalJSON(b []byte) error

UnmarshalJSON for NullInt64

type NullString

type NullString struct{ sql.NullString }

NullString is an alias for sql.NullString data type

func (NullString) MarshalJSON

func (ns NullString) MarshalJSON() ([]byte, error)

MarshalJSON for NullString

func (NullString) UnmarshalJSON

func (ns NullString) UnmarshalJSON(b []byte) error

UnmarshalJSON for NullString

type NullTime

type NullTime struct{ sql.NullTime }

NullTime is an alias for mysql.NullTime data type

func (NullTime) MarshalJSON

func (nt NullTime) MarshalJSON() ([]byte, error)

MarshalJSON for NullTime

func (NullTime) UnmarshalJSON

func (nt NullTime) UnmarshalJSON(b []byte) error

UnmarshalJSON for NullTime

Jump to

Keyboard shortcuts

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