rdb

package
v0.0.0-...-385bd5f Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDbTypes

func GetDbTypes(opts []interface{}) map[string]string

func Read

func Read(source interface{}, query string, opts ...interface{}) (*tables.Table, error)

func SqlCreateQuery

func SqlCreateQuery(t *tables.Table, table string, opts ...interface{}) string

func SqlDropQuery

func SqlDropQuery(table string, opts ...interface{}) string

func SqlInsert

func SqlInsert(t *tables.Table, tx *sql.Tx, table string, opts ...interface{}) error

func SqlTypeOf

func SqlTypeOf(tp reflect.Type, driver string) string

func Write

func Write(source interface{}, t *tables.Table, table string, opts ...interface{}) error

Types

type AUTOINCREMENT

type AUTOINCREMENT string

type BIGINT

type BIGINT string

type BOOLEAN

type BOOLEAN string

type Batch

type Batch int

type DATE

type DATE string

type DATETIME

type DATETIME string

type DECIMAL_

type DECIMAL_ struct {
	Name             string
	Precision, Scale int
}

func DECIMAL

func DECIMAL(name string, prec ...int) DECIMAL_

type DOUBLE

type DOUBLE string

type Driver

type Driver string

type FLOAT

type FLOAT string

type INTEGER

type INTEGER string

type IfExists_

type IfExists_ int
const (
	ErrorIfExists IfExists_ = iota
	DropIfExists
	AppendIfExists
	InsertUpdateIfExists
)

type PrimaryKey

type PrimaryKey string

type SMALLINT

type SMALLINT string

type Schema

type Schema string

type SqlBigint

type SqlBigint struct {
	sql.NullInt64
}

func (*SqlBigint) Reflect

func (s *SqlBigint) Reflect() reflect.Type

func (*SqlBigint) Scan

func (s *SqlBigint) Scan(value interface{}) error

func (*SqlBigint) Value

func (s *SqlBigint) Value() (reflect.Value, bool)

type SqlBool

type SqlBool struct {
	sql.NullBool
}

func (*SqlBool) Reflect

func (s *SqlBool) Reflect() reflect.Type

func (*SqlBool) Scan

func (s *SqlBool) Scan(value interface{}) error

func (*SqlBool) Value

func (s *SqlBool) Value() (reflect.Value, bool)

type SqlDouble

type SqlDouble struct {
	sql.NullFloat64
}

func (*SqlDouble) Reflect

func (s *SqlDouble) Reflect() reflect.Type

func (*SqlDouble) Scan

func (s *SqlDouble) Scan(value interface{}) error

func (*SqlDouble) Value

func (s *SqlDouble) Value() (reflect.Value, bool)

type SqlFloat

type SqlFloat struct {
	sql.NullFloat64
}

func (*SqlFloat) Reflect

func (s *SqlFloat) Reflect() reflect.Type

func (*SqlFloat) Scan

func (s *SqlFloat) Scan(value interface{}) error

func (*SqlFloat) Value

func (s *SqlFloat) Value() (reflect.Value, bool)

type SqlInteger

type SqlInteger struct {
	sql.NullInt32
}

func (*SqlInteger) Reflect

func (s *SqlInteger) Reflect() reflect.Type

func (*SqlInteger) Scan

func (s *SqlInteger) Scan(value interface{}) error

func (*SqlInteger) Value

func (s *SqlInteger) Value() (reflect.Value, bool)

type SqlScan

type SqlScan interface {
	sql.Scanner
	Value() (reflect.Value, bool)
	Reflect() reflect.Type
}

type SqlSmall

type SqlSmall struct {
	sql.NullInt32
}

func (*SqlSmall) Reflect

func (s *SqlSmall) Reflect() reflect.Type

func (*SqlSmall) Scan

func (s *SqlSmall) Scan(value interface{}) error

func (*SqlSmall) Value

func (s *SqlSmall) Value() (r reflect.Value, ok bool)

type SqlString

type SqlString struct {
	sql.NullString
}

func (*SqlString) Reflect

func (s *SqlString) Reflect() reflect.Type

func (*SqlString) Scan

func (s *SqlString) Scan(value interface{}) error

func (*SqlString) Value

func (s *SqlString) Value() (reflect.Value, bool)

type SqlTimestamp

type SqlTimestamp struct {
	sql.NullTime
}

func (*SqlTimestamp) Reflect

func (s *SqlTimestamp) Reflect() reflect.Type

func (*SqlTimestamp) Scan

func (s *SqlTimestamp) Scan(value interface{}) error

func (*SqlTimestamp) Value

func (s *SqlTimestamp) Value() (reflect.Value, bool)

type TIMESTAMP

type TIMESTAMP string

type VARCHAR_

type VARCHAR_ struct {
	Name   string
	Length int
}

func VARCHAR

func VARCHAR(name string, length ...int) VARCHAR_

Jump to

Keyboard shortcuts

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