<commit_before>Guava - Query listener for database drivers
==========================================

- Listen to any query for inserts before they're sent to the database
- Saves hits to the database for realtime applications
- Supports mongodb statements: $all, $exists, $mod, $ne, $in, $nin, $nor, $or, $and, $size

Real world examples:
-------------------

- Twitter realtime stream

Example:
--------

```javascript

var guava = require('guava/node');

//wrapper for the driver: Mongo
var gva = new new guava.Mongo(),

//the messages collection
messages = gva.collection('messages');


//first find any items with the names: craig, or tim in it.
messages.find({ name: { $in: ['craig','tim'] } }, function(err, cursor)
{
	//loop through the results
	cursor.each(function(err, item)
	{
		//code here...
	});

	//then *bind* to any additional inserts to the database. this is *not* similar to mongodb's trailing cursors
	cursor.bind(function(item)
	{
		console.log(item.message);//hello world!
	});

});

//insert the first item, triggering the data binding.
messages.insert({ name: 'craig', message: 'hello world!'});

```<commit_msg>updated example<commit_after>Guava - Query listener for database drivers
==========================================

- Listen to any query for inserts before they're sent to the database
- Saves hits to the database for realtime applications
- Supports mongodb statements: $all, $exists, $mod, $ne, $in, $nin, $nor, $or, $and, $size

Real world examples:
-------------------

- Twitter realtime stream

Example:
--------

```javascript

var guava = require('guava/node');

var obs = new new guava.Observer();

obs.on({ name: { $in: ['craig','tim'] } }, function(item)
{
	console.log(item.message);//hello world!

});

obs.emit({ name: 'craig', message: 'hello world!'});

```
{'fraction_non_alphanumeric': 0.20959735245449532, 'fraction_numerical': 0.0, 'mean_word_length': 3.8894878706199463, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4343787', 'n_tokens_mistral': 564, 'n_tokens_neox': 534, 'n_words': 194}