New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@dashdot/cursors

Package Overview
Dependencies
Maintainers
6
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dashdot/cursors

A simple SQL and Mongo implementation of cursor based pagination

latest
npmnpm
Version
0.4.0
Version published
Maintainers
6
Created
Source

Dashdot Cursors

build codecov

A simple SQL and Mongo implementation of cursor based pagination

Usage

Inside your Node project directory, run the following:

npm i --save @dashdot/cursors

Or with Yarn:

yarn add @dashdot/cursors

API

import { cursorToSqlQuery } from '@dashdot/cursor'
import * as tables from './tables'

const user = await tables.users().fist()
const orderBy = {
    email: 'ASC'
    lastName: 'DESC',
    firstName: 'ASC',
    id: 'DESC',
}
const cursor = createCursor(user, orderBy)
const [
    whereQuery,
    whereValues,
    orderQuery
]  = cursorToSqlQuery(cursor, orderBy)
const nextUser = await tables.users()
    .whereRaw(whereQuery, whereValues)
    .orderByRaw(orderQuery)
    .first()

FAQs

Package last updated on 03 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts