Skip to content
Browse files

start fixing all protobuf code by making tests work

  • Loading branch information...
1 parent 18a90bb commit 4d763764328a29f609fe3c621bca789e3895bc15 dstrek committed Feb 14, 2013
View
3 index.js
@@ -25,6 +25,9 @@ var Query = require('./rethinkdb/queries/query');
var rethinkdb = require('./rethinkdb/rethinkdb');
+// expost this temporarily for old tests
+rethinkdb.errors = require('./rethinkdb/errors');
+
/**
* Constructs a primitive ReQL type from a javascript value.
* @param {*} value The value to wrap.
View
2 rethinkdb/database.js
@@ -17,7 +17,7 @@ function Database(dbName) {
* List all tables in this database
*/
Database.prototype.tableList = function() {
- return new AdminQuery(MetaQuery.MetaQueryType.LIST_TABLES, this.name_);
+ return new AdminQuery('LIST_TABLES', this.name_);
};
//goog.exportProperty(rethinkdb.Database.prototype, 'tableList', rethinkdb.Database.prototype.tableList);
View
4 rethinkdb/query_language.js
@@ -4,7 +4,3 @@ var protobuf = require('protobuf');
var schema = new protobuf.Schema(fs.readFileSync(path.join(__dirname,'query_language.desc')));
module.exports = schema;
-
-s = schema['Query'].serialize({type: 'META', token: 1, metaQuery: { type: 'LIST_DBS', db_name: 'lolololololols£'} })
-console.log( s.length );
-console.log( schema['Query'].parse(s) );
View
1 rethinkdb/rethinkdb.js
@@ -1,4 +1,5 @@
// temporary hack file just to get past the initial porting step
+// require this file to get access to the monkey patching api methods that goes on in index.js
function rethinkdb(jsobj) {
return rethinkdb.expr(jsobj);
View
5 test.js → test/old/run-test.js
@@ -2,6 +2,7 @@
HOST = process.argv[2] || 'localhost';
PORT = parseInt(process.argv[3]) || 28015;
-global.rethinkdb = require('./index');
+global.rethinkdb = require('../../index');
+//global.rethinkdb = require('rethinkdb');
require('./test-driver');
-require('./rethinkdb/test.js');
+require('./test');
View
0 test-driver.js → test/old/test-driver.js
File renamed without changes.
View
0 old/test.js → test/old/test.js
File renamed without changes.

0 comments on commit 4d76376

Please sign in to comment.
Something went wrong with that request. Please try again.