0.9.8 • Published 9 years ago

mongodb-native-join v0.9.8

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

mongodb-native-join

Join queries for mongodb native driver.

Easily join multiple queries into single query.

Support chain.

#API cursor(sourceCursor) - returns new wrapped cursor

join(field, collectionName) - query all fields from destination collection

join(field, collectionName, project) - query specified fields from destination collection

#Usage:

import joinedCursor from 'mongodb-native-join'
import {MongoClient} from 'mongodb'

const db = MongoClient.connect('your_server', (err, db) => {
	const cursor = joinedCursor(db.collection('som_collection').find('posts'));

	cursor
		.join('author', 'users', 'login firstName lastName')
		.join('comments', 'comments')
		.toArray();
	//do something    		
});
  
0.9.8

9 years ago

0.9.7

9 years ago

0.9.6-1

9 years ago

0.9.6

9 years ago

0.9.5

9 years ago

0.9.4

9 years ago

0.9.3

9 years ago

0.9.2

9 years ago

0.9.1

9 years ago

0.9.0

9 years ago