tvainika / objection-keyset-pagination Goto Github PK
View Code? Open in Web Editor NEWKeyset pagination (cursor based pagination) plugin for Objection.js
License: MIT License
Keyset pagination (cursor based pagination) plugin for Objection.js
License: MIT License
Hi,
This is not an issue, a noob question!
Thanks for the this package. I want to show pagination with vuejs with express backend.
I am getting
"paginate": {
"first": 1,
"last": 10
}
this object. How can i navigate to the next page?
Can i get a response something like that?
"current_page": 1,
"last_page": 3,
"next_page_url": "/api/animals?page=2",
"prev_page_url": null,
Cool lib, I think the concept is good, unfortunately it doesn't seem to work :/
Tried using this on a small project, using a simple query:
await ModeNamel.query()
.limit(N)
.keysetPage()
but result.keyset
is always equal to: { first: {}, last: {} }
Hi, so what is happening with me is
fetch 1 (ok)
.orderBy('id') => keyset { first: 3, last: 6 }
fetch 2 (fail)
error: column reference "id" is ambiguous"
(so it can't get the 2nd page)
fetch 1 (fail)
.orderBy('profile.id') => keyset {}
(if I try to define it, keyset returns empty)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.