{"size": 506, "ext": "js", "max_stars_repo_path": "dbread.js", "max_stars_repo_name": "jcodling/node-OPC-UA-server", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "dbread.js", "max_issues_repo_name": "jcodling/node-OPC-UA-server", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "dbread.js", "max_forks_repo_name": "jcodling/node-OPC-UA-server", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.0833333333, "max_line_length": 63, "alphanum_fraction": 0.54743083}
var r = require('rethinkdb');
var conn = null;

r.connect({ host: 'localhost', port: 28015, db: 'sensor' },
	function(err, con) {
		if (err) throw err;
		conn = con;

		r.table('usonic').run(conn, function(err, cursor) {
			if (err) throw err;
				cursor.each(function(err, row) {
					if (err) throw err;
					console.log(row['timestamp'] + "\t::\t" + row['reading']);
//					console.log(row);
				}, function() {
					conn.close(function(err) {
						if (err) throw err;
					}
				);
			});
		});
	}
);
