gorm

package
v1.0.94 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPrimaryKey

func GetPrimaryKey(table interface{}) []string

func GetTable

func GetTable(table interface{}) string

Types

type Columns

type Columns []string

func (Columns) Exist

func (c Columns) Exist(col string) bool

type Table

type Table struct {
	TableName   string
	PrimaryKeys Columns
	Columns     Columns
	// contains filtered or unexported fields
}

func NewTable

func NewTable(table interface{}) *Table

func (*Table) GetColumns

func (tb *Table) GetColumns() Columns

func (*Table) GetPrimaryKeys

func (tb *Table) GetPrimaryKeys() Columns

func (*Table) GetTableName

func (tb *Table) GetTableName() string

func (*Table) SqlDelete

func (tb *Table) SqlDelete() (string, error)

func (*Table) SqlInsert

func (tb *Table) SqlInsert() (string, error)

func (*Table) SqlInsertOmiteNil

func (tb *Table) SqlInsertOmiteNil() (string, error)

func (*Table) SqlUpdate

func (tb *Table) SqlUpdate() (string, error)

Jump to

Keyboard shortcuts

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