sqlgen

package
v2.0.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DATETIME_TYPE = "DATETIME"

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonQueryGenerator

type CommonQueryGenerator struct {
	*InternalSqlQueryCfg
}

func (*CommonQueryGenerator) SqlQueryStatement

func (q *CommonQueryGenerator) SqlQueryStatement() (string, error)

func (*CommonQueryGenerator) UpdateMaxIndexValue

func (q *CommonQueryGenerator) UpdateMaxIndexValue(row map[string]interface{})

type IndexValuer

type IndexValuer interface {
	SetIndexValue(interface{})
	GetIndexValue() interface{}
	GetIndexValueWrap() *store.IndexFieldStoreWrap
}

type InternalSqlQueryCfg

type InternalSqlQueryCfg struct {
	Table       string              `json:"table"`
	Limit       int                 `json:"limit"`
	IndexFields []*store.IndexField `json:"indexFields"`
	// contains filtered or unexported fields
}

func (*InternalSqlQueryCfg) GetIndexValue

func (i *InternalSqlQueryCfg) GetIndexValue() interface{}

func (*InternalSqlQueryCfg) GetIndexValueWrap

func (i *InternalSqlQueryCfg) GetIndexValueWrap() *store.IndexFieldStoreWrap

func (*InternalSqlQueryCfg) InitIndexFieldStore

func (i *InternalSqlQueryCfg) InitIndexFieldStore()

func (*InternalSqlQueryCfg) SetIndexValue

func (i *InternalSqlQueryCfg) SetIndexValue(v interface{})

type OracleQueryGenerate

type OracleQueryGenerate struct {
	*CommonQueryGenerator
}

func (*OracleQueryGenerate) SqlQueryStatement

func (q *OracleQueryGenerate) SqlQueryStatement() (string, error)

func (*OracleQueryGenerate) UpdateMaxIndexValue

func (q *OracleQueryGenerate) UpdateMaxIndexValue(row map[string]interface{})

type SqlQueryGenerator

type SqlQueryGenerator interface {
	IndexValuer
	SqlQueryStatement() (string, error)
	UpdateMaxIndexValue(rows map[string]interface{})
}

func GetQueryGenerator

func GetQueryGenerator(driver string, props map[string]interface{}) (SqlQueryGenerator, error)

func NewCommonSqlQuery

func NewCommonSqlQuery(cfg *InternalSqlQueryCfg) SqlQueryGenerator

func NewOracleQueryGenerate

func NewOracleQueryGenerate(cfg *InternalSqlQueryCfg) SqlQueryGenerator

func NewSqlServerQuery

func NewSqlServerQuery(cfg *InternalSqlQueryCfg) SqlQueryGenerator

func NewTemplateSqlQuery

func NewTemplateSqlQuery(cfg *TemplateSqlQueryCfg) (SqlQueryGenerator, error)

type SqlServerQueryGenerator

type SqlServerQueryGenerator struct {
	*InternalSqlQueryCfg
}

func (*SqlServerQueryGenerator) SqlQueryStatement

func (q *SqlServerQueryGenerator) SqlQueryStatement() (string, error)

func (*SqlServerQueryGenerator) UpdateMaxIndexValue

func (q *SqlServerQueryGenerator) UpdateMaxIndexValue(row map[string]interface{})

type TemplateSqlQueryCfg

type TemplateSqlQueryCfg struct {
	TemplateSql string              `json:"templateSql"`
	IndexFields []*store.IndexField `json:"indexFields"`
	// contains filtered or unexported fields
}

func (*TemplateSqlQueryCfg) GetIndexValue

func (t *TemplateSqlQueryCfg) GetIndexValue() interface{}

func (*TemplateSqlQueryCfg) GetIndexValueWrap

func (t *TemplateSqlQueryCfg) GetIndexValueWrap() *store.IndexFieldStoreWrap

func (*TemplateSqlQueryCfg) InitIndexFieldStore

func (t *TemplateSqlQueryCfg) InitIndexFieldStore()

func (*TemplateSqlQueryCfg) SetIndexValue

func (t *TemplateSqlQueryCfg) SetIndexValue(v interface{})

Jump to

Keyboard shortcuts

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