xantiagoma / drizzle-cursor Goto Github PK
View Code? Open in Web Editor NEWDrizzle ORM - Utils to generate cursor pagination
Home Page: https://www.npmjs.com/package/drizzle-cursor
Drizzle ORM - Utils to generate cursor pagination
Home Page: https://www.npmjs.com/package/drizzle-cursor
With the release of drizzle-orm v0.30.x, this package is incompatible with any projects that use any drizzle version beyond v0.29.x. Carat dependencies in package.json have a special behavior for 0.x versions; they only allow increments of the patch version and not the minor version (https://stackoverflow.com/a/77837308/8396479)
When i tried using this library i encountered error with using cursor.Serialize
and cursor.Parse
functions because of lack of support for UTF-8
strings. could you please replace these functions with node js recommended functions?
btoa = > Buffer.from(str, 'utf-8').toString('base64')
atob => Buffer.from(data, 'base64').toString('utf-8')
thank you.
const cursorConfig: CursorConfig = {
cursors: [{ order: 'DESC', key: 'createdAt', schema: schema.users.createdAt }],
primaryCursor: { order: 'DESC', key: 'id', schema: schema.users.id },
};
const cursor = generateCursor(cursorConfig);
When then passing it to db.queries.users.findMany
results in:
value.toISOString is not a function. (In 'value.toISOString()', 'value.toISOString' is undefined)
if I run npm i drizzle-cursor
I get the following error:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/drizzle-orm
npm ERR! drizzle-orm@"^0.29.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer drizzle-orm@"^0.28.6" from [email protected]
npm ERR! node_modules/drizzle-cursor
npm ERR! drizzle-cursor@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
it seems this package does not work with the last version of drizzle-orm (0.29.3)
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.