mssql

package
v3.8.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2021 License: MIT Imports: 13 Imported by: 0

README

SQLServer adapter for upper.io/db

See the full docs, acknowledgements and examples at https://upper.io/db.v3/mssql

Documentation

Overview

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

Index

Constants

View Source
const Adapter = sqlDriver

Adapter is the public name of the adapter.

Variables

This section is empty.

Functions

func New

func New(sess *sql.DB) (sqlbuilder.Database, error)

New wraps the given *sql.DB session and creates a new db session.

func NewTx

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

NewTx wraps a regular *sql.Tx transaction and returns a new upper-db transaction backed by it.

func Open

func Open(settings db.ConnectionURL) (sqlbuilder.Database, error)

Open stablishes a new connection with the SQL server.

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