UNPKG

drizzle-cursor

Version:

Utils for Drizzle ORM cursor based pagination

89 lines (45 loc) 1.58 kB
# drizzle-cursor ## 0.5.3 ### Patch Changes - Parse for Date/DateTime string ## 0.5.2 ### Patch Changes - Validate for Date/DateTime string ## 0.5.1 ### Patch Changes - fix null on date column (try 1) ## 0.5.0 ### Minor Changes - Update drizzle peer version and add pg test ## 0.4.1 ### Patch Changes - Update peerDependency to allow drizzle v0.30.x ## 0.4.0 ### Minor Changes - Add `options` to `generateCursor` so `decoder`, `encoder`, `parser`, `serializer`, `parse` and `serialize` can be customized enabling custom cursor tokens. ## 0.3.2 ### Patch Changes - add Licence to README ## 0.3.1 ### Patch Changes - Add documentation on README ## 0.3.0 ### Minor Changes - change parse/serialize to encode/decode Base UTF-8 with `Buffer` instead of built-in atob/btoa ## 0.2.1 ### Patch Changes - Add docs and date tests ## 0.2.0 ### Minor Changes - Update drizzle-orm and devDependencies, also add `db:seed` and fix test example. ## 0.1.0 ### Minor Changes - - Add `parse()`/`serialize()` function and `config.parse()`/`config.serialize()` methods to handle base64 tokens - Refactor `config.where` so intead of being an object is a clousure function which enables to use the same instance of `generateCursor()` accross multiple calls calling `.where()` without and with arguments. - Remove second argument from `generateCursor()` which is now used as the argument of `.where()` ## 0.0.3 ### Patch Changes - set "ASC" as default for Cursor.order ## 0.0.2 ### Patch Changes - Move drizzle-orm from dependencies to peerDependencies