mariadb

package
v0.0.0-...-f638a73 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(Conn *SqlCommand) (int64, error)

Exec executes a SQL command and returns the number of rows affected by an update, insert, or delete.

func New

func New(config *mysql.Config)

func Query

func Query[T any](Conn *SqlCommand) ([]T, error)

Execute SQL command and returns the query results as a <T>slice

Types

type SqlCommand

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

func Delete

func Delete(tableName string) *SqlCommand

func Insert

func Insert(tableName string, data any) *SqlCommand

func Select

func Select(tableName string) *SqlCommand

func Update

func Update(tableName string, data any) *SqlCommand

func (*SqlCommand) Where

func (Conn *SqlCommand) Where(queryClause any) *SqlCommand

Jump to

Keyboard shortcuts

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