# Bootstrap Table Pipelining
Use Plugin: [bootstrap-table-pipeline]
This plugin enables client side data caching for server side requests which will
eliminate the need to issue a new request every page change. This will allow
for a performance balance for a large data set between returning all data at once
(client side paging) and a new server side request (server side paging).
There are two new options:
- usePipeline: enables this feature
- pipelineSize: the size of each cache window
The size of the pipeline must be evenly divisible by the current page size. This is
assured by rounding up to the nearest evenly divisible value. For example, if
the pipeline size is 4990 and the current page size is 25, then pipeline size will
be dynamically set to 5000.
The cache windows are computed based on the pipeline size and the total number of rows
returned by the server side query. For example, with pipeline size 500 and total rows
1300, the cache windows will be:
[{'lower': 0, 'upper': 499}, {'lower': 500, 'upper': 999}, {'lower': 1000, 'upper': 1499}]
Using the limit (i.e. the pipelineSize) and offset parameters, the server side request
**MUST** return only the data in the requested cache window **AND** the total number of rows.
To wit, the server side code must use the offset and limit parameters to prepare the response
data.
On a page change, the new offset is checked if it is within the current cache window. If so,
the requested page data is returned from the cached data set. Otherwise, a new server side
request will be issued for the new cache window.
The current cached data is only invalidated on these events:
- sorting
- searching
- page size change
- page change moves into a new cache window
There are two new events:
- cached-data-hit.bs.table: issued when cached data is used on a page change
- cached-data-reset.bs.table: issued when the cached data is invalidated and new server side request is issued
## Features
* Created with Bootstrap 4
## Usage
```
# assumed import of bootstrap and bootstrap-table assets
<script src="/path/to/bootstrap-table-pipeline.js"></script>
...
<table id="pipeline_table"
class="table table-striped"
data-method='post'
data-use-pipeline="true"
data-pipeline-size="5000"
data-pagination="true"
data-side-pagination="server"
data-page-size="50">
<thead><tr>
<th data-field="type" data-sortable="true">Type</th>
<th data-field="value" data-sortable="true">Value</th>
<th data-field="date" data-sortable="true">Date</th>
</tr></thead>
</table>
```
## Options
### usePipeline
* type: Boolean
* description: Set true to enable pipelining
* default: `false`
## pipelineSize
* type: Integer
* description: Size of each cache window. Must be greater than 0
* default: `1000`
## Events
### onCachedDataHit(cached-data-hit.bs.table)
* Fires when paging was able to use the locally cached data.
### onCachedDataReset(cached-data-reset.bs.table)
* Fires when the locally cached data needed to be reset (i.e. on sorting, searching, page size change or paged out of current cache window)
没有合适的资源?快使用搜索试试~ 我知道了~
基于 Gin 进行模块化设计的 API 框架,封装了常用功能,使用简单,致力于进行快速的业务研发
共400个文件
go:239个
js:56个
html:28个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 77 浏览量
2023-05-02
16:13:43
上传
评论
收藏 2.16MB ZIP 举报
温馨提示
基于 Gin 进行模块化设计的 API 框架,封装了常用功能,使用简单,致力于进行快速的业务研发。比如,支持 cors 跨域、jwt 签名验证、zap 日志收集、panic 异常捕获、trace 链路追踪、prometheus 监控指标、swagger 文档生成、viper 配置文件解析、gorm 数据库组件、graphql 查询语言、errno 统一定义错误码、gRPC 的使用 等等。
资源推荐
资源详情
资源评论
收起资源包目录
基于 Gin 进行模块化设计的 API 框架,封装了常用功能,使用简单,致力于进行快速的业务研发 (400个子文件)
gormgen.bat 705B
handlergen.bat 296B
gqlgen.bat 251B
swagger.bat 139B
materialdesignicons.min.css 181KB
bootstrap.min.css 156KB
style.min.css 104KB
animate.min.css 56KB
jquery-confirm.min.css 22KB
bootstrap-select.css 12KB
bootstrap-select.min.css 11KB
bootstrap-table.css 10KB
bootstrap-table.min.css 9KB
multitabs.min.css 2KB
bootstrap-table-cell-input.min.css 605B
bootstrap-table-filter-control.min.css 429B
jquery.treegrid.min.css 175B
Dockerfile 955B
materialdesignicons-webfont.eot 684KB
.gitignore 276B
docs.go 110KB
generated.go 73KB
gen_cron_task.go 20KB
core.go 15KB
gen_menu.go 14KB
gen_authorized.go 13KB
gen_admin.go 12KB
gen_authorized_api.go 11KB
gen_menu_action.go 11KB
context.go 9KB
client.go 9KB
main.go 8KB
gen_admin_menu.go 7KB
email_template.go 6KB
execute.go 6KB
func_list.go 6KB
logger.go 6KB
func_searchmysql.go 5KB
redis.go 5KB
router_api.go 5KB
table_menu_action.go 5KB
func_modify.go 5KB
func_list.go 5KB
table_menu.go 4KB
func_list.go 4KB
func_create.go 4KB
template.go 4KB
main.go 4KB
func_login.go 4KB
table_cron_task.go 4KB
urltable.go 3KB
trace.go 3KB
router_render.go 3KB
urltable_test.go 3KB
main.go 3KB
check_signature.go 3KB
func_detail.go 3KB
util.go 3KB
rsa_test.go 3KB
execute.go 3KB
dashboard.go 3KB
file.go 3KB
tool.go 3KB
en-us.go 3KB
func_sign.go 3KB
func_listapi.go 3KB
zh-cn.go 3KB
generator.go 3KB
func_listaction.go 3KB
mysql.go 3KB
parser.go 3KB
configs.go 3KB
main.go 3KB
func_email.go 3KB
service_modify.go 3KB
func_create.go 3KB
service_detailbykey.go 3KB
table_authorized.go 3KB
table_admin.go 2KB
handler.go 2KB
router.go 2KB
handler.go 2KB
option.go 2KB
admin.go 2KB
func_createapi.go 2KB
plugin.go 2KB
func_createaction.go 2KB
check_rbac.go 2KB
table_authorized_api.go 2KB
func_sendmessage.go 2KB
code.go 2KB
func_detail.go 2KB
func_modifypassword.go 2KB
func_listadminmenu.go 2KB
config.go 2KB
table_admin_menu.go 2KB
service_create.go 2KB
func_create.go 2KB
handler.go 2KB
func_list.go 2KB
共 400 条
- 1
- 2
- 3
- 4
资源评论
Java程序员-张凯
- 粉丝: 1w+
- 资源: 6804
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功