From 94fda168784162b9e521e8ffa8436555ab226e35 Mon Sep 17 00:00:00 2001 From: Mike Dirolf Date: Fri, 27 Feb 2009 09:23:13 -0500 Subject: [PATCH] use new syntax for creating indexes --- tests/mongo-qa/indices | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/mongo-qa/indices b/tests/mongo-qa/indices index c2cf2f3..0156a71 100755 --- a/tests/mongo-qa/indices +++ b/tests/mongo-qa/indices @@ -1,6 +1,9 @@ #!/usr/bin/env ruby require File.join(File.dirname(__FILE__), '_common.rb') + +include XGen::Mongo + db = Mongo.new(DEFAULT_HOST, DEFAULT_PORT).db(DEFAULT_DB) x = db.collection('x') y = db.collection('y') @@ -41,6 +44,6 @@ raise "\n#{err.join("\n")}" unless err == ['', ''] x.drop_index('field1_1') sorted_index_info(x).each { |info| puts sorted_info_keys(info) } -y.create_index('abc', ['a', 'b', 'c']) -y.create_index('d', ['d']) +y.create_index([['a', ASCENDING], ['b', ASCENDING], ['c', ASCENDING]]) +y.create_index('d') sorted_index_info(y).each { |info| puts sorted_info_keys(info) }