mssql

package
v4.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: MIT Imports: 10 Imported by: 4

README

SQLServer adapter for upper/db

Please read the full docs, acknowledgements and examples at https://upper.io/v4/adapter/mssql/.

Documentation

Overview

Package mssql wraps the github.com/go-sql-driver/mssql MySQL driver. See https://github.com/upper/db/adapter/mssql for documentation, particularities and usage examples.

Index

Constants

View Source
const Adapter = `mssql`

Adapter is the public name of the adapter.

Variables

This section is empty.

Functions

func New

func New(sqlDB *sql.DB) (db.Session, error)

New creates a sqlbuilder.Sesion instance by wrapping a *sql.DB value.

func NewTx

func NewTx(sqlTx *sql.Tx) (sqlbuilder.Tx, error)

NewTx creates a sqlbuilder.Tx instance by wrapping a *sql.Tx value.

func Open

func Open(connURL db.ConnectionURL) (db.Session, error)

Open establishes a connection to the database server and returns a db.Session instance (which is compatible with db.Session).

Types

type ConnectionURL

type ConnectionURL struct {
	User     string
	Password string
	Database string
	Host     string
	Socket   string
	Options  map[string]string
}

ConnectionURL implements a MSSQL connection struct.

func ParseURL

func ParseURL(s string) (conn ConnectionURL, err error)

ParseURL parses s into a ConnectionURL struct.

func (ConnectionURL) String

func (c ConnectionURL) String() (s string)

Jump to

Keyboard shortcuts

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