dialect

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB2Dialect

type DB2Dialect struct {
	Dialect
}

func (*DB2Dialect) GetCountSql

func (self *DB2Dialect) GetCountSql(sql string) (string, error)

func (*DB2Dialect) GetLimitSql

func (self *DB2Dialect) GetLimitSql(sql string) (string, error)

func (*DB2Dialect) Support

func (self *DB2Dialect) Support() (bool, error)

type Derby

type Derby struct {
	Dialect
}

func (*Derby) GetCountSql

func (self *Derby) GetCountSql(sql string) (string, error)

func (*Derby) GetLimitSql

func (self *Derby) GetLimitSql(sql string) (string, error)

func (*Derby) Support

func (self *Derby) Support() (bool, error)

type Dialect

type Dialect struct {
	PageNo    int64 // 页码索引
	PageSize  int64 // 每页条数
	PageTotal int64 // 总条数
	PageCount int64 // 总页数
	Spilled   bool  // 分页类型
	IsOffset  bool  // 是否按下标分页
	IsPage    bool  // 是否分页
}

方言分页对象

func (*Dialect) GetCountSql

func (self *Dialect) GetCountSql(sql string) (string, error)

func (*Dialect) GetLimitSql

func (self *Dialect) GetLimitSql(sql string) (string, error)

func (*Dialect) Support

func (self *Dialect) Support() (bool, error)

type HSQLDialect

type HSQLDialect struct {
	Dialect
}

func (*HSQLDialect) GetCountSql

func (self *HSQLDialect) GetCountSql(sql string) (string, error)

func (*HSQLDialect) GetLimitSql

func (self *HSQLDialect) GetLimitSql(sql string) (string, error)

func (*HSQLDialect) Support

func (self *HSQLDialect) Support() (bool, error)

type IDialect

type IDialect interface {
	// 是否支持分页
	Support() (bool, error)
	// 获取统计语句
	GetCountSql(sql string) (string, error)
	// 获取分页语句
	GetLimitSql(sql string) (string, error)
}

方言分页接口

type MysqlDialect

type MysqlDialect struct {
	Dialect
}

func (*MysqlDialect) GetCountSql

func (self *MysqlDialect) GetCountSql(sql string) (string, error)

func (*MysqlDialect) GetLimitSql

func (self *MysqlDialect) GetLimitSql(sql string) (string, error)

func (*MysqlDialect) Support

func (self *MysqlDialect) Support() (bool, error)

type OracleDialect

type OracleDialect struct {
	Dialect
}

func (*OracleDialect) GetCountSql

func (self *OracleDialect) GetCountSql(sql string) (string, error)

func (*OracleDialect) GetLimitSql

func (self *OracleDialect) GetLimitSql(sql string) (string, error)

func (*OracleDialect) Support

func (self *OracleDialect) Support() (bool, error)

type PostgreSQL

type PostgreSQL struct {
	Dialect
}

func (*PostgreSQL) GetCountSql

func (self *PostgreSQL) GetCountSql(sql string) (string, error)

func (*PostgreSQL) GetLimitSql

func (self *PostgreSQL) GetLimitSql(sql string) (string, error)

func (*PostgreSQL) Support

func (self *PostgreSQL) Support() (bool, error)

type SQLServer

type SQLServer struct {
	Dialect
}

func (*SQLServer) GetCountSql

func (self *SQLServer) GetCountSql(sql string) (string, error)

func (*SQLServer) GetLimitSql

func (self *SQLServer) GetLimitSql(sql string) (string, error)

func (*SQLServer) Support

func (self *SQLServer) Support() (bool, error)

type SQLServer2005

type SQLServer2005 struct {
	Dialect
}

func (*SQLServer2005) GetCountSql

func (self *SQLServer2005) GetCountSql(sql string) (string, error)

func (*SQLServer2005) GetLimitSql

func (self *SQLServer2005) GetLimitSql(sql string) (string, error)

func (*SQLServer2005) Support

func (self *SQLServer2005) Support() (bool, error)

type Sybase

type Sybase struct {
	Dialect
}

func (*Sybase) GetCountSql

func (self *Sybase) GetCountSql(sql string) (string, error)

func (*Sybase) GetLimitSql

func (self *Sybase) GetLimitSql(sql string) (string, error)

func (*Sybase) Support

func (self *Sybase) Support() (bool, error)

Jump to

Keyboard shortcuts

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