How to use the pg-cursor.prototype function in pg-cursor

To help you get started, we’ve selected a few pg-cursor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NodeBB / NodeBB / src / database / postgres / sorted.js View on Github external
module.exports = function (module) {
	var helpers = require('./helpers');
	const util = require('util');
	var Cursor = require('pg-cursor');
	Cursor.prototype.readAsync = util.promisify(Cursor.prototype.read);
	const sleep = util.promisify(setTimeout);

	require('./sorted/add')(module);
	require('./sorted/remove')(module);
	require('./sorted/union')(module);
	require('./sorted/intersect')(module);

	module.getSortedSetRange = async function (key, start, stop) {
		return await getSortedSetRange(key, start, stop, 1, false);
	};

	module.getSortedSetRevRange = async function (key, start, stop) {
		return await getSortedSetRange(key, start, stop, -1, false);
	};

	module.getSortedSetRangeWithScores = async function (key, start, stop) {

pg-cursor

Query cursor extension for node-postgres

MIT
Latest version published 2 months ago

Package Health Score

88 / 100
Full package analysis

Popular pg-cursor functions