meta

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

* @Author: kamalyes 501893067@qq.com * @Date: 2025-11-11 00:00:00 * @LastEditors: kamalyes 501893067@qq.com * @LastEditTime: 2025-11-13 23:19:22 * @FilePath: \go-sqlbuilder\meta\paging.go * @Description: * * Copyright (c) 2025 by kamalyes, All Rights Reserved.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Paging

type Paging struct {
	Page     int32 `json:"page"`      // 当前页码(从1开始)
	PageSize int32 `json:"page_size"` // 每页记录数
	Offset   int32 `json:"offset"`    // 数据库偏移量
	Limit    int32 `json:"limit"`     // 查询限制数
	Total    int64 `json:"total"`     // 总记录数
}

Paging 分页元数据

func (*Paging) GetLimit

func (p *Paging) GetLimit() int

GetLimit 获取查询限制数

func (*Paging) GetOffset

func (p *Paging) GetOffset() int

GetOffset 计算数据库偏移量

func (*Paging) GetTotalPages

func (p *Paging) GetTotalPages() int64

GetTotalPages 计算总页数

func (*Paging) HasNextPage

func (p *Paging) HasNextPage() bool

HasNextPage 是否有下一页

func (*Paging) HasPrevPage

func (p *Paging) HasPrevPage() bool

HasPrevPage 是否有上一页

Jump to

Keyboard shortcuts

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