sqlbuilder

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MySQL = SQLBuilder{
			// contains filtered or unexported fields
	}

	MSSQL = SQLBuilder{
			// contains filtered or unexported fields
	}
)

Functions

func And

func And(cond ...dbr.Builder) dbr.Builder

func Eq

func Eq(column string, value interface{}) dbr.Builder

func Expr

func Expr(query string, value ...interface{}) dbr.Builder

func Gt

func Gt(column string, value interface{}) dbr.Builder

func Gte

func Gte(column string, value interface{}) dbr.Builder

func I

func I(s string) dbr.I

func Lt

func Lt(column string, value interface{}) dbr.Builder

func Lte

func Lte(column string, value interface{}) dbr.Builder

func Neq

func Neq(column string, value interface{}) dbr.Builder

func Or

func Or(cond ...dbr.Builder) dbr.Builder

func Set

func Set() *updateSet

Types

type Builder

type Builder dbr.Builder

type MSSQLDialect

type MSSQLDialect struct{}

func (MSSQLDialect) EncodeBool

func (d MSSQLDialect) EncodeBool(b bool) string

func (MSSQLDialect) EncodeBytes

func (d MSSQLDialect) EncodeBytes(b []byte) string

func (MSSQLDialect) EncodeString

func (d MSSQLDialect) EncodeString(s string) string

func (MSSQLDialect) EncodeTime

func (d MSSQLDialect) EncodeTime(t time.Time) string

func (MSSQLDialect) Placeholder

func (d MSSQLDialect) Placeholder(n int) string

func (MSSQLDialect) QuoteIdent

func (d MSSQLDialect) QuoteIdent(s string) string

type MySQLDialect

type MySQLDialect struct {
}

func (MySQLDialect) EncodeBool

func (d MySQLDialect) EncodeBool(b bool) string

func (MySQLDialect) EncodeBytes

func (d MySQLDialect) EncodeBytes(b []byte) string

func (MySQLDialect) EncodeString

func (d MySQLDialect) EncodeString(s string) string

func (MySQLDialect) EncodeTime

func (d MySQLDialect) EncodeTime(t time.Time) string

func (MySQLDialect) Placeholder

func (d MySQLDialect) Placeholder(n int) string

func (MySQLDialect) QuoteIdent

func (d MySQLDialect) QuoteIdent(s string) string

type SQLBuilder

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

func (*SQLBuilder) Build

func (s *SQLBuilder) Build(b Builder) (string, error)

func (*SQLBuilder) MustBuild

func (s *SQLBuilder) MustBuild(b Builder) string

Jump to

Keyboard shortcuts

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