mysql

package
v0.0.0-...-f54e1bb Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: BSD-3-Clause Imports: 4 Imported by: 1

README

mysql

import "github.com/blueprint-uservices/blueprint/runtime/plugins/mysql"

Package mysql provides a client-wrapper implementation of the [backend.RelationalDB] interface for a mysql server.

Index

type MySqlDB

Implements a RelationalDB that uses the mysql package

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

func NewMySqlDB
func NewMySqlDB(ctx context.Context, addr string, name string, username string, password string) (*MySqlDB, error)

Instantiates a new MySqlDB instance that stores query data in a MySqlDB instance

func (*MySqlDB) Exec
func (s *MySqlDB) Exec(ctx context.Context, query string, args ...any) (sql.Result, error)

Exec implements backend.RelationalDB

func (*MySqlDB) Get
func (s *MySqlDB) Get(ctx context.Context, dst interface{}, query string, args ...any) error

Get implements backend.RelationalDB

func (*MySqlDB) Prepare
func (s *MySqlDB) Prepare(ctx context.Context, query string) (*sql.Stmt, error)

Prepare implements backend.RelationalDB

func (*MySqlDB) Query
func (s *MySqlDB) Query(ctx context.Context, query string, args ...any) (*sql.Rows, error)

Query implements backend.RelationalDB

func (*MySqlDB) Select
func (s *MySqlDB) Select(ctx context.Context, dst interface{}, query string, args ...any) error

Select implements backend.RelationalDB

Generated by gomarkdoc

Documentation

Overview

Package mysql provides a client-wrapper implementation of the [backend.RelationalDB] interface for a mysql server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MySqlDB

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

Implements a RelationalDB that uses the mysql package

func NewMySqlDB

func NewMySqlDB(ctx context.Context, addr string, name string, username string, password string) (*MySqlDB, error)

Instantiates a new MySqlDB instance that stores query data in a MySqlDB instance

func (*MySqlDB) Exec

func (s *MySqlDB) Exec(ctx context.Context, query string, args ...any) (sql.Result, error)

Exec implements backend.RelationalDB

func (*MySqlDB) Get

func (s *MySqlDB) Get(ctx context.Context, dst interface{}, query string, args ...any) error

Get implements backend.RelationalDB

func (*MySqlDB) Prepare

func (s *MySqlDB) Prepare(ctx context.Context, query string) (*sql.Stmt, error)

Prepare implements backend.RelationalDB

func (*MySqlDB) Query

func (s *MySqlDB) Query(ctx context.Context, query string, args ...any) (*sql.Rows, error)

Query implements backend.RelationalDB

func (*MySqlDB) Select

func (s *MySqlDB) Select(ctx context.Context, dst interface{}, query string, args ...any) error

Select implements backend.RelationalDB

Jump to

Keyboard shortcuts

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