Skip to content

Instantly share code, notes, and snippets.

@mmckegg

mmckegg/or.js Secret

Last active December 15, 2015 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmckegg/a724840b5acc6c45efad to your computer and use it in GitHub Desktop.
Save mmckegg/a724840b5acc6c45efad to your computer and use it in GitHub Desktop.
var matchers = [
{ $ref: 'one_post',
id: {$index: true},
type: 'post'
},
{ $ref: 'many_comments',
postId: {$index: true},
type: 'comment'
},
]
var postId = 'post-1'
createMatchStream([
{$ref: 'one_post', id: postId},
{$ref: 'many_comments', postId: postId}
])
var matchers = [
{ $ref: 'one_post',
$index: ['id']
type: 'post'
},
{ $ref: 'many_comments',
$index: ['postId']
type: 'comment'
},
]
var postId = 'post-1'
createMatchStream([
{$ref: 'one_post', id: postId},
{$ref: 'many_comments', postId: postId}
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment