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 Dialect ¶
type Dialect struct { PageNo int64 // 页码索引 PageSize int64 // 每页条数 PageTotal int64 // 总条数 PageCount int64 // 总页数 Spilled bool // 分页类型 IsOffset bool // 是否按下标分页 IsPage bool // 是否分页 IsFastPage bool // 是否快速分页 FastPageKey string // 快速分页索引 FastPageSort int // 快速分页正反序 FastPageParam []int64 // 快速分页下标值 FastPageSortParam int // 快速分页正反序值 FastPageSortCountQ bool // 是否执行count }
方言分页对象
func (*Dialect) GetResult ¶ added in v1.0.49
func (self *Dialect) GetResult() PageResult
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) // 分页结果 GetResult() PageResult }
方言分页接口
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 PageResult ¶ added in v1.0.49
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 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)
Click to show internal directories.
Click to hide internal directories.