dialect

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2020 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

Package dialect defines some dialects per RDB. Currently it supports Postgres and MySQL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialect

type Dialect interface {
	// Placeholder makes a placeholder string.
	Placeholder(typ string, prevArgs []interface{}) string

	// QuoteIndent surrounds an identifier by proper quotes.
	QuoteIdent(v string) string
}

func Generic

func Generic() Dialect

Generic returns a generic dialect. Queries constructed by this dialect should work with most databases.

func New

func New(driver string) Dialect

New returns a dialect for the given driver. It supports "postgres", "mysql". It returns nil if you pass an unknown driver name.

Jump to

Keyboard shortcuts

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