drivers

package
v0.0.0-...-1116384 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseDriver

type BaseDriver struct {
	DB *sql.DB
}

func (*BaseDriver) Begin

func (d *BaseDriver) Begin() (*sql.Tx, error)

func (*BaseDriver) Close

func (d *BaseDriver) Close() error

func (*BaseDriver) ExecContext

func (d *BaseDriver) ExecContext(
	ctx context.Context,
	query string,
	args ...interface{},
) (sql.Result, error)

func (*BaseDriver) PrepareContext

func (d *BaseDriver) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)

func (*BaseDriver) QueryContext

func (d *BaseDriver) QueryContext(
	ctx context.Context,
	query string,
	args ...interface{},
) (*sql.Rows, error)

func (*BaseDriver) QueryRowContext

func (d *BaseDriver) QueryRowContext(
	ctx context.Context,
	query string,
	args ...interface{},
) *sql.Row

type Driver

type Driver interface {
	ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
	QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
	QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
	PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) // Adicionado
	Begin() (*sql.Tx, error)
	Close() error
}

func NewMattnDriver

func NewMattnDriver(dsn string) (Driver, error)

func NewModerncDriver

func NewModerncDriver(dsn string) (Driver, error)

Jump to

Keyboard shortcuts

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