From e658bb8a4a4c7b5f938ed9978f5317704c142eab Mon Sep 17 00:00:00 2001 From: CodyDWJones Date: Thu, 23 Sep 2021 06:49:41 -0700 Subject: [PATCH] Upgrade to Python 3.8 (#496) * time.clock() was deprecated by Python 3.3 and removed by 3.8. * The 2.4.x Python Rethink driver changed the import syntax See https://github.com/rethinkdb/rethinkdb-python/pull/102 * Python 3.8 now uses ast.Constant for all constants. This script must now be run with 3.8 or newer. It's now possible to disable specific lines from the YAML test cases. I encountered a number of edge cases that were too troublesome or time consuming to fix. The impact should be minor since the other cases in the affected files are still included. As some compensation, some of the previously excluded test files are now partially included. * Regenerated the tests with Rethinkdb v2.4.0 Many files changed because the source YAML files use generic table names like "tbl" whereas the previously generated code did not. Strangely I cannot find any use of the old table names in Rethink's Git history. I don't know where they originated. Co-authored-by: Cody Jones --- internal/gen_tests/gen_tests.py | 145 +- .../reql_tests/reql_aggregation_test.go | 648 +++--- .../integration/reql_tests/reql_arity_test.go | 345 +++ .../reql_tests/reql_bitwise_test.go | 165 -- .../reql_tests/reql_changefeeds_edge_test.go | 128 +- .../reql_changefeeds_idxcopy_test.go | 71 +- .../reql_changefeeds_include_states_test.go | 100 +- .../reql_tests/reql_changefeeds_now_test.go | 84 + .../reql_tests/reql_changefeeds_point_test.go | 184 +- .../reql_changefeeds_squash_test.go | 204 ++ .../reql_tests/reql_changefeeds_table_test.go | 176 +- .../reql_tests/reql_control_test.go | 240 +- .../reql_tests/reql_datum_array_test.go | 8 +- .../reql_tests/reql_datum_binary_test.go | 8 +- .../reql_tests/reql_datum_bool_test.go | 8 +- .../reql_tests/reql_datum_null_test.go | 8 +- .../reql_tests/reql_datum_number_test.go | 8 +- .../reql_tests/reql_datum_object_test.go | 10 +- .../reql_tests/reql_datum_string_test.go | 8 +- .../reql_tests/reql_datum_typeof_test.go | 8 +- .../reql_tests/reql_datum_uuid_test.go | 8 +- .../reql_tests/reql_default_test.go | 8 +- .../reql_tests/reql_geo_constructors_test.go | 8 +- .../reql_tests/reql_geo_geojson_test.go | 8 +- .../reql_tests/reql_geo_indexing_test.go | 266 +-- .../reql_geo_intersection_inclusion_test.go | 8 +- .../reql_tests/reql_geo_operations_test.go | 8 +- .../reql_tests/reql_geo_primitives_test.go | 8 +- .../integration/reql_tests/reql_joins_test.go | 212 +- .../integration/reql_tests/reql_json_test.go | 8 +- .../reql_tests/reql_limits_test.go | 309 +++ .../integration/reql_tests/reql_match_test.go | 50 +- .../reql_tests/reql_math_logic_add_test.go | 8 +- .../reql_math_logic_aliases_test.go | 8 +- .../reql_tests/reql_math_logic_bit_test.go | 675 ++++++ .../reql_math_logic_comparison_test.go | 8 +- .../reql_tests/reql_math_logic_div_test.go | 8 +- .../reql_math_logic_floor_ceil_round_test.go | 8 +- .../reql_tests/reql_math_logic_logic_test.go | 32 +- .../reql_tests/reql_math_logic_math_test.go | 8 +- .../reql_tests/reql_math_logic_mod_test.go | 8 +- .../reql_tests/reql_math_logic_mul_test.go | 8 +- .../reql_tests/reql_math_logic_sub_test.go | 8 +- .../reql_tests/reql_meta_composite_test.go | 112 - .../reql_tests/reql_meta_dbs_test.go | 68 +- .../reql_tests/reql_meta_table_test.go | 34 +- .../reql_mutation_atomic_get_set_test.go | 110 +- .../reql_tests/reql_mutation_delete_test.go | 56 +- .../reql_tests/reql_mutation_insert_test.go | 344 +-- .../reql_tests/reql_mutation_replace_test.go | 137 +- .../reql_tests/reql_mutation_sync_test.go | 22 +- .../reql_tests/reql_mutation_update_test.go | 230 +- .../reql_tests/reql_polymorphism_test.go | 44 +- .../reql_tests/reql_random_test.go | 8 +- .../integration/reql_tests/reql_range_test.go | 8 +- .../reql_tests/reql_selection_test.go | 422 ++-- .../reql_tests/reql_sindex_api_test.go | 1924 ++++++++--------- .../reql_sindex_nullsinstrings_test.go | 50 +- .../reql_tests/reql_sindex_status_test.go | 140 +- .../reql_tests/reql_timeout_test.go | 9 +- .../reql_tests/reql_times_api_test.go | 8 +- .../reql_times_constructors_test.go | 103 +- .../reql_tests/reql_times_index_test.go | 188 +- .../reql_tests/reql_times_portions_test.go | 8 +- .../reql_tests/reql_times_shim_test.go | 8 +- .../reql_tests/reql_times_time_arith_test.go | 8 +- .../reql_tests/reql_times_timezones_test.go | 8 +- .../reql_tests/reql_transform_array_test.go | 8 +- .../reql_tests/reql_transform_fold_test.go | 32 +- .../reql_tests/reql_transform_map_test.go | 8 +- .../reql_tests/reql_transform_object_test.go | 8 +- .../reql_tests/reql_transform_table_test.go | 44 +- .../reql_transform_unordered_map_test.go | 38 +- .../reql_tests/reql_transformation_test.go | 770 +++---- .../reql_tests/reql_writehook_test.go | 240 -- query.go | 23 +- query_admin.go | 6 + 77 files changed, 5271 insertions(+), 4191 deletions(-) create mode 100644 internal/integration/reql_tests/reql_arity_test.go delete mode 100644 internal/integration/reql_tests/reql_bitwise_test.go create mode 100644 internal/integration/reql_tests/reql_changefeeds_now_test.go create mode 100644 internal/integration/reql_tests/reql_changefeeds_squash_test.go create mode 100644 internal/integration/reql_tests/reql_limits_test.go create mode 100644 internal/integration/reql_tests/reql_math_logic_bit_test.go delete mode 100644 internal/integration/reql_tests/reql_meta_composite_test.go delete mode 100644 internal/integration/reql_tests/reql_writehook_test.go diff --git a/internal/gen_tests/gen_tests.py b/internal/gen_tests/gen_tests.py index b98ec56e..82184b2d 100755 --- a/internal/gen_tests/gen_tests.py +++ b/internal/gen_tests/gen_tests.py @@ -29,18 +29,74 @@ r = None -TEST_EXCLUSIONS = [ - # python only tests - # 'regression/1133', - # 'regression/767', - # 'regression/1005', - 'regression/', - 'limits', # pending fix in issue #4965 - # double run - 'changefeeds/squash', - 'arity', - '.rb.yaml', -] +# Individual tests can be ignored by specifying their line numbers from the YAML source files. +TEST_EXCLUSIONS = { + 'regression/': None, + + 'limits.yaml': [ + 36, # Produces invalid Go code using `list` and `range` + 39, 41, 47, # Rely on above + 75, 87, 108, 120, # The fetch() calls hang + ], + + 'changefeeds/squash': [ + 47, # double run + ], + + 'arity': [ + 51, 100, 155, 272, 282, 291, # Malformed syntax produces malformed Go + ], + + 'sindex/truncation.rb.yaml': None, # The code generator fails when it encounters (0...n).map{} + + 'changefeeds/geo.rb.yaml': None, # The generated code needs to enclose the map keys inside quotation marks + + 'aggregation.yaml': [ + 482, # A nil map key is expected, but Go strings cannot be nil, so actual result is "" + ], + + # This file expects a password-less user `test_user` to exist, but even if it does, + # - Lines #18 and #27 try to create a database and fail if it already exists, but the YAML doesn't drop the database + # afterwards, so successive runs always fail. Unfortunately, other test cases depend on these lines being run. + # - Lines #49, #54, #60, and #66 use a global run option `user` which Rethink doesn't recognize. + 'meta/grant.yaml': None, + + # The lambdas passed to SetWriteHook() must return rethinkdb.Term but the generated code uses interface{} instead. + # These types of queries might be covered by reql_writehook_test.go though. + 'mutation/write_hook.yaml': None, + + 'changefeeds/idxcopy.yaml': [ + 28, # The fetch() hangs. + ], + + 'changefeeds/now.py_one.yaml': [ + 5, # Hangs instead of returning an error. + ], + + 'times/constructors.yaml': [ + 59, 61, # Tries to create year 10000 but Rethink now only allows up to 9999. + 64, 70, # The expected error message refers to 10000 but Rethink's error actually says 9999. + ], + + 'math_logic/logic.yaml': [ + 143, 147, # Expected an error but got nil. Don't know if it's a real problem. + ], + + 'control.yaml': [ + # Attempts to add 1 to a integer variable that was set to tbl.Count(). The Go '+' operator must be used instead of the ReQL '.Add()'. + # Deciding which operator to use requires the variable type, which in turn requires knowing what type each ReQL function returns. + # The robust solution is too much work, and checking for '.Count()' in the definition is a hack. + 236, + ], + + 'meta/dbs.yaml': [ + # For some reason the results include databases created by other tests (eg. 'examples', 'test_cur_all') + 6, 18, 31, 37, + ], + + # For some reason the results include databases created by other tests (eg. 'examples', 'test_cur_all') + 'meta/composite.py.yaml': None, +} GO_KEYWORDS = [ 'break', 'case', 'chan', 'const', 'continue', 'default', 'defer', 'else', @@ -51,7 +107,7 @@ def main(): logging.basicConfig(format="[%(name)s] %(message)s", level=logging.INFO) - start = time.clock() + start = time.perf_counter() args = parse_args() if args.debug: logger.setLevel(logging.DEBUG) @@ -71,17 +127,25 @@ def main(): __file__, process_polyglot.__file__, ]) + full_exclusions = list(file for (file, lines) in TEST_EXCLUSIONS.items() if not lines) for testfile in process_polyglot.all_yaml_tests( args.test_dir, - TEST_EXCLUSIONS): + full_exclusions): logger.info("Working on %s", testfile) + + excluded_lines = set() + for exclusion, lines in TEST_EXCLUSIONS.items(): + if exclusion in testfile: + excluded_lines.update(lines) + TestFile( test_dir=args.test_dir, filename=testfile, + excluded_lines=excluded_lines, test_output_dir=args.test_output_dir, renderer=renderer, ).load().render() - logger.info("Finished in %s seconds", time.clock() - start) + logger.info("Finished in %s seconds", time.perf_counter() - start) def parse_args(): @@ -129,7 +193,7 @@ def import_python_driver(py_driver_dir): '''Imports the test driver header''' stashed_path = sys.path sys.path.insert(0, os.path.realpath(py_driver_dir)) - import rethinkdb as r + from rethinkdb import r sys.path = stashed_path return r @@ -174,9 +238,10 @@ def evaluate_snippet(snippet): class TestFile(object): '''Represents a single test file''' - def __init__(self, test_dir, filename, test_output_dir, renderer): + def __init__(self, test_dir, filename, excluded_lines, test_output_dir, renderer): self.filename = filename self.full_path = os.path.join(test_dir, filename) + self.excluded_lines = excluded_lines self.module_name = filename.split('.')[0].replace('/', '_') self.test_output_dir = test_output_dir self.reql_vars = {'r'} @@ -208,7 +273,7 @@ def get_varnames(self, yaml_file): def render(self): '''Renders the converted tests to a runnable test file''' - defs_and_test = ast_to_go(self.test_generator, self.reql_vars) + defs_and_test = ast_to_go(self.test_generator, self.reql_vars, self.excluded_lines) self.renderer.source_files = [self.full_path] self.renderer.render( 'template.go', @@ -268,10 +333,8 @@ def py_to_go_type(py_type): 'uuid': 'compare.Regex', # clashes with ast.Uuid }.get(py_type.__name__, camel(py_type.__name__)) elif py_type.__module__ == 'rethinkdb.query': - # All of the constants like minval maxval etc are defined in - # query.py, but no type name is provided to `type`, so we have - # to pull it out of a class variable - return camel(py_type.st) + # ReQL constants don't have a type; they are just identifiers. + return None else: raise Unhandled( "Don't know how to convert python type {}.{} to Go" @@ -351,12 +414,14 @@ def query_to_go(item, reql_vars): ) -def ast_to_go(sequence, reql_vars): +def ast_to_go(sequence, reql_vars, excluded_lines): '''Converts the the parsed test data to go source lines using the visitor classes''' reql_vars = set(reql_vars) for item in sequence: - if type(item) == process_polyglot.Def: + if hasattr(item, 'line_num') and item.line_num in excluded_lines: + logger.info("Skipped %s line %d due to exclusion", item.testfile, item.line_num) + elif type(item) == process_polyglot.Def: yield def_to_go(item, reql_vars) elif type(item) == process_polyglot.CustomDef: yield GoDef(line=Version(item.line, item.line), @@ -532,6 +597,7 @@ def visit_Assign(self, node): Unhandled("We only support assigning to one variable") var = node.targets[0].id self.write("var " + var + " ") + if is_reql(self._type): self.write('r.Term') else: @@ -670,7 +736,7 @@ def visit_Call(self, node): self.visit(node.func) elif type(node.func) == ast.Name and node.func.id == 'fetch': if len(node.args) == 1: - node.args.append(ast.Num(0)) + node.args.append(ast.Constant(0)) elif len(node.args) > 2: node.args = node.args[:2] self.visit(node.func) @@ -709,14 +775,15 @@ def visit_Lambda(self, node): self.write("}") def visit_Subscript(self, node): - if node.slice is None or type(node.slice.value) != ast.Num: + if node.slice is not None and type(node.slice.value) == ast.Constant and type(node.slice.value.value) == int: + self.visit(node.value) + self.write("[") + self.write(str(node.slice.value.n)) + self.write("]") + else: logger.error("While doing: %s", ast.dump(node)) raise Unhandled("Only integers subscript can be converted." " Got %s" % node.slice.value.s) - self.visit(node.value) - self.write("[") - self.write(str(node.slice.value.n)) - self.write("]") def visit_ListComp(self, node): gen = node.generators[0] @@ -782,7 +849,7 @@ def visit_BinOp(self, node): self.write(opMap[t]) self.visit(node.right) elif t == ast.Pow: - if type(node.left) == ast.Num and node.left.n == 2: + if type(node.left) == ast.Constant and type(node.left.value) == int and node.left.n == 2: self.visit(node.left) self.write(" << ") self.visit(node.right) @@ -802,12 +869,12 @@ def is_byte_array_add(self, node): return False def is_string_mul(self, node): - if ((type(node.left) == ast.Str and type(node.right) == ast.Num) and type(node.op) == ast.Mult): + if ((type(node.left) == ast.Constant and type(node.left.value) == str and type(node.right) == ast.Constant and type(node.right.value) == int) and type(node.op) == ast.Mult): self.write("\"") self.write(node.left.s * node.right.n) self.write("\"") return True - elif ((type(node.left) == ast.Num and type(node.right) == ast.Str) and type(node.op) == ast.Mult): + elif ((type(node.left) == ast.Constant and type(node.left.value) == int and type(node.right) == ast.Constant and type(node.right.value) == str) and type(node.op) == ast.Mult): self.write("\"") self.write(node.left.n * node.right.s) self.write("\"") @@ -893,19 +960,15 @@ def infix(self, func_name, left, right): self.write(")") def is_not_reql(self, node): - if type(node) in (ast.Name, ast.NameConstant, - ast.Num, ast.Str, ast.Dict, ast.List): - return True - else: - return False + return type(node) in (ast.Constant, ast.Name, ast.NameConstant, ast.Dict, ast.List) def visit_Subscript(self, node): self.visit(node.value) if type(node.slice) == ast.Index: # Syntax like a[2] or a["b"] - if self.smart_bracket and type(node.slice.value) == ast.Str: + if self.smart_bracket and type(node.slice.value) == ast.Constant and type(node.slice.value.value) == str: self.write(".Field(") - elif self.smart_bracket and type(node.slice.value) == ast.Num: + elif self.smart_bracket and type(node.slice.value) == ast.Constant and type(node.slice.value.value) == int: self.write(".Nth(") else: self.write(".AtIndex(") @@ -937,7 +1000,7 @@ def get_bound(bound, default): return default elif type(bound) == ast.UnaryOp and type(bound.op) == ast.USub: return -bound.operand.n - elif type(bound) == ast.Num: + elif type(bound) == ast.Constant and type(bound.value) == int: return bound.n else: raise Unhandled( diff --git a/internal/integration/reql_tests/reql_aggregation_test.go b/internal/integration/reql_tests/reql_aggregation_test.go index 23790e98..7df6942e 100644 --- a/internal/integration/reql_tests/reql_aggregation_test.go +++ b/internal/integration/reql_tests/reql_aggregation_test.go @@ -36,31 +36,31 @@ func (suite *AggregationSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_agg").Exec(suite.session) - err = r.DBCreate("db_agg").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_agg").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_agg").TableDrop("table_test_agg").Exec(suite.session) - err = r.DB("db_agg").TableCreate("table_test_agg").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_agg").Table("table_test_agg").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_agg").TableDrop("table_test_agg2").Exec(suite.session) - err = r.DB("db_agg").TableCreate("table_test_agg2").Exec(suite.session) + r.DB("test").TableDrop("tbl2").Exec(suite.session) + err = r.DB("test").TableCreate("tbl2").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_agg").Table("table_test_agg2").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl2").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_agg").TableDrop("table_test_agg3").Exec(suite.session) - err = r.DB("db_agg").TableCreate("table_test_agg3").Exec(suite.session) + r.DB("test").TableDrop("tbl3").Exec(suite.session) + err = r.DB("test").TableCreate("tbl3").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_agg").Table("table_test_agg3").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl3").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_agg").TableDrop("table_test_agg4").Exec(suite.session) - err = r.DB("db_agg").TableCreate("table_test_agg4").Exec(suite.session) + r.DB("test").TableDrop("tbl4").Exec(suite.session) + err = r.DB("test").TableCreate("tbl4").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_agg").Table("table_test_agg4").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl4").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -69,11 +69,11 @@ func (suite *AggregationSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_agg").TableDrop("table_test_agg").Exec(suite.session) - r.DB("db_agg").TableDrop("table_test_agg2").Exec(suite.session) - r.DB("db_agg").TableDrop("table_test_agg3").Exec(suite.session) - r.DB("db_agg").TableDrop("table_test_agg4").Exec(suite.session) - r.DBDrop("db_agg").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DB("test").TableDrop("tbl2").Exec(suite.session) + r.DB("test").TableDrop("tbl3").Exec(suite.session) + r.DB("test").TableDrop("tbl4").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -82,24 +82,24 @@ func (suite *AggregationSuite) TearDownSuite() { func (suite *AggregationSuite) TestCases() { suite.T().Log("Running AggregationSuite: Tests that manipulation data in tables") - table_test_agg := r.DB("db_agg").Table("table_test_agg") - _ = table_test_agg // Prevent any noused variable errors - table_test_agg2 := r.DB("db_agg").Table("table_test_agg2") - _ = table_test_agg2 // Prevent any noused variable errors - table_test_agg3 := r.DB("db_agg").Table("table_test_agg3") - _ = table_test_agg3 // Prevent any noused variable errors - table_test_agg4 := r.DB("db_agg").Table("table_test_agg4") - _ = table_test_agg4 // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors + tbl2 := r.DB("test").Table("tbl2") + _ = tbl2 // Prevent any noused variable errors + tbl3 := r.DB("test").Table("tbl3") + _ = tbl3 // Prevent any noused variable errors + tbl4 := r.DB("test").Table("tbl4") + _ = tbl4 // Prevent any noused variable errors { // aggregation.yaml line #6 /* {'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':100} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 100} - /* r.range(100).for_each(table_test_agg.insert({'id':r.row, 'a':r.row.mod(4)})) */ + /* r.range(100).for_each(tbl.insert({'id':r.row, 'a':r.row.mod(4)})) */ - suite.T().Log("About to run line #6: r.Range(100).ForEach(table_test_agg.Insert(map[interface{}]interface{}{'id': r.Row, 'a': r.Row.Mod(4), }))") + suite.T().Log("About to run line #6: r.Range(100).ForEach(tbl.Insert(map[interface{}]interface{}{'id': r.Row, 'a': r.Row.Mod(4), }))") - runAndAssert(suite.Suite, expected_, r.Range(100).ForEach(table_test_agg.Insert(map[interface{}]interface{}{"id": r.Row, "a": r.Row.Mod(4)})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Range(100).ForEach(tbl.Insert(map[interface{}]interface{}{"id": r.Row, "a": r.Row.Mod(4)})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -110,11 +110,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #10 /* {'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':100} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 100} - /* r.range(100).for_each(table_test_agg2.insert({'id':r.row, 'a':r.row.mod(4)})) */ + /* r.range(100).for_each(tbl2.insert({'id':r.row, 'a':r.row.mod(4)})) */ - suite.T().Log("About to run line #10: r.Range(100).ForEach(table_test_agg2.Insert(map[interface{}]interface{}{'id': r.Row, 'a': r.Row.Mod(4), }))") + suite.T().Log("About to run line #10: r.Range(100).ForEach(tbl2.Insert(map[interface{}]interface{}{'id': r.Row, 'a': r.Row.Mod(4), }))") - runAndAssert(suite.Suite, expected_, r.Range(100).ForEach(table_test_agg2.Insert(map[interface{}]interface{}{"id": r.Row, "a": r.Row.Mod(4)})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Range(100).ForEach(tbl2.Insert(map[interface{}]interface{}{"id": r.Row, "a": r.Row.Mod(4)})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -125,11 +125,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #14 /* {'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':100} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 100} - /* r.range(100).for_each(table_test_agg3.insert({'id':r.row, 'a':r.row.mod(4), 'b':{'c':r.row.mod(5)}})) */ + /* r.range(100).for_each(tbl3.insert({'id':r.row, 'a':r.row.mod(4), 'b':{'c':r.row.mod(5)}})) */ - suite.T().Log("About to run line #14: r.Range(100).ForEach(table_test_agg3.Insert(map[interface{}]interface{}{'id': r.Row, 'a': r.Row.Mod(4), 'b': map[interface{}]interface{}{'c': r.Row.Mod(5), }, }))") + suite.T().Log("About to run line #14: r.Range(100).ForEach(tbl3.Insert(map[interface{}]interface{}{'id': r.Row, 'a': r.Row.Mod(4), 'b': map[interface{}]interface{}{'c': r.Row.Mod(5), }, }))") - runAndAssert(suite.Suite, expected_, r.Range(100).ForEach(table_test_agg3.Insert(map[interface{}]interface{}{"id": r.Row, "a": r.Row.Mod(4), "b": map[interface{}]interface{}{"c": r.Row.Mod(5)}})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Range(100).ForEach(tbl3.Insert(map[interface{}]interface{}{"id": r.Row, "a": r.Row.Mod(4), "b": map[interface{}]interface{}{"c": r.Row.Mod(5)}})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -154,11 +154,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #27 /* {'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 1} - /* table_test_agg4.insert({'id':0, 'time':r.epoch_time(time1)}) */ + /* tbl4.insert({'id':0, 'time':r.epoch_time(time1)}) */ - suite.T().Log("About to run line #27: table_test_agg4.Insert(map[interface{}]interface{}{'id': 0, 'time': r.EpochTime(time1), })") + suite.T().Log("About to run line #27: tbl4.Insert(map[interface{}]interface{}{'id': 0, 'time': r.EpochTime(time1), })") - runAndAssert(suite.Suite, expected_, table_test_agg4.Insert(map[interface{}]interface{}{"id": 0, "time": r.EpochTime(time1)}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl4.Insert(map[interface{}]interface{}{"id": 0, "time": r.EpochTime(time1)}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -169,11 +169,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #28 /* {'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 1} - /* table_test_agg4.insert({'id':1, 'time':r.epoch_time(time2)}) */ + /* tbl4.insert({'id':1, 'time':r.epoch_time(time2)}) */ - suite.T().Log("About to run line #28: table_test_agg4.Insert(map[interface{}]interface{}{'id': 1, 'time': r.EpochTime(time2), })") + suite.T().Log("About to run line #28: tbl4.Insert(map[interface{}]interface{}{'id': 1, 'time': r.EpochTime(time2), })") - runAndAssert(suite.Suite, expected_, table_test_agg4.Insert(map[interface{}]interface{}{"id": 1, "time": r.EpochTime(time2)}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl4.Insert(map[interface{}]interface{}{"id": 1, "time": r.EpochTime(time2)}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -184,11 +184,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #33 /* 150 */ var expected_ int = 150 - /* table_test_agg.sum('a') */ + /* tbl.sum('a') */ - suite.T().Log("About to run line #33: table_test_agg.Sum('a')") + suite.T().Log("About to run line #33: tbl.Sum('a')") - runAndAssert(suite.Suite, expected_, table_test_agg.Sum("a"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Sum("a"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -199,11 +199,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #36 /* 150 */ var expected_ int = 150 - /* table_test_agg.map(lambda row:row['a']).sum() */ + /* tbl.map(lambda row:row['a']).sum() */ - suite.T().Log("About to run line #36: table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Sum()") + suite.T().Log("About to run line #36: tbl.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Sum()") - runAndAssert(suite.Suite, expected_, table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Sum(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Sum(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -214,11 +214,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #39 /* ({0:1200, 1:1225, 2:1250, 3:1275}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: 1200, 1: 1225, 2: 1250, 3: 1275} - /* table_test_agg.group('a').sum('id') */ + /* tbl.group('a').sum('id') */ - suite.T().Log("About to run line #39: table_test_agg.Group('a').Sum('id')") + suite.T().Log("About to run line #39: tbl.Group('a').Sum('id')") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").Sum("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").Sum("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -229,11 +229,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #43 /* 1.5 */ var expected_ float64 = 1.5 - /* table_test_agg.avg('a') */ + /* tbl.avg('a') */ - suite.T().Log("About to run line #43: table_test_agg.Avg('a')") + suite.T().Log("About to run line #43: tbl.Avg('a')") - runAndAssert(suite.Suite, expected_, table_test_agg.Avg("a"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Avg("a"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -244,11 +244,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #46 /* 1.5 */ var expected_ float64 = 1.5 - /* table_test_agg.map(lambda row:row['a']).avg() */ + /* tbl.map(lambda row:row['a']).avg() */ - suite.T().Log("About to run line #46: table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Avg()") + suite.T().Log("About to run line #46: tbl.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Avg()") - runAndAssert(suite.Suite, expected_, table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Avg(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Avg(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -259,11 +259,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #49 /* {0:48, 1:49, 2:50, 3:51} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: 48, 1: 49, 2: 50, 3: 51} - /* table_test_agg.group('a').avg('id') */ + /* tbl.group('a').avg('id') */ - suite.T().Log("About to run line #49: table_test_agg.Group('a').Avg('id')") + suite.T().Log("About to run line #49: tbl.Group('a').Avg('id')") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").Avg("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").Avg("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -274,11 +274,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #53 /* 0 */ var expected_ int = 0 - /* table_test_agg.min('a')['a'] */ + /* tbl.min('a')['a'] */ - suite.T().Log("About to run line #53: table_test_agg.Min('a').AtIndex('a')") + suite.T().Log("About to run line #53: tbl.Min('a').AtIndex('a')") - runAndAssert(suite.Suite, expected_, table_test_agg.Min("a").AtIndex("a"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Min("a").AtIndex("a"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -289,11 +289,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #56 /* {'a':0, 'id':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 0, "id": 0} - /* table_test_agg.order_by('id').min('a') */ + /* tbl.order_by('id').min('a') */ - suite.T().Log("About to run line #56: table_test_agg.OrderBy('id').Min('a')") + suite.T().Log("About to run line #56: tbl.OrderBy('id').Min('a')") - runAndAssert(suite.Suite, expected_, table_test_agg.OrderBy("id").Min("a"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.OrderBy("id").Min("a"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -304,11 +304,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #59 /* 0 */ var expected_ int = 0 - /* table_test_agg.map(lambda row:row['a']).min() */ + /* tbl.map(lambda row:row['a']).min() */ - suite.T().Log("About to run line #59: table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Min()") + suite.T().Log("About to run line #59: tbl.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Min()") - runAndAssert(suite.Suite, expected_, table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Min(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Min(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -319,11 +319,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #62 /* {0:{'a':0, 'id':0}, 1:{'a':1, 'id':1}, 2:{'a':2, 'id':2}, 3:{'a':3, 'id':3}} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: map[interface{}]interface{}{"a": 0, "id": 0}, 1: map[interface{}]interface{}{"a": 1, "id": 1}, 2: map[interface{}]interface{}{"a": 2, "id": 2}, 3: map[interface{}]interface{}{"a": 3, "id": 3}} - /* table_test_agg.group('a').min('id') */ + /* tbl.group('a').min('id') */ - suite.T().Log("About to run line #62: table_test_agg.Group('a').Min('id')") + suite.T().Log("About to run line #62: tbl.Group('a').Min('id')") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").Min("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").Min("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -334,11 +334,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #66 /* {'a':3, 'id':3} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 3, "id": 3} - /* table_test_agg.order_by('id').max('a') */ + /* tbl.order_by('id').max('a') */ - suite.T().Log("About to run line #66: table_test_agg.OrderBy('id').Max('a')") + suite.T().Log("About to run line #66: tbl.OrderBy('id').Max('a')") - runAndAssert(suite.Suite, expected_, table_test_agg.OrderBy("id").Max("a"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.OrderBy("id").Max("a"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -349,11 +349,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #69 /* 3 */ var expected_ int = 3 - /* table_test_agg.map(lambda row:row['a']).max() */ + /* tbl.map(lambda row:row['a']).max() */ - suite.T().Log("About to run line #69: table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Max()") + suite.T().Log("About to run line #69: tbl.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Max()") - runAndAssert(suite.Suite, expected_, table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Max(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Max(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -364,11 +364,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #72 /* {0:{'a':0, 'id':96}, 1:{'a':1, 'id':97}, 2:{'a':2, 'id':98}, 3:{'a':3, 'id':99}} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: map[interface{}]interface{}{"a": 0, "id": 96}, 1: map[interface{}]interface{}{"a": 1, "id": 97}, 2: map[interface{}]interface{}{"a": 2, "id": 98}, 3: map[interface{}]interface{}{"a": 3, "id": 99}} - /* table_test_agg.group('a').max('id') */ + /* tbl.group('a').max('id') */ - suite.T().Log("About to run line #72: table_test_agg.Group('a').Max('id')") + suite.T().Log("About to run line #72: tbl.Group('a').Max('id')") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").Max("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").Max("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -379,11 +379,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #77 /* {"a":0, "id":0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 0, "id": 0} - /* table_test_agg.min() */ + /* tbl.min() */ - suite.T().Log("About to run line #77: table_test_agg.Min()") + suite.T().Log("About to run line #77: tbl.Min()") - runAndAssert(suite.Suite, expected_, table_test_agg.Min(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Min(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -394,11 +394,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #79 /* {0:{"a":0, "id":0}, 1:{"a":1, "id":1}, 2:{"a":2, "id":2}, 3:{"a":3, "id":3}} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: map[interface{}]interface{}{"a": 0, "id": 0}, 1: map[interface{}]interface{}{"a": 1, "id": 1}, 2: map[interface{}]interface{}{"a": 2, "id": 2}, 3: map[interface{}]interface{}{"a": 3, "id": 3}} - /* table_test_agg.group('a').min() */ + /* tbl.group('a').min() */ - suite.T().Log("About to run line #79: table_test_agg.Group('a').Min()") + suite.T().Log("About to run line #79: tbl.Group('a').Min()") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").Min(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").Min(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -409,11 +409,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #83 /* {"a":3, "id":99} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 3, "id": 99} - /* table_test_agg.max() */ + /* tbl.max() */ - suite.T().Log("About to run line #83: table_test_agg.Max()") + suite.T().Log("About to run line #83: tbl.Max()") - runAndAssert(suite.Suite, expected_, table_test_agg.Max(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Max(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -424,11 +424,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #85 /* {0:{'a':0, 'id':96}, 1:{'a':1, 'id':97}, 2:{'a':2, 'id':98}, 3:{'a':3, 'id':99}} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: map[interface{}]interface{}{"a": 0, "id": 96}, 1: map[interface{}]interface{}{"a": 1, "id": 97}, 2: map[interface{}]interface{}{"a": 2, "id": 98}, 3: map[interface{}]interface{}{"a": 3, "id": 99}} - /* table_test_agg.group('a').max() */ + /* tbl.group('a').max() */ - suite.T().Log("About to run line #85: table_test_agg.Group('a').Max()") + suite.T().Log("About to run line #85: tbl.Group('a').Max()") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").Max(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").Max(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -439,11 +439,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #92 /* 150 */ var expected_ int = 150 - /* table_test_agg.sum(lambda row:row['a']) */ + /* tbl.sum(lambda row:row['a']) */ - suite.T().Log("About to run line #92: table_test_agg.Sum(func(row r.Term) interface{} { return row.AtIndex('a')})") + suite.T().Log("About to run line #92: tbl.Sum(func(row r.Term) interface{} { return row.AtIndex('a')})") - runAndAssert(suite.Suite, expected_, table_test_agg.Sum(func(row r.Term) interface{} { return row.AtIndex("a") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Sum(func(row r.Term) interface{} { return row.AtIndex("a") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -454,11 +454,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #93 /* 150 */ var expected_ int = 150 - /* table_test_agg.sum(r.row['a']) */ + /* tbl.sum(r.row['a']) */ - suite.T().Log("About to run line #93: table_test_agg.Sum(r.Row.AtIndex('a'))") + suite.T().Log("About to run line #93: tbl.Sum(r.Row.AtIndex('a'))") - runAndAssert(suite.Suite, expected_, table_test_agg.Sum(r.Row.AtIndex("a")), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Sum(r.Row.AtIndex("a")), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -469,11 +469,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #99 /* 150 */ var expected_ int = 150 - /* table_test_agg.map(lambda row:row['a']).sum() */ + /* tbl.map(lambda row:row['a']).sum() */ - suite.T().Log("About to run line #99: table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Sum()") + suite.T().Log("About to run line #99: tbl.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Sum()") - runAndAssert(suite.Suite, expected_, table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Sum(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Sum(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -484,11 +484,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #103 /* {0:1200, 1:1225, 2:1250, 3:1275} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: 1200, 1: 1225, 2: 1250, 3: 1275} - /* table_test_agg.group(lambda row:row['a']).sum(lambda row:row['id']) */ + /* tbl.group(lambda row:row['a']).sum(lambda row:row['id']) */ - suite.T().Log("About to run line #103: table_test_agg.Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Sum(func(row r.Term) interface{} { return row.AtIndex('id')})") + suite.T().Log("About to run line #103: tbl.Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Sum(func(row r.Term) interface{} { return row.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_agg.Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Sum(func(row r.Term) interface{} { return row.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Sum(func(row r.Term) interface{} { return row.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -499,11 +499,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #111 /* 1.5 */ var expected_ float64 = 1.5 - /* table_test_agg.avg(lambda row:row['a']) */ + /* tbl.avg(lambda row:row['a']) */ - suite.T().Log("About to run line #111: table_test_agg.Avg(func(row r.Term) interface{} { return row.AtIndex('a')})") + suite.T().Log("About to run line #111: tbl.Avg(func(row r.Term) interface{} { return row.AtIndex('a')})") - runAndAssert(suite.Suite, expected_, table_test_agg.Avg(func(row r.Term) interface{} { return row.AtIndex("a") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Avg(func(row r.Term) interface{} { return row.AtIndex("a") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -514,11 +514,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #112 /* 1.5 */ var expected_ float64 = 1.5 - /* table_test_agg.avg(r.row['a']) */ + /* tbl.avg(r.row['a']) */ - suite.T().Log("About to run line #112: table_test_agg.Avg(r.Row.AtIndex('a'))") + suite.T().Log("About to run line #112: tbl.Avg(r.Row.AtIndex('a'))") - runAndAssert(suite.Suite, expected_, table_test_agg.Avg(r.Row.AtIndex("a")), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Avg(r.Row.AtIndex("a")), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -529,11 +529,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #118 /* 1.5 */ var expected_ float64 = 1.5 - /* table_test_agg.map(lambda row:row['a']).avg() */ + /* tbl.map(lambda row:row['a']).avg() */ - suite.T().Log("About to run line #118: table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Avg()") + suite.T().Log("About to run line #118: tbl.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Avg()") - runAndAssert(suite.Suite, expected_, table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Avg(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Avg(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -544,11 +544,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #122 /* {0:48, 1:49, 2:50, 3:51} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: 48, 1: 49, 2: 50, 3: 51} - /* table_test_agg.group(lambda row:row['a']).avg(lambda row:row['id']) */ + /* tbl.group(lambda row:row['a']).avg(lambda row:row['id']) */ - suite.T().Log("About to run line #122: table_test_agg.Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Avg(func(row r.Term) interface{} { return row.AtIndex('id')})") + suite.T().Log("About to run line #122: tbl.Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Avg(func(row r.Term) interface{} { return row.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_agg.Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Avg(func(row r.Term) interface{} { return row.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Avg(func(row r.Term) interface{} { return row.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -559,11 +559,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #129 /* {'a':0, 'id':96} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 0, "id": 96} - /* table_test_agg.order_by(r.desc('id')).min(lambda row:row['a']) */ + /* tbl.order_by(r.desc('id')).min(lambda row:row['a']) */ - suite.T().Log("About to run line #129: table_test_agg.OrderBy(r.Desc('id')).Min(func(row r.Term) interface{} { return row.AtIndex('a')})") + suite.T().Log("About to run line #129: tbl.OrderBy(r.Desc('id')).Min(func(row r.Term) interface{} { return row.AtIndex('a')})") - runAndAssert(suite.Suite, expected_, table_test_agg.OrderBy(r.Desc("id")).Min(func(row r.Term) interface{} { return row.AtIndex("a") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.OrderBy(r.Desc("id")).Min(func(row r.Term) interface{} { return row.AtIndex("a") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -574,11 +574,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #130 /* {'a':0, 'id':96} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 0, "id": 96} - /* table_test_agg.order_by(r.desc('id')).min(r.row['a']) */ + /* tbl.order_by(r.desc('id')).min(r.row['a']) */ - suite.T().Log("About to run line #130: table_test_agg.OrderBy(r.Desc('id')).Min(r.Row.AtIndex('a'))") + suite.T().Log("About to run line #130: tbl.OrderBy(r.Desc('id')).Min(r.Row.AtIndex('a'))") - runAndAssert(suite.Suite, expected_, table_test_agg.OrderBy(r.Desc("id")).Min(r.Row.AtIndex("a")), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.OrderBy(r.Desc("id")).Min(r.Row.AtIndex("a")), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -589,11 +589,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #138 /* 0 */ var expected_ int = 0 - /* table_test_agg.order_by(r.desc('id')).min(lambda row:row['a'])['a'] */ + /* tbl.order_by(r.desc('id')).min(lambda row:row['a'])['a'] */ - suite.T().Log("About to run line #138: table_test_agg.OrderBy(r.Desc('id')).Min(func(row r.Term) interface{} { return row.AtIndex('a')}).AtIndex('a')") + suite.T().Log("About to run line #138: tbl.OrderBy(r.Desc('id')).Min(func(row r.Term) interface{} { return row.AtIndex('a')}).AtIndex('a')") - runAndAssert(suite.Suite, expected_, table_test_agg.OrderBy(r.Desc("id")).Min(func(row r.Term) interface{} { return row.AtIndex("a") }).AtIndex("a"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.OrderBy(r.Desc("id")).Min(func(row r.Term) interface{} { return row.AtIndex("a") }).AtIndex("a"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -604,11 +604,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #139 /* 0 */ var expected_ int = 0 - /* table_test_agg.order_by(r.desc('id')).min(r.row['a'])['a'] */ + /* tbl.order_by(r.desc('id')).min(r.row['a'])['a'] */ - suite.T().Log("About to run line #139: table_test_agg.OrderBy(r.Desc('id')).Min(r.Row.AtIndex('a')).AtIndex('a')") + suite.T().Log("About to run line #139: tbl.OrderBy(r.Desc('id')).Min(r.Row.AtIndex('a')).AtIndex('a')") - runAndAssert(suite.Suite, expected_, table_test_agg.OrderBy(r.Desc("id")).Min(r.Row.AtIndex("a")).AtIndex("a"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.OrderBy(r.Desc("id")).Min(r.Row.AtIndex("a")).AtIndex("a"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -619,11 +619,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #145 /* 0 */ var expected_ int = 0 - /* table_test_agg.map(lambda row:row['a']).min() */ + /* tbl.map(lambda row:row['a']).min() */ - suite.T().Log("About to run line #145: table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Min()") + suite.T().Log("About to run line #145: tbl.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Min()") - runAndAssert(suite.Suite, expected_, table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Min(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Min(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -634,11 +634,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #149 /* {0:0, 1:1, 2:2, 3:3} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: 0, 1: 1, 2: 2, 3: 3} - /* table_test_agg.group(lambda row:row['a']).min(lambda row:row['id'])['id'] */ + /* tbl.group(lambda row:row['a']).min(lambda row:row['id'])['id'] */ - suite.T().Log("About to run line #149: table_test_agg.Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Min(func(row r.Term) interface{} { return row.AtIndex('id')}).AtIndex('id')") + suite.T().Log("About to run line #149: tbl.Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Min(func(row r.Term) interface{} { return row.AtIndex('id')}).AtIndex('id')") - runAndAssert(suite.Suite, expected_, table_test_agg.Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Min(func(row r.Term) interface{} { return row.AtIndex("id") }).AtIndex("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Min(func(row r.Term) interface{} { return row.AtIndex("id") }).AtIndex("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -649,11 +649,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #157 /* 3 */ var expected_ int = 3 - /* table_test_agg.max(lambda row:row['a'])['a'] */ + /* tbl.max(lambda row:row['a'])['a'] */ - suite.T().Log("About to run line #157: table_test_agg.Max(func(row r.Term) interface{} { return row.AtIndex('a')}).AtIndex('a')") + suite.T().Log("About to run line #157: tbl.Max(func(row r.Term) interface{} { return row.AtIndex('a')}).AtIndex('a')") - runAndAssert(suite.Suite, expected_, table_test_agg.Max(func(row r.Term) interface{} { return row.AtIndex("a") }).AtIndex("a"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Max(func(row r.Term) interface{} { return row.AtIndex("a") }).AtIndex("a"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -664,11 +664,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #158 /* 3 */ var expected_ int = 3 - /* table_test_agg.max(r.row['a'])['a'] */ + /* tbl.max(r.row['a'])['a'] */ - suite.T().Log("About to run line #158: table_test_agg.Max(r.Row.AtIndex('a')).AtIndex('a')") + suite.T().Log("About to run line #158: tbl.Max(r.Row.AtIndex('a')).AtIndex('a')") - runAndAssert(suite.Suite, expected_, table_test_agg.Max(r.Row.AtIndex("a")).AtIndex("a"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Max(r.Row.AtIndex("a")).AtIndex("a"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -679,11 +679,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #164 /* 3 */ var expected_ int = 3 - /* table_test_agg.map(lambda row:row['a']).max() */ + /* tbl.map(lambda row:row['a']).max() */ - suite.T().Log("About to run line #164: table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Max()") + suite.T().Log("About to run line #164: tbl.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Max()") - runAndAssert(suite.Suite, expected_, table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Max(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Max(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -694,11 +694,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #168 /* {0:96, 1:97, 2:98, 3:99} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: 96, 1: 97, 2: 98, 3: 99} - /* table_test_agg.group(lambda row:row['a']).max(lambda row:row['id'])['id'] */ + /* tbl.group(lambda row:row['a']).max(lambda row:row['id'])['id'] */ - suite.T().Log("About to run line #168: table_test_agg.Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Max(func(row r.Term) interface{} { return row.AtIndex('id')}).AtIndex('id')") + suite.T().Log("About to run line #168: tbl.Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Max(func(row r.Term) interface{} { return row.AtIndex('id')}).AtIndex('id')") - runAndAssert(suite.Suite, expected_, table_test_agg.Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Max(func(row r.Term) interface{} { return row.AtIndex("id") }).AtIndex("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Max(func(row r.Term) interface{} { return row.AtIndex("id") }).AtIndex("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -709,11 +709,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #175 /* {0:1200, 1:1225, 2:1250, 3:1275} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: 1200, 1: 1225, 2: 1250, 3: 1275} - /* table_test_agg.group(lambda row:row['a']).map(lambda row:row['id']).reduce(lambda a,b:a+b) */ + /* tbl.group(lambda row:row['a']).map(lambda row:row['id']).reduce(lambda a,b:a+b) */ - suite.T().Log("About to run line #175: table_test_agg.Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Map(func(row r.Term) interface{} { return row.AtIndex('id')}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") + suite.T().Log("About to run line #175: tbl.Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Map(func(row r.Term) interface{} { return row.AtIndex('id')}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") - runAndAssert(suite.Suite, expected_, table_test_agg.Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Map(func(row r.Term) interface{} { return row.AtIndex("id") }).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Map(func(row r.Term) interface{} { return row.AtIndex("id") }).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -724,11 +724,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #185 /* {'$reql_type$':'GROUPED_DATA', 'data':[[0, 1200], [1, 1225], [2, 1250], [3, 1275]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{0, 1200}, []interface{}{1, 1225}, []interface{}{2, 1250}, []interface{}{3, 1275}}} - /* table_test_agg.group(lambda row:row['a']).map(lambda row:row['id']).reduce(lambda a,b:a+b) */ + /* tbl.group(lambda row:row['a']).map(lambda row:row['id']).reduce(lambda a,b:a+b) */ - suite.T().Log("About to run line #185: table_test_agg.Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Map(func(row r.Term) interface{} { return row.AtIndex('id')}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") + suite.T().Log("About to run line #185: tbl.Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Map(func(row r.Term) interface{} { return row.AtIndex('id')}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") - runAndAssert(suite.Suite, expected_, table_test_agg.Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Map(func(row r.Term) interface{} { return row.AtIndex("id") }).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Map(func(row r.Term) interface{} { return row.AtIndex("id") }).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -739,11 +739,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #186 /* {'$reql_type$':'GROUPED_DATA', 'data':[[0, 1200], [1, 1225], [2, 1250], [3, 1275]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{0, 1200}, []interface{}{1, 1225}, []interface{}{2, 1250}, []interface{}{3, 1275}}} - /* table_test_agg.group(r.row['a']).map(r.row['id']).reduce(lambda a,b:a + b) */ + /* tbl.group(r.row['a']).map(r.row['id']).reduce(lambda a,b:a + b) */ - suite.T().Log("About to run line #186: table_test_agg.Group(r.Row.AtIndex('a')).Map(r.Row.AtIndex('id')).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") + suite.T().Log("About to run line #186: tbl.Group(r.Row.AtIndex('a')).Map(r.Row.AtIndex('id')).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") - runAndAssert(suite.Suite, expected_, table_test_agg.Group(r.Row.AtIndex("a")).Map(r.Row.AtIndex("id")).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group(r.Row.AtIndex("a")).Map(r.Row.AtIndex("id")).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -769,11 +769,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #198 /* "GROUPED_STREAM" */ var expected_ string = "GROUPED_STREAM" - /* table_test_agg.group('a').type_of() */ + /* tbl.group('a').type_of() */ - suite.T().Log("About to run line #198: table_test_agg.Group('a').TypeOf()") + suite.T().Log("About to run line #198: tbl.Group('a').TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -784,11 +784,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #200 /* "GROUPED_DATA" */ var expected_ string = "GROUPED_DATA" - /* table_test_agg.group('a').count().type_of() */ + /* tbl.group('a').count().type_of() */ - suite.T().Log("About to run line #200: table_test_agg.Group('a').Count().TypeOf()") + suite.T().Log("About to run line #200: tbl.Group('a').Count().TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").Count().TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").Count().TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -799,11 +799,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #202 /* "GROUPED_DATA" */ var expected_ string = "GROUPED_DATA" - /* table_test_agg.group('a').coerce_to('ARRAY').type_of() */ + /* tbl.group('a').coerce_to('ARRAY').type_of() */ - suite.T().Log("About to run line #202: table_test_agg.Group('a').CoerceTo('ARRAY').TypeOf()") + suite.T().Log("About to run line #202: tbl.Group('a').CoerceTo('ARRAY').TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").CoerceTo("ARRAY").TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").CoerceTo("ARRAY").TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -814,11 +814,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #206 /* {0:[0,4,8],1:[1,5,9],2:[2,6],3:[3,7]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: []interface{}{0, 4, 8}, 1: []interface{}{1, 5, 9}, 2: []interface{}{2, 6}, 3: []interface{}{3, 7}} - /* table_test_agg.order_by(index='id').filter(lambda row:row['id'] < 10).group('a').map(lambda row:row['id']).coerce_to('ARRAY') */ + /* tbl.order_by(index='id').filter(lambda row:row['id'] < 10).group('a').map(lambda row:row['id']).coerce_to('ARRAY') */ - suite.T().Log("About to run line #206: table_test_agg.OrderBy().OptArgs(r.OrderByOpts{Index: 'id', }).Filter(func(row r.Term) interface{} { return row.AtIndex('id').Lt(10)}).Group('a').Map(func(row r.Term) interface{} { return row.AtIndex('id')}).CoerceTo('ARRAY')") + suite.T().Log("About to run line #206: tbl.OrderBy().OptArgs(r.OrderByOpts{Index: 'id', }).Filter(func(row r.Term) interface{} { return row.AtIndex('id').Lt(10)}).Group('a').Map(func(row r.Term) interface{} { return row.AtIndex('id')}).CoerceTo('ARRAY')") - runAndAssert(suite.Suite, expected_, table_test_agg.OrderBy().OptArgs(r.OrderByOpts{Index: "id"}).Filter(func(row r.Term) interface{} { return row.AtIndex("id").Lt(10) }).Group("a").Map(func(row r.Term) interface{} { return row.AtIndex("id") }).CoerceTo("ARRAY"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.OrderBy().OptArgs(r.OrderByOpts{Index: "id"}).Filter(func(row r.Term) interface{} { return row.AtIndex("id").Lt(10) }).Group("a").Map(func(row r.Term) interface{} { return row.AtIndex("id") }).CoerceTo("ARRAY"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -829,11 +829,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #213 /* {0:9,1:9,2:4,3:4} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: 9, 1: 9, 2: 4, 3: 4} - /* table_test_agg.filter(lambda row:row['id'] < 10).group('a').count().do(lambda x:x*x) */ + /* tbl.filter(lambda row:row['id'] < 10).group('a').count().do(lambda x:x*x) */ - suite.T().Log("About to run line #213: table_test_agg.Filter(func(row r.Term) interface{} { return row.AtIndex('id').Lt(10)}).Group('a').Count().Do(func(x r.Term) interface{} { return r.Mul(x, x)})") + suite.T().Log("About to run line #213: tbl.Filter(func(row r.Term) interface{} { return row.AtIndex('id').Lt(10)}).Group('a').Count().Do(func(x r.Term) interface{} { return r.Mul(x, x)})") - runAndAssert(suite.Suite, expected_, table_test_agg.Filter(func(row r.Term) interface{} { return row.AtIndex("id").Lt(10) }).Group("a").Count().Do(func(x r.Term) interface{} { return r.Mul(x, x) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(func(row r.Term) interface{} { return row.AtIndex("id").Lt(10) }).Group("a").Count().Do(func(x r.Term) interface{} { return r.Mul(x, x) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -844,11 +844,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #223 /* {'$reql_type$':'GROUPED_DATA', 'data':[[0, 2400], [1, 2450], [2, 2500], [3, 2550]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{0, 2400}, []interface{}{1, 2450}, []interface{}{2, 2500}, []interface{}{3, 2550}}} - /* table_test_agg.union(table_test_agg).group(lambda row:row['a']).map(lambda row:row['id']).reduce(lambda a,b:a + b) */ + /* tbl.union(tbl).group(lambda row:row['a']).map(lambda row:row['id']).reduce(lambda a,b:a + b) */ - suite.T().Log("About to run line #223: table_test_agg.Union(table_test_agg).Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Map(func(row r.Term) interface{} { return row.AtIndex('id')}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") + suite.T().Log("About to run line #223: tbl.Union(tbl).Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Map(func(row r.Term) interface{} { return row.AtIndex('id')}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") - runAndAssert(suite.Suite, expected_, table_test_agg.Union(table_test_agg).Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Map(func(row r.Term) interface{} { return row.AtIndex("id") }).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Union(tbl).Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Map(func(row r.Term) interface{} { return row.AtIndex("id") }).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -859,11 +859,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #224 /* {'$reql_type$':'GROUPED_DATA', 'data':[[0, 2400], [1, 2450], [2, 2500], [3, 2550]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{0, 2400}, []interface{}{1, 2450}, []interface{}{2, 2500}, []interface{}{3, 2550}}} - /* table_test_agg.union(table_test_agg).group(r.row['a']).map(r.row['id']).reduce(lambda a,b:a + b) */ + /* tbl.union(tbl).group(r.row['a']).map(r.row['id']).reduce(lambda a,b:a + b) */ - suite.T().Log("About to run line #224: table_test_agg.Union(table_test_agg).Group(r.Row.AtIndex('a')).Map(r.Row.AtIndex('id')).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") + suite.T().Log("About to run line #224: tbl.Union(tbl).Group(r.Row.AtIndex('a')).Map(r.Row.AtIndex('id')).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") - runAndAssert(suite.Suite, expected_, table_test_agg.Union(table_test_agg).Group(r.Row.AtIndex("a")).Map(r.Row.AtIndex("id")).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Union(tbl).Group(r.Row.AtIndex("a")).Map(r.Row.AtIndex("id")).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -874,11 +874,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #235 /* {'$reql_type$':'GROUPED_DATA', 'data':[[0, 2400], [1, 2450], [2, 2500], [3, 2550]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{0, 2400}, []interface{}{1, 2450}, []interface{}{2, 2500}, []interface{}{3, 2550}}} - /* table_test_agg.coerce_to("array").union(table_test_agg).group(lambda row:row['a']).map(lambda row:row['id']).reduce(lambda a,b:a + b) */ + /* tbl.coerce_to("array").union(tbl).group(lambda row:row['a']).map(lambda row:row['id']).reduce(lambda a,b:a + b) */ - suite.T().Log("About to run line #235: table_test_agg.CoerceTo('array').Union(table_test_agg).Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Map(func(row r.Term) interface{} { return row.AtIndex('id')}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") + suite.T().Log("About to run line #235: tbl.CoerceTo('array').Union(tbl).Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Map(func(row r.Term) interface{} { return row.AtIndex('id')}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") - runAndAssert(suite.Suite, expected_, table_test_agg.CoerceTo("array").Union(table_test_agg).Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Map(func(row r.Term) interface{} { return row.AtIndex("id") }).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.CoerceTo("array").Union(tbl).Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Map(func(row r.Term) interface{} { return row.AtIndex("id") }).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -889,11 +889,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #236 /* {'$reql_type$':'GROUPED_DATA', 'data':[[0, 2400], [1, 2450], [2, 2500], [3, 2550]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{0, 2400}, []interface{}{1, 2450}, []interface{}{2, 2500}, []interface{}{3, 2550}}} - /* table_test_agg.coerce_to("array").union(table_test_agg).group(r.row['a']).map(r.row['id']).reduce(lambda a,b:a + b) */ + /* tbl.coerce_to("array").union(tbl).group(r.row['a']).map(r.row['id']).reduce(lambda a,b:a + b) */ - suite.T().Log("About to run line #236: table_test_agg.CoerceTo('array').Union(table_test_agg).Group(r.Row.AtIndex('a')).Map(r.Row.AtIndex('id')).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") + suite.T().Log("About to run line #236: tbl.CoerceTo('array').Union(tbl).Group(r.Row.AtIndex('a')).Map(r.Row.AtIndex('id')).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") - runAndAssert(suite.Suite, expected_, table_test_agg.CoerceTo("array").Union(table_test_agg).Group(r.Row.AtIndex("a")).Map(r.Row.AtIndex("id")).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.CoerceTo("array").Union(tbl).Group(r.Row.AtIndex("a")).Map(r.Row.AtIndex("id")).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -904,11 +904,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #247 /* {'$reql_type$':'GROUPED_DATA', 'data':[[0, 2400], [1, 2450], [2, 2500], [3, 2550]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{0, 2400}, []interface{}{1, 2450}, []interface{}{2, 2500}, []interface{}{3, 2550}}} - /* table_test_agg.union(table_test_agg.coerce_to("array")).group(lambda row:row['a']).map(lambda row:row['id']).reduce(lambda a,b:a + b) */ + /* tbl.union(tbl.coerce_to("array")).group(lambda row:row['a']).map(lambda row:row['id']).reduce(lambda a,b:a + b) */ - suite.T().Log("About to run line #247: table_test_agg.Union(table_test_agg.CoerceTo('array')).Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Map(func(row r.Term) interface{} { return row.AtIndex('id')}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") + suite.T().Log("About to run line #247: tbl.Union(tbl.CoerceTo('array')).Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Map(func(row r.Term) interface{} { return row.AtIndex('id')}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") - runAndAssert(suite.Suite, expected_, table_test_agg.Union(table_test_agg.CoerceTo("array")).Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Map(func(row r.Term) interface{} { return row.AtIndex("id") }).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Union(tbl.CoerceTo("array")).Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Map(func(row r.Term) interface{} { return row.AtIndex("id") }).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -919,11 +919,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #248 /* {'$reql_type$':'GROUPED_DATA', 'data':[[0, 2400], [1, 2450], [2, 2500], [3, 2550]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{0, 2400}, []interface{}{1, 2450}, []interface{}{2, 2500}, []interface{}{3, 2550}}} - /* table_test_agg.union(table_test_agg.coerce_to("array")).group(r.row['a']).map(r.row['id']).reduce(lambda a,b:a + b) */ + /* tbl.union(tbl.coerce_to("array")).group(r.row['a']).map(r.row['id']).reduce(lambda a,b:a + b) */ - suite.T().Log("About to run line #248: table_test_agg.Union(table_test_agg.CoerceTo('array')).Group(r.Row.AtIndex('a')).Map(r.Row.AtIndex('id')).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") + suite.T().Log("About to run line #248: tbl.Union(tbl.CoerceTo('array')).Group(r.Row.AtIndex('a')).Map(r.Row.AtIndex('id')).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") - runAndAssert(suite.Suite, expected_, table_test_agg.Union(table_test_agg.CoerceTo("array")).Group(r.Row.AtIndex("a")).Map(r.Row.AtIndex("id")).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Union(tbl.CoerceTo("array")).Group(r.Row.AtIndex("a")).Map(r.Row.AtIndex("id")).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -934,11 +934,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #255 /* {'$reql_type$':'GROUPED_DATA', 'data':[[0, 1200], [1, 1225], [2, 1250], [3, 1275]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{0, 1200}, []interface{}{1, 1225}, []interface{}{2, 1250}, []interface{}{3, 1275}}} - /* table_test_agg.group(lambda row:row['a']).map(lambda row:row['id']).reduce(lambda a,b:a + b) */ + /* tbl.group(lambda row:row['a']).map(lambda row:row['id']).reduce(lambda a,b:a + b) */ - suite.T().Log("About to run line #255: table_test_agg.Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Map(func(row r.Term) interface{} { return row.AtIndex('id')}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") + suite.T().Log("About to run line #255: tbl.Group(func(row r.Term) interface{} { return row.AtIndex('a')}).Map(func(row r.Term) interface{} { return row.AtIndex('id')}).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") - runAndAssert(suite.Suite, expected_, table_test_agg.Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Map(func(row r.Term) interface{} { return row.AtIndex("id") }).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group(func(row r.Term) interface{} { return row.AtIndex("a") }).Map(func(row r.Term) interface{} { return row.AtIndex("id") }).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -949,11 +949,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #256 /* {'$reql_type$':'GROUPED_DATA', 'data':[[0, 1200], [1, 1225], [2, 1250], [3, 1275]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{0, 1200}, []interface{}{1, 1225}, []interface{}{2, 1250}, []interface{}{3, 1275}}} - /* table_test_agg.group(r.row['a']).map(r.row['id']).reduce(lambda a,b:a + b) */ + /* tbl.group(r.row['a']).map(r.row['id']).reduce(lambda a,b:a + b) */ - suite.T().Log("About to run line #256: table_test_agg.Group(r.Row.AtIndex('a')).Map(r.Row.AtIndex('id')).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") + suite.T().Log("About to run line #256: tbl.Group(r.Row.AtIndex('a')).Map(r.Row.AtIndex('id')).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b)})") - runAndAssert(suite.Suite, expected_, table_test_agg.Group(r.Row.AtIndex("a")).Map(r.Row.AtIndex("id")).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group(r.Row.AtIndex("a")).Map(r.Row.AtIndex("id")).Reduce(func(a r.Term, b r.Term) interface{} { return r.Add(a, b) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -964,11 +964,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #286 /* {'$reql_type$':'GROUPED_DATA', 'data':[[0, 25], [1, 25], [2, 25], [3, 25]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{0, 25}, []interface{}{1, 25}, []interface{}{2, 25}, []interface{}{3, 25}}} - /* table_test_agg.group('a').count() */ + /* tbl.group('a').count() */ - suite.T().Log("About to run line #286: table_test_agg.Group('a').Count()") + suite.T().Log("About to run line #286: tbl.Group('a').Count()") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -979,11 +979,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #292 /* {'$reql_type$':'GROUPED_DATA', 'data':[[0, 1200], [1, 1225], [2, 1250], [3, 1275]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{0, 1200}, []interface{}{1, 1225}, []interface{}{2, 1250}, []interface{}{3, 1275}}} - /* table_test_agg.group('a').sum('id') */ + /* tbl.group('a').sum('id') */ - suite.T().Log("About to run line #292: table_test_agg.Group('a').Sum('id')") + suite.T().Log("About to run line #292: tbl.Group('a').Sum('id')") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").Sum("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").Sum("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -994,11 +994,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #298 /* {'$reql_type$':'GROUPED_DATA', 'data':[[0, 48], [1, 49], [2, 50], [3, 51]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{0, 48}, []interface{}{1, 49}, []interface{}{2, 50}, []interface{}{3, 51}}} - /* table_test_agg.group('a').avg('id') */ + /* tbl.group('a').avg('id') */ - suite.T().Log("About to run line #298: table_test_agg.Group('a').Avg('id')") + suite.T().Log("About to run line #298: tbl.Group('a').Avg('id')") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").Avg("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").Avg("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -1009,11 +1009,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #305 /* {'$reql_type$':'GROUPED_DATA', 'data':[[0, 20], [1, 20], [2, 20], [3, 20], [4, 20]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{0, 20}, []interface{}{1, 20}, []interface{}{2, 20}, []interface{}{3, 20}, []interface{}{4, 20}}} - /* table_test_agg3.group(lambda row:row['b']['c']).count() */ + /* tbl3.group(lambda row:row['b']['c']).count() */ - suite.T().Log("About to run line #305: table_test_agg3.Group(func(row r.Term) interface{} { return row.AtIndex('b').AtIndex('c')}).Count()") + suite.T().Log("About to run line #305: tbl3.Group(func(row r.Term) interface{} { return row.AtIndex('b').AtIndex('c')}).Count()") - runAndAssert(suite.Suite, expected_, table_test_agg3.Group(func(row r.Term) interface{} { return row.AtIndex("b").AtIndex("c") }).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl3.Group(func(row r.Term) interface{} { return row.AtIndex("b").AtIndex("c") }).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -1024,11 +1024,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #313 /* {'$reql_type$':'GROUPED_DATA', 'data':[[[0, 0], 9], [[0, 1], 8], [[0, 2], 8], [[1, 0], 8], [[1, 1], 9], [[1, 2], 8], [[2, 0], 8], [[2, 1], 8], [[2, 2], 9], [[3, 0], 9], [[3, 1], 8], [[3, 2], 8]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{[]interface{}{0, 0}, 9}, []interface{}{[]interface{}{0, 1}, 8}, []interface{}{[]interface{}{0, 2}, 8}, []interface{}{[]interface{}{1, 0}, 8}, []interface{}{[]interface{}{1, 1}, 9}, []interface{}{[]interface{}{1, 2}, 8}, []interface{}{[]interface{}{2, 0}, 8}, []interface{}{[]interface{}{2, 1}, 8}, []interface{}{[]interface{}{2, 2}, 9}, []interface{}{[]interface{}{3, 0}, 9}, []interface{}{[]interface{}{3, 1}, 8}, []interface{}{[]interface{}{3, 2}, 8}}} - /* table_test_agg.group('a', lambda row:row['id'].mod(3)).count() */ + /* tbl.group('a', lambda row:row['id'].mod(3)).count() */ - suite.T().Log("About to run line #313: table_test_agg.Group('a', func(row r.Term) interface{} { return row.AtIndex('id').Mod(3)}).Count()") + suite.T().Log("About to run line #313: tbl.Group('a', func(row r.Term) interface{} { return row.AtIndex('id').Mod(3)}).Count()") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a", func(row r.Term) interface{} { return row.AtIndex("id").Mod(3) }).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a", func(row r.Term) interface{} { return row.AtIndex("id").Mod(3) }).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -1039,11 +1039,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #329 /* 4 */ var expected_ int = 4 - /* table_test_agg.map(lambda row:row['a']).distinct().count() */ + /* tbl.map(lambda row:row['a']).distinct().count() */ - suite.T().Log("About to run line #329: table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Distinct().Count()") + suite.T().Log("About to run line #329: tbl.Map(func(row r.Term) interface{} { return row.AtIndex('a')}).Distinct().Count()") - runAndAssert(suite.Suite, expected_, table_test_agg.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Distinct().Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Map(func(row r.Term) interface{} { return row.AtIndex("a") }).Distinct().Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1054,11 +1054,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #334 /* "STREAM" */ var expected_ string = "STREAM" - /* table_test_agg.distinct().type_of() */ + /* tbl.distinct().type_of() */ - suite.T().Log("About to run line #334: table_test_agg.Distinct().TypeOf()") + suite.T().Log("About to run line #334: tbl.Distinct().TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_agg.Distinct().TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Distinct().TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1069,11 +1069,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #337 /* 100 */ var expected_ int = 100 - /* table_test_agg.distinct().count() */ + /* tbl.distinct().count() */ - suite.T().Log("About to run line #337: table_test_agg.Distinct().Count()") + suite.T().Log("About to run line #337: tbl.Distinct().Count()") - runAndAssert(suite.Suite, expected_, table_test_agg.Distinct().Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Distinct().Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1084,11 +1084,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #341 /* "STREAM" */ var expected_ string = "STREAM" - /* table_test_agg.distinct(index='id').type_of() */ + /* tbl.distinct(index='id').type_of() */ - suite.T().Log("About to run line #341: table_test_agg.Distinct().OptArgs(r.DistinctOpts{Index: 'id', }).TypeOf()") + suite.T().Log("About to run line #341: tbl.Distinct().OptArgs(r.DistinctOpts{Index: 'id', }).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_agg.Distinct().OptArgs(r.DistinctOpts{Index: "id"}).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Distinct().OptArgs(r.DistinctOpts{Index: "id"}).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1099,11 +1099,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #345 /* 100 */ var expected_ int = 100 - /* table_test_agg.distinct(index='id').count() */ + /* tbl.distinct(index='id').count() */ - suite.T().Log("About to run line #345: table_test_agg.Distinct().OptArgs(r.DistinctOpts{Index: 'id', }).Count()") + suite.T().Log("About to run line #345: tbl.Distinct().OptArgs(r.DistinctOpts{Index: 'id', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_agg.Distinct().OptArgs(r.DistinctOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Distinct().OptArgs(r.DistinctOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1114,11 +1114,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #348 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_agg.index_create('a') */ + /* tbl.index_create('a') */ - suite.T().Log("About to run line #348: table_test_agg.IndexCreate('a')") + suite.T().Log("About to run line #348: tbl.IndexCreate('a')") - runAndAssert(suite.Suite, expected_, table_test_agg.IndexCreate("a"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreate("a"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1129,11 +1129,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #357 /* [{'index':'a','ready':true}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"index": "a", "ready": true}} - /* table_test_agg.index_wait('a').pluck('index', 'ready') */ + /* tbl.index_wait('a').pluck('index', 'ready') */ - suite.T().Log("About to run line #357: table_test_agg.IndexWait('a').Pluck('index', 'ready')") + suite.T().Log("About to run line #357: tbl.IndexWait('a').Pluck('index', 'ready')") - runAndAssert(suite.Suite, expected_, table_test_agg.IndexWait("a").Pluck("index", "ready"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexWait("a").Pluck("index", "ready"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1144,11 +1144,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #367 /* 25 */ var expected_ int = 25 - /* table_test_agg.between(0, 1, index='a').distinct().count() */ + /* tbl.between(0, 1, index='a').distinct().count() */ - suite.T().Log("About to run line #367: table_test_agg.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'a', }).Distinct().Count()") + suite.T().Log("About to run line #367: tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'a', }).Distinct().Count()") - runAndAssert(suite.Suite, expected_, table_test_agg.Between(0, 1).OptArgs(r.BetweenOpts{Index: "a"}).Distinct().Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: "a"}).Distinct().Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1159,11 +1159,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #371 /* 25 */ var expected_ int = 25 - /* table_test_agg.between(0, 1, index='a').distinct(index='id').count() */ + /* tbl.between(0, 1, index='a').distinct(index='id').count() */ - suite.T().Log("About to run line #371: table_test_agg.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'a', }).Distinct().OptArgs(r.DistinctOpts{Index: 'id', }).Count()") + suite.T().Log("About to run line #371: tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'a', }).Distinct().OptArgs(r.DistinctOpts{Index: 'id', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_agg.Between(0, 1).OptArgs(r.BetweenOpts{Index: "a"}).Distinct().OptArgs(r.DistinctOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: "a"}).Distinct().OptArgs(r.DistinctOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1174,11 +1174,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #408 /* "STREAM" */ var expected_ string = "STREAM" - /* table_test_agg.distinct(index='a').type_of() */ + /* tbl.distinct(index='a').type_of() */ - suite.T().Log("About to run line #408: table_test_agg.Distinct().OptArgs(r.DistinctOpts{Index: 'a', }).TypeOf()") + suite.T().Log("About to run line #408: tbl.Distinct().OptArgs(r.DistinctOpts{Index: 'a', }).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_agg.Distinct().OptArgs(r.DistinctOpts{Index: "a"}).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Distinct().OptArgs(r.DistinctOpts{Index: "a"}).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1189,11 +1189,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #412 /* 4 */ var expected_ int = 4 - /* table_test_agg.distinct(index='a').count() */ + /* tbl.distinct(index='a').count() */ - suite.T().Log("About to run line #412: table_test_agg.Distinct().OptArgs(r.DistinctOpts{Index: 'a', }).Count()") + suite.T().Log("About to run line #412: tbl.Distinct().OptArgs(r.DistinctOpts{Index: 'a', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_agg.Distinct().OptArgs(r.DistinctOpts{Index: "a"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Distinct().OptArgs(r.DistinctOpts{Index: "a"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1204,11 +1204,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #415 /* err('ReqlQueryLogicError', 'Cannot group by nothing.', []) */ var expected_ Err = err("ReqlQueryLogicError", "Cannot group by nothing.") - /* table_test_agg.group() */ + /* tbl.group() */ - suite.T().Log("About to run line #415: table_test_agg.Group()") + suite.T().Log("About to run line #415: tbl.Group()") - runAndAssert(suite.Suite, expected_, table_test_agg.Group(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1219,11 +1219,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #418 /* ({'$reql_type$':'GROUPED_DATA', 'data':[[0, 1], [1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1], [9, 1], [10, 1], [11, 1], [12, 1], [13, 1], [14, 1], [15, 1], [16, 1], [17, 1], [18, 1], [19, 1], [20, 1], [21, 1], [22, 1], [23, 1], [24, 1], [25, 1], [26, 1], [27, 1], [28, 1], [29, 1], [30, 1], [31, 1], [32, 1], [33, 1], [34, 1], [35, 1], [36, 1], [37, 1], [38, 1], [39, 1], [40, 1], [41, 1], [42, 1], [43, 1], [44, 1], [45, 1], [46, 1], [47, 1], [48, 1], [49, 1], [50, 1], [51, 1], [52, 1], [53, 1], [54, 1], [55, 1], [56, 1], [57, 1], [58, 1], [59, 1], [60, 1], [61, 1], [62, 1], [63, 1], [64, 1], [65, 1], [66, 1], [67, 1], [68, 1], [69, 1], [70, 1], [71, 1], [72, 1], [73, 1], [74, 1], [75, 1], [76, 1], [77, 1], [78, 1], [79, 1], [80, 1], [81, 1], [82, 1], [83, 1], [84, 1], [85, 1], [86, 1], [87, 1], [88, 1], [89, 1], [90, 1], [91, 1], [92, 1], [93, 1], [94, 1], [95, 1], [96, 1], [97, 1], [98, 1], [99, 1]]}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{0, 1}, []interface{}{1, 1}, []interface{}{2, 1}, []interface{}{3, 1}, []interface{}{4, 1}, []interface{}{5, 1}, []interface{}{6, 1}, []interface{}{7, 1}, []interface{}{8, 1}, []interface{}{9, 1}, []interface{}{10, 1}, []interface{}{11, 1}, []interface{}{12, 1}, []interface{}{13, 1}, []interface{}{14, 1}, []interface{}{15, 1}, []interface{}{16, 1}, []interface{}{17, 1}, []interface{}{18, 1}, []interface{}{19, 1}, []interface{}{20, 1}, []interface{}{21, 1}, []interface{}{22, 1}, []interface{}{23, 1}, []interface{}{24, 1}, []interface{}{25, 1}, []interface{}{26, 1}, []interface{}{27, 1}, []interface{}{28, 1}, []interface{}{29, 1}, []interface{}{30, 1}, []interface{}{31, 1}, []interface{}{32, 1}, []interface{}{33, 1}, []interface{}{34, 1}, []interface{}{35, 1}, []interface{}{36, 1}, []interface{}{37, 1}, []interface{}{38, 1}, []interface{}{39, 1}, []interface{}{40, 1}, []interface{}{41, 1}, []interface{}{42, 1}, []interface{}{43, 1}, []interface{}{44, 1}, []interface{}{45, 1}, []interface{}{46, 1}, []interface{}{47, 1}, []interface{}{48, 1}, []interface{}{49, 1}, []interface{}{50, 1}, []interface{}{51, 1}, []interface{}{52, 1}, []interface{}{53, 1}, []interface{}{54, 1}, []interface{}{55, 1}, []interface{}{56, 1}, []interface{}{57, 1}, []interface{}{58, 1}, []interface{}{59, 1}, []interface{}{60, 1}, []interface{}{61, 1}, []interface{}{62, 1}, []interface{}{63, 1}, []interface{}{64, 1}, []interface{}{65, 1}, []interface{}{66, 1}, []interface{}{67, 1}, []interface{}{68, 1}, []interface{}{69, 1}, []interface{}{70, 1}, []interface{}{71, 1}, []interface{}{72, 1}, []interface{}{73, 1}, []interface{}{74, 1}, []interface{}{75, 1}, []interface{}{76, 1}, []interface{}{77, 1}, []interface{}{78, 1}, []interface{}{79, 1}, []interface{}{80, 1}, []interface{}{81, 1}, []interface{}{82, 1}, []interface{}{83, 1}, []interface{}{84, 1}, []interface{}{85, 1}, []interface{}{86, 1}, []interface{}{87, 1}, []interface{}{88, 1}, []interface{}{89, 1}, []interface{}{90, 1}, []interface{}{91, 1}, []interface{}{92, 1}, []interface{}{93, 1}, []interface{}{94, 1}, []interface{}{95, 1}, []interface{}{96, 1}, []interface{}{97, 1}, []interface{}{98, 1}, []interface{}{99, 1}}} - /* table_test_agg.group(index='id').count() */ + /* tbl.group(index='id').count() */ - suite.T().Log("About to run line #418: table_test_agg.Group().OptArgs(r.GroupOpts{Index: 'id', }).Count()") + suite.T().Log("About to run line #418: tbl.Group().OptArgs(r.GroupOpts{Index: 'id', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_agg.Group().OptArgs(r.GroupOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group().OptArgs(r.GroupOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -1234,11 +1234,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #425 /* {'$reql_type$':'GROUPED_DATA', 'data':[[0, 25], [1, 25], [2, 25], [3, 25]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{0, 25}, []interface{}{1, 25}, []interface{}{2, 25}, []interface{}{3, 25}}} - /* table_test_agg.group(index='a').count() */ + /* tbl.group(index='a').count() */ - suite.T().Log("About to run line #425: table_test_agg.Group().OptArgs(r.GroupOpts{Index: 'a', }).Count()") + suite.T().Log("About to run line #425: tbl.Group().OptArgs(r.GroupOpts{Index: 'a', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_agg.Group().OptArgs(r.GroupOpts{Index: "a"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group().OptArgs(r.GroupOpts{Index: "a"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -1249,11 +1249,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #432 /* {'$reql_type$':'GROUPED_DATA', 'data':[[[0, 0], 1], [[0, 4], 1], [[0, 8], 1], [[0, 12], 1], [[0, 16], 1], [[0, 20], 1], [[0, 24], 1], [[0, 28], 1], [[0, 32], 1], [[0, 36], 1], [[0, 40], 1], [[0, 44], 1], [[0, 48], 1], [[0, 52], 1], [[0, 56], 1], [[0, 60], 1], [[0, 64], 1], [[0, 68], 1], [[0, 72], 1], [[0, 76], 1], [[0, 80], 1], [[0, 84], 1], [[0, 88], 1], [[0, 92], 1], [[0, 96], 1], [[1, 1], 1], [[1, 5], 1], [[1, 9], 1], [[1, 13], 1], [[1, 17], 1], [[1, 21], 1], [[1, 25], 1], [[1, 29], 1], [[1, 33], 1], [[1, 37], 1], [[1, 41], 1], [[1, 45], 1], [[1, 49], 1], [[1, 53], 1], [[1, 57], 1], [[1, 61], 1], [[1, 65], 1], [[1, 69], 1], [[1, 73], 1], [[1, 77], 1], [[1, 81], 1], [[1, 85], 1], [[1, 89], 1], [[1, 93], 1], [[1, 97], 1], [[2, 2], 1], [[2, 6], 1], [[2, 10], 1], [[2, 14], 1], [[2, 18], 1], [[2, 22], 1], [[2, 26], 1], [[2, 30], 1], [[2, 34], 1], [[2, 38], 1], [[2, 42], 1], [[2, 46], 1], [[2, 50], 1], [[2, 54], 1], [[2, 58], 1], [[2, 62], 1], [[2, 66], 1], [[2, 70], 1], [[2, 74], 1], [[2, 78], 1], [[2, 82], 1], [[2, 86], 1], [[2, 90], 1], [[2, 94], 1], [[2, 98], 1], [[3, 3], 1], [[3, 7], 1], [[3, 11], 1], [[3, 15], 1], [[3, 19], 1], [[3, 23], 1], [[3, 27], 1], [[3, 31], 1], [[3, 35], 1], [[3, 39], 1], [[3, 43], 1], [[3, 47], 1], [[3, 51], 1], [[3, 55], 1], [[3, 59], 1], [[3, 63], 1], [[3, 67], 1], [[3, 71], 1], [[3, 75], 1], [[3, 79], 1], [[3, 83], 1], [[3, 87], 1], [[3, 91], 1], [[3, 95], 1], [[3, 99], 1]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{[]interface{}{0, 0}, 1}, []interface{}{[]interface{}{0, 4}, 1}, []interface{}{[]interface{}{0, 8}, 1}, []interface{}{[]interface{}{0, 12}, 1}, []interface{}{[]interface{}{0, 16}, 1}, []interface{}{[]interface{}{0, 20}, 1}, []interface{}{[]interface{}{0, 24}, 1}, []interface{}{[]interface{}{0, 28}, 1}, []interface{}{[]interface{}{0, 32}, 1}, []interface{}{[]interface{}{0, 36}, 1}, []interface{}{[]interface{}{0, 40}, 1}, []interface{}{[]interface{}{0, 44}, 1}, []interface{}{[]interface{}{0, 48}, 1}, []interface{}{[]interface{}{0, 52}, 1}, []interface{}{[]interface{}{0, 56}, 1}, []interface{}{[]interface{}{0, 60}, 1}, []interface{}{[]interface{}{0, 64}, 1}, []interface{}{[]interface{}{0, 68}, 1}, []interface{}{[]interface{}{0, 72}, 1}, []interface{}{[]interface{}{0, 76}, 1}, []interface{}{[]interface{}{0, 80}, 1}, []interface{}{[]interface{}{0, 84}, 1}, []interface{}{[]interface{}{0, 88}, 1}, []interface{}{[]interface{}{0, 92}, 1}, []interface{}{[]interface{}{0, 96}, 1}, []interface{}{[]interface{}{1, 1}, 1}, []interface{}{[]interface{}{1, 5}, 1}, []interface{}{[]interface{}{1, 9}, 1}, []interface{}{[]interface{}{1, 13}, 1}, []interface{}{[]interface{}{1, 17}, 1}, []interface{}{[]interface{}{1, 21}, 1}, []interface{}{[]interface{}{1, 25}, 1}, []interface{}{[]interface{}{1, 29}, 1}, []interface{}{[]interface{}{1, 33}, 1}, []interface{}{[]interface{}{1, 37}, 1}, []interface{}{[]interface{}{1, 41}, 1}, []interface{}{[]interface{}{1, 45}, 1}, []interface{}{[]interface{}{1, 49}, 1}, []interface{}{[]interface{}{1, 53}, 1}, []interface{}{[]interface{}{1, 57}, 1}, []interface{}{[]interface{}{1, 61}, 1}, []interface{}{[]interface{}{1, 65}, 1}, []interface{}{[]interface{}{1, 69}, 1}, []interface{}{[]interface{}{1, 73}, 1}, []interface{}{[]interface{}{1, 77}, 1}, []interface{}{[]interface{}{1, 81}, 1}, []interface{}{[]interface{}{1, 85}, 1}, []interface{}{[]interface{}{1, 89}, 1}, []interface{}{[]interface{}{1, 93}, 1}, []interface{}{[]interface{}{1, 97}, 1}, []interface{}{[]interface{}{2, 2}, 1}, []interface{}{[]interface{}{2, 6}, 1}, []interface{}{[]interface{}{2, 10}, 1}, []interface{}{[]interface{}{2, 14}, 1}, []interface{}{[]interface{}{2, 18}, 1}, []interface{}{[]interface{}{2, 22}, 1}, []interface{}{[]interface{}{2, 26}, 1}, []interface{}{[]interface{}{2, 30}, 1}, []interface{}{[]interface{}{2, 34}, 1}, []interface{}{[]interface{}{2, 38}, 1}, []interface{}{[]interface{}{2, 42}, 1}, []interface{}{[]interface{}{2, 46}, 1}, []interface{}{[]interface{}{2, 50}, 1}, []interface{}{[]interface{}{2, 54}, 1}, []interface{}{[]interface{}{2, 58}, 1}, []interface{}{[]interface{}{2, 62}, 1}, []interface{}{[]interface{}{2, 66}, 1}, []interface{}{[]interface{}{2, 70}, 1}, []interface{}{[]interface{}{2, 74}, 1}, []interface{}{[]interface{}{2, 78}, 1}, []interface{}{[]interface{}{2, 82}, 1}, []interface{}{[]interface{}{2, 86}, 1}, []interface{}{[]interface{}{2, 90}, 1}, []interface{}{[]interface{}{2, 94}, 1}, []interface{}{[]interface{}{2, 98}, 1}, []interface{}{[]interface{}{3, 3}, 1}, []interface{}{[]interface{}{3, 7}, 1}, []interface{}{[]interface{}{3, 11}, 1}, []interface{}{[]interface{}{3, 15}, 1}, []interface{}{[]interface{}{3, 19}, 1}, []interface{}{[]interface{}{3, 23}, 1}, []interface{}{[]interface{}{3, 27}, 1}, []interface{}{[]interface{}{3, 31}, 1}, []interface{}{[]interface{}{3, 35}, 1}, []interface{}{[]interface{}{3, 39}, 1}, []interface{}{[]interface{}{3, 43}, 1}, []interface{}{[]interface{}{3, 47}, 1}, []interface{}{[]interface{}{3, 51}, 1}, []interface{}{[]interface{}{3, 55}, 1}, []interface{}{[]interface{}{3, 59}, 1}, []interface{}{[]interface{}{3, 63}, 1}, []interface{}{[]interface{}{3, 67}, 1}, []interface{}{[]interface{}{3, 71}, 1}, []interface{}{[]interface{}{3, 75}, 1}, []interface{}{[]interface{}{3, 79}, 1}, []interface{}{[]interface{}{3, 83}, 1}, []interface{}{[]interface{}{3, 87}, 1}, []interface{}{[]interface{}{3, 91}, 1}, []interface{}{[]interface{}{3, 95}, 1}, []interface{}{[]interface{}{3, 99}, 1}}} - /* table_test_agg.group('a', index='id').count() */ + /* tbl.group('a', index='id').count() */ - suite.T().Log("About to run line #432: table_test_agg.Group('a').OptArgs(r.GroupOpts{Index: 'id', }).Count()") + suite.T().Log("About to run line #432: tbl.Group('a').OptArgs(r.GroupOpts{Index: 'id', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").OptArgs(r.GroupOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").OptArgs(r.GroupOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -1264,11 +1264,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #439 /* {'$reql_type$':'GROUPED_DATA', 'data':[[[0, 0], 25], [[1, 1], 25], [[2, 2], 25], [[3, 3], 25]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{[]interface{}{0, 0}, 25}, []interface{}{[]interface{}{1, 1}, 25}, []interface{}{[]interface{}{2, 2}, 25}, []interface{}{[]interface{}{3, 3}, 25}}} - /* table_test_agg.group('a', index='a').count() */ + /* tbl.group('a', index='a').count() */ - suite.T().Log("About to run line #439: table_test_agg.Group('a').OptArgs(r.GroupOpts{Index: 'a', }).Count()") + suite.T().Log("About to run line #439: tbl.Group('a').OptArgs(r.GroupOpts{Index: 'a', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").OptArgs(r.GroupOpts{Index: "a"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").OptArgs(r.GroupOpts{Index: "a"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "raw", }) @@ -1279,11 +1279,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #447 /* {'$reql_type$':'GROUPED_DATA', 'data':[[[0, "f", null, [0]], 25], [[0, "f", null, null], 25], [[0, "f", null, 0], 25], [[0, "f", null, {}], 25], [[1, "f", null, [0]], 25], [[1, "f", null, null], 25], [[1, "f", null, 0], 25], [[1, "f", null, {}], 25], [[2, "f", null, [0]], 25], [[2, "f", null, null], 25], [[2, "f", null, 0], 25], [[2, "f", null, {}], 25], [[3, "f", null, [0]], 25], [[3, "f", null, null], 25], [[3, "f", null, 0], 25], [[3, "f", null, {}], 25]]} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "GROUPED_DATA", "data": []interface{}{[]interface{}{[]interface{}{0, "f", nil, []interface{}{0}}, 25}, []interface{}{[]interface{}{0, "f", nil, nil}, 25}, []interface{}{[]interface{}{0, "f", nil, 0}, 25}, []interface{}{[]interface{}{0, "f", nil, map[interface{}]interface{}{}}, 25}, []interface{}{[]interface{}{1, "f", nil, []interface{}{0}}, 25}, []interface{}{[]interface{}{1, "f", nil, nil}, 25}, []interface{}{[]interface{}{1, "f", nil, 0}, 25}, []interface{}{[]interface{}{1, "f", nil, map[interface{}]interface{}{}}, 25}, []interface{}{[]interface{}{2, "f", nil, []interface{}{0}}, 25}, []interface{}{[]interface{}{2, "f", nil, nil}, 25}, []interface{}{[]interface{}{2, "f", nil, 0}, 25}, []interface{}{[]interface{}{2, "f", nil, map[interface{}]interface{}{}}, 25}, []interface{}{[]interface{}{3, "f", nil, []interface{}{0}}, 25}, []interface{}{[]interface{}{3, "f", nil, nil}, 25}, []interface{}{[]interface{}{3, "f", nil, 0}, 25}, []interface{}{[]interface{}{3, "f", nil, map[interface{}]interface{}{}}, 25}}} - /* table_test_agg.group('a', lambda row:'f', lambda row:[], lambda row:[{}, [0], null, 0], multi=True).count() */ + /* tbl.group('a', lambda row:'f', lambda row:[], lambda row:[{}, [0], null, 0], multi=True).count() */ - suite.T().Log("About to run line #447: table_test_agg.Group('a', func(row r.Term) interface{} { return 'f'}, func(row r.Term) interface{} { return []interface{}{}}, func(row r.Term) interface{} { return []interface{}{map[interface{}]interface{}{}, []interface{}{0}, nil, 0}}).OptArgs(r.GroupOpts{Multi: true, }).Count()") + suite.T().Log("About to run line #447: tbl.Group('a', func(row r.Term) interface{} { return 'f'}, func(row r.Term) interface{} { return []interface{}{}}, func(row r.Term) interface{} { return []interface{}{map[interface{}]interface{}{}, []interface{}{0}, nil, 0}}).OptArgs(r.GroupOpts{Multi: true, }).Count()") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a", func(row r.Term) interface{} { return "f" }, func(row r.Term) interface{} { return []interface{}{} }, func(row r.Term) interface{} { + runAndAssert(suite.Suite, expected_, tbl.Group("a", func(row r.Term) interface{} { return "f" }, func(row r.Term) interface{} { return []interface{}{} }, func(row r.Term) interface{} { return []interface{}{map[interface{}]interface{}{}, []interface{}{0}, nil, 0} }).OptArgs(r.GroupOpts{Multi: true}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", @@ -1296,11 +1296,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #453 /* [{'group':0, 'reduction':25}, {'group':1, 'reduction':25}, {'group':2, 'reduction':25}, {'group':3, 'reduction':25}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"group": 0, "reduction": 25}, map[interface{}]interface{}{"group": 1, "reduction": 25}, map[interface{}]interface{}{"group": 2, "reduction": 25}, map[interface{}]interface{}{"group": 3, "reduction": 25}} - /* table_test_agg.group('a').count().ungroup() */ + /* tbl.group('a').count().ungroup() */ - suite.T().Log("About to run line #453: table_test_agg.Group('a').Count().Ungroup()") + suite.T().Log("About to run line #453: tbl.Group('a').Count().Ungroup()") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").Count().Ungroup(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").Count().Ungroup(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1311,11 +1311,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #456 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_agg.group('a').ungroup()['group'] */ + /* tbl.group('a').ungroup()['group'] */ - suite.T().Log("About to run line #456: table_test_agg.Group('a').Ungroup().AtIndex('group')") + suite.T().Log("About to run line #456: tbl.Group('a').Ungroup().AtIndex('group')") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").Ungroup().AtIndex("group"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").Ungroup().AtIndex("group"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1326,11 +1326,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #460 /* [{'group':[0,0],'reduction':24},{'group':[1,1],'reduction':28},{'group':[2,2],'reduction':32},{'group':[3,3],'reduction':36}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"group": []interface{}{0, 0}, "reduction": 24}, map[interface{}]interface{}{"group": []interface{}{1, 1}, "reduction": 28}, map[interface{}]interface{}{"group": []interface{}{2, 2}, "reduction": 32}, map[interface{}]interface{}{"group": []interface{}{3, 3}, "reduction": 36}} - /* table_test_agg.order_by(index='id').limit(16).group('a','a').map(r.row['id']).sum().ungroup() */ + /* tbl.order_by(index='id').limit(16).group('a','a').map(r.row['id']).sum().ungroup() */ - suite.T().Log("About to run line #460: table_test_agg.OrderBy().OptArgs(r.OrderByOpts{Index: 'id', }).Limit(16).Group('a', 'a').Map(r.Row.AtIndex('id')).Sum().Ungroup()") + suite.T().Log("About to run line #460: tbl.OrderBy().OptArgs(r.OrderByOpts{Index: 'id', }).Limit(16).Group('a', 'a').Map(r.Row.AtIndex('id')).Sum().Ungroup()") - runAndAssert(suite.Suite, expected_, table_test_agg.OrderBy().OptArgs(r.OrderByOpts{Index: "id"}).Limit(16).Group("a", "a").Map(r.Row.AtIndex("id")).Sum().Ungroup(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.OrderBy().OptArgs(r.OrderByOpts{Index: "id"}).Limit(16).Group("a", "a").Map(r.Row.AtIndex("id")).Sum().Ungroup(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1341,11 +1341,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #465 /* [{'group':[0,null],'reduction':25},{'group':[1,null],'reduction':25},{'group':[2,null],'reduction':25},{'group':[3,null],'reduction':25}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"group": []interface{}{0, nil}, "reduction": 25}, map[interface{}]interface{}{"group": []interface{}{1, nil}, "reduction": 25}, map[interface{}]interface{}{"group": []interface{}{2, nil}, "reduction": 25}, map[interface{}]interface{}{"group": []interface{}{3, nil}, "reduction": 25}} - /* table_test_agg.group('a', null).count().ungroup() */ + /* tbl.group('a', null).count().ungroup() */ - suite.T().Log("About to run line #465: table_test_agg.Group('a', nil).Count().Ungroup()") + suite.T().Log("About to run line #465: tbl.Group('a', nil).Count().Ungroup()") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a", nil).Count().Ungroup(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a", nil).Count().Ungroup(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1356,11 +1356,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #468 /* [{'group':[0,1],'reduction':25},{'group':[0,'two'],'reduction':25},{'group':[1,1],'reduction':25},{'group':[1,'two'],'reduction':25},{'group':[2,1],'reduction':25},{'group':[2,'two'],'reduction':25},{'group':[3,1],'reduction':25},{'group':[3,'two'],'reduction':25}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"group": []interface{}{0, 1}, "reduction": 25}, map[interface{}]interface{}{"group": []interface{}{0, "two"}, "reduction": 25}, map[interface{}]interface{}{"group": []interface{}{1, 1}, "reduction": 25}, map[interface{}]interface{}{"group": []interface{}{1, "two"}, "reduction": 25}, map[interface{}]interface{}{"group": []interface{}{2, 1}, "reduction": 25}, map[interface{}]interface{}{"group": []interface{}{2, "two"}, "reduction": 25}, map[interface{}]interface{}{"group": []interface{}{3, 1}, "reduction": 25}, map[interface{}]interface{}{"group": []interface{}{3, "two"}, "reduction": 25}} - /* table_test_agg.group('a', lambda row:[1,'two'], multi=True).count().ungroup() */ + /* tbl.group('a', lambda row:[1,'two'], multi=True).count().ungroup() */ - suite.T().Log("About to run line #468: table_test_agg.Group('a', func(row r.Term) interface{} { return []interface{}{1, 'two'}}).OptArgs(r.GroupOpts{Multi: true, }).Count().Ungroup()") + suite.T().Log("About to run line #468: tbl.Group('a', func(row r.Term) interface{} { return []interface{}{1, 'two'}}).OptArgs(r.GroupOpts{Multi: true, }).Count().Ungroup()") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a", func(row r.Term) interface{} { return []interface{}{1, "two"} }).OptArgs(r.GroupOpts{Multi: true}).Count().Ungroup(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a", func(row r.Term) interface{} { return []interface{}{1, "two"} }).OptArgs(r.GroupOpts{Multi: true}).Count().Ungroup(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1371,11 +1371,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #474 /* 100 */ var expected_ int = 100 - /* table_test_agg.count() */ + /* tbl.count() */ - suite.T().Log("About to run line #474: table_test_agg.Count()") + suite.T().Log("About to run line #474: tbl.Count()") - runAndAssert(suite.Suite, expected_, table_test_agg.Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1386,42 +1386,26 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #478 /* partial({'errors':0, 'replaced':67}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "replaced": 67}) - /* table_test_agg.filter(r.row['a'].ne(1).and_(r.row['id'].gt(10))).update({'b':r.row['a'] * 10}) */ + /* tbl.filter(r.row['a'].ne(1).and_(r.row['id'].gt(10))).update({'b':r.row['a'] * 10}) */ - suite.T().Log("About to run line #478: table_test_agg.Filter(r.Row.AtIndex('a').Ne(1).And(r.Row.AtIndex('id').Gt(10))).Update(map[interface{}]interface{}{'b': r.Row.AtIndex('a').Mul(10), })") + suite.T().Log("About to run line #478: tbl.Filter(r.Row.AtIndex('a').Ne(1).And(r.Row.AtIndex('id').Gt(10))).Update(map[interface{}]interface{}{'b': r.Row.AtIndex('a').Mul(10), })") - runAndAssert(suite.Suite, expected_, table_test_agg.Filter(r.Row.AtIndex("a").Ne(1).And(r.Row.AtIndex("id").Gt(10))).Update(map[interface{}]interface{}{"b": r.Row.AtIndex("a").Mul(10)}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(r.Row.AtIndex("a").Ne(1).And(r.Row.AtIndex("id").Gt(10))).Update(map[interface{}]interface{}{"b": r.Row.AtIndex("a").Mul(10)}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) suite.T().Log("Finished running line #478") } - { - // aggregation.yaml line #482 - /* {null:33, 0:22, 20:22, 30:23} */ - //var expected_ map[interface{}]interface{} = map[interface{}]interface{}{nil: 33, 0: 22, 20: 22, 30: 23} - var expected_ = compare.UnorderedMatch([]map[string]interface{}{{"group": nil, "reduction": 33}, {"group": 0, "reduction": 22}, {"group": 20, "reduction": 22}, {"group": 30, "reduction": 23}}) - /* table_test_agg.group('b').count() */ - - suite.T().Log("About to run line #482: table_test_agg.Group('b').Count()") - - runAndAssert(suite.Suite, expected_, table_test_agg.Group("b").Count(), suite.session, r.RunOpts{ - GeometryFormat: "raw", - GroupFormat: "native", - }) - suite.T().Log("Finished running line #482") - } - { // aggregation.yaml line #487 /* {0:0, 2:440, 3:690} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: 0, 2: 440, 3: 690} - /* table_test_agg.group('a').sum('b') */ + /* tbl.group('a').sum('b') */ - suite.T().Log("About to run line #487: table_test_agg.Group('a').Sum('b')") + suite.T().Log("About to run line #487: tbl.Group('a').Sum('b')") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").Sum("b"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").Sum("b"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1432,11 +1416,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #492 /* {0:0, 2:20, 3:30} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: 0, 2: 20, 3: 30} - /* table_test_agg.group('a').avg('b') */ + /* tbl.group('a').avg('b') */ - suite.T().Log("About to run line #492: table_test_agg.Group('a').Avg('b')") + suite.T().Log("About to run line #492: tbl.Group('a').Avg('b')") - runAndAssert(suite.Suite, expected_, table_test_agg.Group("a").Avg("b"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Group("a").Avg("b"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1447,11 +1431,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #497 /* {0:{"a":0, "b":0, "id":12}, 2:{"a":2, "b":20, "id":14}, 3:{"a":3, "b":30, "id":11}} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: map[interface{}]interface{}{"a": 0, "b": 0, "id": 12}, 2: map[interface{}]interface{}{"a": 2, "b": 20, "id": 14}, 3: map[interface{}]interface{}{"a": 3, "b": 30, "id": 11}} - /* table_test_agg.order_by('id').group('a').min('b') */ + /* tbl.order_by('id').group('a').min('b') */ - suite.T().Log("About to run line #497: table_test_agg.OrderBy('id').Group('a').Min('b')") + suite.T().Log("About to run line #497: tbl.OrderBy('id').Group('a').Min('b')") - runAndAssert(suite.Suite, expected_, table_test_agg.OrderBy("id").Group("a").Min("b"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.OrderBy("id").Group("a").Min("b"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1462,11 +1446,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #502 /* {0:{"a":0, "id":0}, 1:{"a":1, "id":1}, 2:{"a":2, "id":2}, 3:{"a":3, "id":3}} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: map[interface{}]interface{}{"a": 0, "id": 0}, 1: map[interface{}]interface{}{"a": 1, "id": 1}, 2: map[interface{}]interface{}{"a": 2, "id": 2}, 3: map[interface{}]interface{}{"a": 3, "id": 3}} - /* table_test_agg.order_by('id').group('a').min('id') */ + /* tbl.order_by('id').group('a').min('id') */ - suite.T().Log("About to run line #502: table_test_agg.OrderBy('id').Group('a').Min('id')") + suite.T().Log("About to run line #502: tbl.OrderBy('id').Group('a').Min('id')") - runAndAssert(suite.Suite, expected_, table_test_agg.OrderBy("id").Group("a").Min("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.OrderBy("id").Group("a").Min("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1477,11 +1461,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #507 /* {0:{"a":0, "b":0, "id":12}, 2:{"a":2, "b":20, "id":14}, 3:{"a":3, "b":30, "id":11}} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{0: map[interface{}]interface{}{"a": 0, "b": 0, "id": 12}, 2: map[interface{}]interface{}{"a": 2, "b": 20, "id": 14}, 3: map[interface{}]interface{}{"a": 3, "b": 30, "id": 11}} - /* table_test_agg.order_by('id').group('a').max('b') */ + /* tbl.order_by('id').group('a').max('b') */ - suite.T().Log("About to run line #507: table_test_agg.OrderBy('id').Group('a').Max('b')") + suite.T().Log("About to run line #507: tbl.OrderBy('id').Group('a').Max('b')") - runAndAssert(suite.Suite, expected_, table_test_agg.OrderBy("id").Group("a").Max("b"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.OrderBy("id").Group("a").Max("b"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1492,11 +1476,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #512 /* {'a':0,'id':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 0, "id": 0} - /* table_test_agg.min() */ + /* tbl.min() */ - suite.T().Log("About to run line #512: table_test_agg.Min()") + suite.T().Log("About to run line #512: tbl.Min()") - runAndAssert(suite.Suite, expected_, table_test_agg.Min(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Min(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1507,11 +1491,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #514 /* {'a':0,'id':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 0, "id": 0} - /* table_test_agg.min(index='id') */ + /* tbl.min(index='id') */ - suite.T().Log("About to run line #514: table_test_agg.Min().OptArgs(r.MinOpts{Index: 'id', })") + suite.T().Log("About to run line #514: tbl.Min().OptArgs(r.MinOpts{Index: 'id', })") - runAndAssert(suite.Suite, expected_, table_test_agg.Min().OptArgs(r.MinOpts{Index: "id"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Min().OptArgs(r.MinOpts{Index: "id"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1522,11 +1506,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #518 /* {'a':0,'id':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 0, "id": 0} - /* table_test_agg.min(index='a') */ + /* tbl.min(index='a') */ - suite.T().Log("About to run line #518: table_test_agg.Min().OptArgs(r.MinOpts{Index: 'a', })") + suite.T().Log("About to run line #518: tbl.Min().OptArgs(r.MinOpts{Index: 'a', })") - runAndAssert(suite.Suite, expected_, table_test_agg.Min().OptArgs(r.MinOpts{Index: "a"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Min().OptArgs(r.MinOpts{Index: "a"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1537,11 +1521,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #523 /* {'a':3,'id':99} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 3, "id": 99} - /* table_test_agg.max().without('b') */ + /* tbl.max().without('b') */ - suite.T().Log("About to run line #523: table_test_agg.Max().Without('b')") + suite.T().Log("About to run line #523: tbl.Max().Without('b')") - runAndAssert(suite.Suite, expected_, table_test_agg.Max().Without("b"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Max().Without("b"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1552,11 +1536,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #525 /* {'a':3,'id':99} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 3, "id": 99} - /* table_test_agg.max(index='id').without('b') */ + /* tbl.max(index='id').without('b') */ - suite.T().Log("About to run line #525: table_test_agg.Max().OptArgs(r.MaxOpts{Index: 'id', }).Without('b')") + suite.T().Log("About to run line #525: tbl.Max().OptArgs(r.MaxOpts{Index: 'id', }).Without('b')") - runAndAssert(suite.Suite, expected_, table_test_agg.Max().OptArgs(r.MaxOpts{Index: "id"}).Without("b"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Max().OptArgs(r.MaxOpts{Index: "id"}).Without("b"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1567,11 +1551,11 @@ func (suite *AggregationSuite) TestCases() { // aggregation.yaml line #529 /* {'a':3,'id':99} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 3, "id": 99} - /* table_test_agg.max(index='a').without('b') */ + /* tbl.max(index='a').without('b') */ - suite.T().Log("About to run line #529: table_test_agg.Max().OptArgs(r.MaxOpts{Index: 'a', }).Without('b')") + suite.T().Log("About to run line #529: tbl.Max().OptArgs(r.MaxOpts{Index: 'a', }).Without('b')") - runAndAssert(suite.Suite, expected_, table_test_agg.Max().OptArgs(r.MaxOpts{Index: "a"}).Without("b"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Max().OptArgs(r.MaxOpts{Index: "a"}).Without("b"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_arity_test.go b/internal/integration/reql_tests/reql_arity_test.go new file mode 100644 index 00000000..0fee0fec --- /dev/null +++ b/internal/integration/reql_tests/reql_arity_test.go @@ -0,0 +1,345 @@ +// Code generated by gen_tests.py and process_polyglot.py. +// Do not edit this file directly. +// The template for this file is located at: +// ../template.go.tpl +package reql_tests + +import ( + "testing" + "time" + + "github.com/stretchr/testify/suite" + r "gopkg.in/rethinkdb/rethinkdb-go.v6" + "gopkg.in/rethinkdb/rethinkdb-go.v6/internal/compare" +) + +// Test the arity of every function +func TestAritySuite(t *testing.T) { + suite.Run(t, new(AritySuite)) +} + +type AritySuite struct { + suite.Suite + + session *r.Session +} + +func (suite *AritySuite) SetupTest() { + suite.T().Log("Setting up AritySuite") + // Use imports to prevent errors + _ = time.Time{} + _ = compare.AnythingIsFine + + session, err := r.Connect(r.ConnectOpts{ + Address: url, + }) + suite.Require().NoError(err, "Error returned when connecting to server") + suite.session = session + + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) + suite.Require().NoError(err) + err = r.DB("test").Wait().Exec(suite.session) + suite.Require().NoError(err) + + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) + suite.Require().NoError(err) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) + suite.Require().NoError(err) +} + +func (suite *AritySuite) TearDownSuite() { + suite.T().Log("Tearing down AritySuite") + + if suite.session != nil { + r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + + suite.session.Close() + } +} + +func (suite *AritySuite) TestCases() { + suite.T().Log("Running AritySuite: Test the arity of every function") + + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors + + // arity.yaml line #8 + // db = r.db('test') + suite.T().Log("Possibly executing: var db r.Term = r.DB('test')") + + db := r.DB("test") + _ = db // Prevent any noused variable errors + + // arity.yaml line #9 + // obj = r.expr({'a':1}) + suite.T().Log("Possibly executing: var obj r.Term = r.Expr(map[interface{}]interface{}{'a': 1, })") + + obj := r.Expr(map[interface{}]interface{}{"a": 1}) + _ = obj // Prevent any noused variable errors + + // arity.yaml line #10 + // array = r.expr([1]) + suite.T().Log("Possibly executing: var array r.Term = r.Expr([]interface{}{1})") + + array := r.Expr([]interface{}{1}) + _ = array // Prevent any noused variable errors + + { + // arity.yaml line #43 + /* err("ReqlQueryLogicError", "Empty ERROR term outside a default block.", []) */ + var expected_ Err = err("ReqlQueryLogicError", "Empty ERROR term outside a default block.") + /* r.error() */ + + suite.T().Log("About to run line #43: r.Error()") + + runAndAssert(suite.Suite, expected_, r.Error(), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #43") + } + + { + // arity.yaml line #96 + /* err("ReqlQueryLogicError", "Expected type DATUM but found DATABASE:", []) */ + var expected_ Err = err("ReqlQueryLogicError", "Expected type DATUM but found DATABASE:") + /* db.table_drop() */ + + suite.T().Log("About to run line #96: db.TableDrop()") + + runAndAssert(suite.Suite, expected_, db.TableDrop(), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #96") + } + + { + // arity.yaml line #209 + /* err("ReqlQueryLogicError", "Cannot call `branch` term with an even number of arguments.", []) */ + var expected_ Err = err("ReqlQueryLogicError", "Cannot call `branch` term with an even number of arguments.") + /* r.branch(1,2,3,4) */ + + suite.T().Log("About to run line #209: r.Branch(1, 2, 3, 4)") + + runAndAssert(suite.Suite, expected_, r.Branch(1, 2, 3, 4), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #209") + } + + { + // arity.yaml line #220 + /* 10 */ + var expected_ int = 10 + /* tbl.insert([{'id':0},{'id':1},{'id':2},{'id':3},{'id':4},{'id':5},{'id':6},{'id':7},{'id':8},{'id':9}]).get_field('inserted') */ + + suite.T().Log("About to run line #220: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 0, }, map[interface{}]interface{}{'id': 1, }, map[interface{}]interface{}{'id': 2, }, map[interface{}]interface{}{'id': 3, }, map[interface{}]interface{}{'id': 4, }, map[interface{}]interface{}{'id': 5, }, map[interface{}]interface{}{'id': 6, }, map[interface{}]interface{}{'id': 7, }, map[interface{}]interface{}{'id': 8, }, map[interface{}]interface{}{'id': 9, }}).Field('inserted')") + + runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 0}, map[interface{}]interface{}{"id": 1}, map[interface{}]interface{}{"id": 2}, map[interface{}]interface{}{"id": 3}, map[interface{}]interface{}{"id": 4}, map[interface{}]interface{}{"id": 5}, map[interface{}]interface{}{"id": 6}, map[interface{}]interface{}{"id": 7}, map[interface{}]interface{}{"id": 8}, map[interface{}]interface{}{"id": 9}}).Field("inserted"), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #220") + } + + { + // arity.yaml line #223 + /* bag([0, 1, 2]) */ + var expected_ compare.Expected = compare.UnorderedMatch([]interface{}{0, 1, 2}) + /* tbl.get_all(0, 1, 2).get_field('id') */ + + suite.T().Log("About to run line #223: tbl.GetAll(0, 1, 2).Field('id')") + + runAndAssert(suite.Suite, expected_, tbl.GetAll(0, 1, 2).Field("id"), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #223") + } + + { + // arity.yaml line #226 + /* bag([0, 1, 2]) */ + var expected_ compare.Expected = compare.UnorderedMatch([]interface{}{0, 1, 2}) + /* tbl.get_all(r.args([]), 0, 1, 2).get_field('id') */ + + suite.T().Log("About to run line #226: tbl.GetAll(r.Args([]interface{}{}), 0, 1, 2).Field('id')") + + runAndAssert(suite.Suite, expected_, tbl.GetAll(r.Args([]interface{}{}), 0, 1, 2).Field("id"), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #226") + } + + { + // arity.yaml line #229 + /* bag([0, 1, 2]) */ + var expected_ compare.Expected = compare.UnorderedMatch([]interface{}{0, 1, 2}) + /* tbl.get_all(r.args([0]), 1, 2).get_field('id') */ + + suite.T().Log("About to run line #229: tbl.GetAll(r.Args([]interface{}{0}), 1, 2).Field('id')") + + runAndAssert(suite.Suite, expected_, tbl.GetAll(r.Args([]interface{}{0}), 1, 2).Field("id"), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #229") + } + + { + // arity.yaml line #232 + /* bag([0, 1, 2]) */ + var expected_ compare.Expected = compare.UnorderedMatch([]interface{}{0, 1, 2}) + /* tbl.get_all(r.args([0, 1]), 2).get_field('id') */ + + suite.T().Log("About to run line #232: tbl.GetAll(r.Args([]interface{}{0, 1}), 2).Field('id')") + + runAndAssert(suite.Suite, expected_, tbl.GetAll(r.Args([]interface{}{0, 1}), 2).Field("id"), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #232") + } + + { + // arity.yaml line #235 + /* bag([0, 1, 2]) */ + var expected_ compare.Expected = compare.UnorderedMatch([]interface{}{0, 1, 2}) + /* tbl.get_all(r.args([0, 1, 2])).get_field('id') */ + + suite.T().Log("About to run line #235: tbl.GetAll(r.Args([]interface{}{0, 1, 2})).Field('id')") + + runAndAssert(suite.Suite, expected_, tbl.GetAll(r.Args([]interface{}{0, 1, 2})).Field("id"), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #235") + } + + { + // arity.yaml line #238 + /* bag([0, 1, 2]) */ + var expected_ compare.Expected = compare.UnorderedMatch([]interface{}{0, 1, 2}) + /* tbl.get_all(r.args([0]), 1, r.args([2])).get_field('id') */ + + suite.T().Log("About to run line #238: tbl.GetAll(r.Args([]interface{}{0}), 1, r.Args([]interface{}{2})).Field('id')") + + runAndAssert(suite.Suite, expected_, tbl.GetAll(r.Args([]interface{}{0}), 1, r.Args([]interface{}{2})).Field("id"), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #238") + } + + { + // arity.yaml line #243 + /* 1 */ + var expected_ int = 1 + /* r.branch(true, 1, r.error("a")) */ + + suite.T().Log("About to run line #243: r.Branch(true, 1, r.Error('a'))") + + runAndAssert(suite.Suite, expected_, r.Branch(true, 1, r.Error("a")), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #243") + } + + { + // arity.yaml line #246 + /* 1 */ + var expected_ int = 1 + /* r.branch(r.args([true, 1]), r.error("a")) */ + + suite.T().Log("About to run line #246: r.Branch(r.Args([]interface{}{true, 1}), r.Error('a'))") + + runAndAssert(suite.Suite, expected_, r.Branch(r.Args([]interface{}{true, 1}), r.Error("a")), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #246") + } + + { + // arity.yaml line #249 + /* 1 */ + var expected_ int = 1 + /* r.expr(true).branch(1, 2) */ + + suite.T().Log("About to run line #249: r.Expr(true).Branch(1, 2)") + + runAndAssert(suite.Suite, expected_, r.Expr(true).Branch(1, 2), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #249") + } + + { + // arity.yaml line #252 + /* err("ReqlUserError", "a", []) */ + var expected_ Err = err("ReqlUserError", "a") + /* r.branch(r.args([true, 1, r.error("a")])) */ + + suite.T().Log("About to run line #252: r.Branch(r.Args([]interface{}{true, 1, r.Error('a')}))") + + runAndAssert(suite.Suite, expected_, r.Branch(r.Args([]interface{}{true, 1, r.Error("a")})), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #252") + } + + { + // arity.yaml line #258 + /* ([{'group':0, 'reduction':1}]) */ + var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"group": 0, "reduction": 1}} + /* tbl.group(lambda row:row['id'].mod(2)).count({'id':0}).ungroup() */ + + suite.T().Log("About to run line #258: tbl.Group(func(row r.Term) interface{} { return row.AtIndex('id').Mod(2)}).Count(map[interface{}]interface{}{'id': 0, }).Ungroup()") + + runAndAssert(suite.Suite, expected_, tbl.Group(func(row r.Term) interface{} { return row.AtIndex("id").Mod(2) }).Count(map[interface{}]interface{}{"id": 0}).Ungroup(), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #258") + } + + { + // arity.yaml line #263 + /* ([{'group':0, 'reduction':1}]) */ + var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"group": 0, "reduction": 1}} + /* tbl.group(r.row['id'].mod(2)).count(r.args([{'id':0}])).ungroup() */ + + suite.T().Log("About to run line #263: tbl.Group(r.Row.AtIndex('id').Mod(2)).Count(r.Args([]interface{}{map[interface{}]interface{}{'id': 0, }})).Ungroup()") + + runAndAssert(suite.Suite, expected_, tbl.Group(r.Row.AtIndex("id").Mod(2)).Count(r.Args([]interface{}{map[interface{}]interface{}{"id": 0}})).Ungroup(), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #263") + } + + { + // arity.yaml line #269 + /* ({'a':{'c':1}}) */ + var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": map[interface{}]interface{}{"c": 1}} + /* r.expr({'a':{'b':1}}).merge(r.args([{'a':r.literal({'c':1})}])) */ + + suite.T().Log("About to run line #269: r.Expr(map[interface{}]interface{}{'a': map[interface{}]interface{}{'b': 1, }, }).Merge(r.Args([]interface{}{map[interface{}]interface{}{'a': r.Literal(map[interface{}]interface{}{'c': 1, }), }}))") + + runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"a": map[interface{}]interface{}{"b": 1}}).Merge(r.Args([]interface{}{map[interface{}]interface{}{"a": r.Literal(map[interface{}]interface{}{"c": 1})}})), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #269") + } +} diff --git a/internal/integration/reql_tests/reql_bitwise_test.go b/internal/integration/reql_tests/reql_bitwise_test.go deleted file mode 100644 index 1c0c5a16..00000000 --- a/internal/integration/reql_tests/reql_bitwise_test.go +++ /dev/null @@ -1,165 +0,0 @@ -package reql_tests - -import ( - "github.com/stretchr/testify/suite" - r "gopkg.in/rethinkdb/rethinkdb-go.v6" - "testing" -) - -// Test edge cases of bitwise operations -func TestBitwiseSuite(t *testing.T) { - suite.Run(t, new(BitwiseSuite)) -} - -type BitwiseSuite struct { - suite.Suite - - session *r.Session -} - -func (suite *BitwiseSuite) SetupTest() { - suite.T().Log("Setting up BitwiseSuite") - - session, err := r.Connect(r.ConnectOpts{ - Address: url, - }) - suite.Require().NoError(err, "Error returned when connecting to server") - suite.session = session -} - -func (suite *BitwiseSuite) TearDownSuite() { - suite.T().Log("Tearing down BitwiseSuite") - - if suite.session != nil { - suite.session.Close() - } -} - -func (suite *BitwiseSuite) TestCases() { - suite.T().Log("Running BitwiseSuite: Test edge cases of bitwise operations") - - runOpts := r.RunOpts{ - GeometryFormat: "raw", - GroupFormat: "map", - } - - { - var q = r.BitAnd(3, 5) - var expected_ = 3 & 5 - - suite.T().Logf("About to run line #1: %v", q) - - runAndAssert(suite.Suite, expected_, q, suite.session, runOpts) - suite.T().Log("Finished running line #1") - } - - { - var q = r.Expr(3).BitAnd(5) - var expected_ = 3 & 5 - - suite.T().Logf("About to run line #2: %v", q) - - runAndAssert(suite.Suite, expected_, q, suite.session, runOpts) - suite.T().Log("Finished running line #2") - } - - { - var q = r.BitOr(3, 5) - var expected_ = 3 | 5 - - suite.T().Logf("About to run line #3: %v", q) - - runAndAssert(suite.Suite, expected_, q, suite.session, runOpts) - suite.T().Log("Finished running line #3") - } - - { - var q = r.Expr(3).BitOr(5) - var expected_ = 3 | 5 - - suite.T().Logf("About to run line #4: %v", q) - - runAndAssert(suite.Suite, expected_, q, suite.session, runOpts) - suite.T().Log("Finished running line #4") - } - - { - var q = r.BitXor(3, 5) - var expected_ = 3 ^ 5 - - suite.T().Logf("About to run line #5: %v", q) - - runAndAssert(suite.Suite, expected_, q, suite.session, runOpts) - suite.T().Log("Finished running line #5") - } - - { - var q = r.Expr(3).BitXor(5) - var expected_ = 3 ^ 5 - - suite.T().Logf("About to run line #6: %v", q) - - runAndAssert(suite.Suite, expected_, q, suite.session, runOpts) - suite.T().Log("Finished running line #6") - } - - { - var q = r.BitNot(3) - var expected_ = ^3 - - suite.T().Logf("About to run line #7: %v", q) - - runAndAssert(suite.Suite, expected_, q, suite.session, runOpts) - suite.T().Log("Finished running line #7") - } - - { - var q = r.Expr(3).BitNot() - var expected_ = ^3 - - suite.T().Logf("About to run line #8: %v", q) - - runAndAssert(suite.Suite, expected_, q, suite.session, runOpts) - suite.T().Log("Finished running line #8") - } - - { - var q = r.BitSal(3, 5) - var expected_ = 3 << 5 - - suite.T().Logf("About to run line #9: %v", q) - - runAndAssert(suite.Suite, expected_, q, suite.session, runOpts) - suite.T().Log("Finished running line #9") - } - - { - var q = r.Expr(3).BitSal(5) - var expected_ = 3 << 5 - - suite.T().Logf("About to run line #10: %v", q) - - runAndAssert(suite.Suite, expected_, q, suite.session, runOpts) - suite.T().Log("Finished running line #10") - } - - { - var q = r.BitSar(3, 5) - var expected_ = 3 >> 5 - - suite.T().Logf("About to run line #11: %v", q) - - runAndAssert(suite.Suite, expected_, q, suite.session, runOpts) - suite.T().Log("Finished running line #11") - } - - { - var q = r.Expr(3).BitSar(5) - var expected_ = 3 >> 5 - - suite.T().Logf("About to run line #12: %v", q) - - runAndAssert(suite.Suite, expected_, q, suite.session, runOpts) - suite.T().Log("Finished running line #12") - } -} diff --git a/internal/integration/reql_tests/reql_changefeeds_edge_test.go b/internal/integration/reql_tests/reql_changefeeds_edge_test.go index 2312c85f..47943ce9 100644 --- a/internal/integration/reql_tests/reql_changefeeds_edge_test.go +++ b/internal/integration/reql_tests/reql_changefeeds_edge_test.go @@ -36,16 +36,16 @@ func (suite *ChangefeedsEdgeSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_feed_edge").Exec(suite.session) - err = r.DBCreate("db_feed_edge").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_feed_edge").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_feed_edge").TableDrop("table_test_changefeed_edge").Exec(suite.session) - err = r.DB("db_feed_edge").TableCreate("table_test_changefeed_edge").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_feed_edge").Table("table_test_changefeed_edge").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -54,8 +54,8 @@ func (suite *ChangefeedsEdgeSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_feed_edge").TableDrop("table_test_changefeed_edge").Exec(suite.session) - r.DBDrop("db_feed_edge").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -64,8 +64,8 @@ func (suite *ChangefeedsEdgeSuite) TearDownSuite() { func (suite *ChangefeedsEdgeSuite) TestCases() { suite.T().Log("Running ChangefeedsEdgeSuite: Test edge cases of changefeed operations") - table_test_changefeed_edge := r.DB("db_feed_edge").Table("table_test_changefeed_edge") - _ = table_test_changefeed_edge // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors // changefeeds/edge.yaml line #5 // common_prefix = r.expr([0,1,2,3,4,5,6,7,8]) @@ -78,11 +78,11 @@ func (suite *ChangefeedsEdgeSuite) TestCases() { // changefeeds/edge.yaml line #8 /* ({'created':1}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_changefeed_edge.index_create('sindex', lambda row:common_prefix.append(row['value'])) */ + /* tbl.index_create('sindex', lambda row:common_prefix.append(row['value'])) */ - suite.T().Log("About to run line #8: table_test_changefeed_edge.IndexCreateFunc('sindex', func(row r.Term) interface{} { return common_prefix.Append(row.AtIndex('value'))})") + suite.T().Log("About to run line #8: tbl.IndexCreateFunc('sindex', func(row r.Term) interface{} { return common_prefix.Append(row.AtIndex('value'))})") - runAndAssert(suite.Suite, expected_, table_test_changefeed_edge.IndexCreateFunc("sindex", func(row r.Term) interface{} { return common_prefix.Append(row.AtIndex("value")) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("sindex", func(row r.Term) interface{} { return common_prefix.Append(row.AtIndex("value")) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -93,11 +93,11 @@ func (suite *ChangefeedsEdgeSuite) TestCases() { // changefeeds/edge.yaml line #11 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_changefeed_edge.index_wait('sindex') */ + /* tbl.index_wait('sindex') */ - suite.T().Log("About to run line #11: table_test_changefeed_edge.IndexWait('sindex')") + suite.T().Log("About to run line #11: tbl.IndexWait('sindex')") - runAndAssert(suite.Suite, expected_, table_test_changefeed_edge.IndexWait("sindex"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexWait("sindex"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -133,80 +133,80 @@ func (suite *ChangefeedsEdgeSuite) TestCases() { _ = erroredres // Prevent any noused variable errors // changefeeds/edge.yaml line #26 - // pre_changes = table_test_changefeed_edge.between(r.minval, common_prefix.append('7'), index='sindex').changes(squash=False).limit(len(pre))['new_val']['value'] - suite.T().Log("Possibly executing: var pre_changes r.Term = table_test_changefeed_edge.Between(r.MinVal, common_prefix.Append('7')).OptArgs(r.BetweenOpts{Index: 'sindex', }).Changes().OptArgs(r.ChangesOpts{Squash: false, }).Limit(maybeLen(pre)).AtIndex('new_val').AtIndex('value')") + // pre_changes = tbl.between(r.minval, common_prefix.append('7'), index='sindex').changes(squash=False).limit(len(pre))['new_val']['value'] + suite.T().Log("Possibly executing: var pre_changes r.Term = tbl.Between(r.MinVal, common_prefix.Append('7')).OptArgs(r.BetweenOpts{Index: 'sindex', }).Changes().OptArgs(r.ChangesOpts{Squash: false, }).Limit(maybeLen(pre)).AtIndex('new_val').AtIndex('value')") - pre_changes := maybeRun(table_test_changefeed_edge.Between(r.MinVal, common_prefix.Append("7")).OptArgs(r.BetweenOpts{Index: "sindex"}).Changes().OptArgs(r.ChangesOpts{Squash: false}).Limit(maybeLen(pre)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) + pre_changes := maybeRun(tbl.Between(r.MinVal, common_prefix.Append("7")).OptArgs(r.BetweenOpts{Index: "sindex"}).Changes().OptArgs(r.ChangesOpts{Squash: false}).Limit(maybeLen(pre)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) _ = pre_changes // Prevent any noused variable errors // changefeeds/edge.yaml line #29 - // mid_changes = table_test_changefeed_edge.between(common_prefix.append('2'), common_prefix.append('9'), index='sindex').changes(squash=False).limit(len(post))['new_val']['value'] - suite.T().Log("Possibly executing: var mid_changes r.Term = table_test_changefeed_edge.Between(common_prefix.Append('2'), common_prefix.Append('9')).OptArgs(r.BetweenOpts{Index: 'sindex', }).Changes().OptArgs(r.ChangesOpts{Squash: false, }).Limit(maybeLen(post)).AtIndex('new_val').AtIndex('value')") + // mid_changes = tbl.between(common_prefix.append('2'), common_prefix.append('9'), index='sindex').changes(squash=False).limit(len(post))['new_val']['value'] + suite.T().Log("Possibly executing: var mid_changes r.Term = tbl.Between(common_prefix.Append('2'), common_prefix.Append('9')).OptArgs(r.BetweenOpts{Index: 'sindex', }).Changes().OptArgs(r.ChangesOpts{Squash: false, }).Limit(maybeLen(post)).AtIndex('new_val').AtIndex('value')") - mid_changes := maybeRun(table_test_changefeed_edge.Between(common_prefix.Append("2"), common_prefix.Append("9")).OptArgs(r.BetweenOpts{Index: "sindex"}).Changes().OptArgs(r.ChangesOpts{Squash: false}).Limit(maybeLen(post)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) + mid_changes := maybeRun(tbl.Between(common_prefix.Append("2"), common_prefix.Append("9")).OptArgs(r.BetweenOpts{Index: "sindex"}).Changes().OptArgs(r.ChangesOpts{Squash: false}).Limit(maybeLen(post)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) _ = mid_changes // Prevent any noused variable errors // changefeeds/edge.yaml line #32 - // post_changes = table_test_changefeed_edge.between(common_prefix.append('3'), r.maxval, index='sindex').changes(squash=False).limit(len(mid))['new_val']['value'] - suite.T().Log("Possibly executing: var post_changes r.Term = table_test_changefeed_edge.Between(common_prefix.Append('3'), r.MaxVal).OptArgs(r.BetweenOpts{Index: 'sindex', }).Changes().OptArgs(r.ChangesOpts{Squash: false, }).Limit(maybeLen(mid)).AtIndex('new_val').AtIndex('value')") + // post_changes = tbl.between(common_prefix.append('3'), r.maxval, index='sindex').changes(squash=False).limit(len(mid))['new_val']['value'] + suite.T().Log("Possibly executing: var post_changes r.Term = tbl.Between(common_prefix.Append('3'), r.MaxVal).OptArgs(r.BetweenOpts{Index: 'sindex', }).Changes().OptArgs(r.ChangesOpts{Squash: false, }).Limit(maybeLen(mid)).AtIndex('new_val').AtIndex('value')") - post_changes := maybeRun(table_test_changefeed_edge.Between(common_prefix.Append("3"), r.MaxVal).OptArgs(r.BetweenOpts{Index: "sindex"}).Changes().OptArgs(r.ChangesOpts{Squash: false}).Limit(maybeLen(mid)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) + post_changes := maybeRun(tbl.Between(common_prefix.Append("3"), r.MaxVal).OptArgs(r.BetweenOpts{Index: "sindex"}).Changes().OptArgs(r.ChangesOpts{Squash: false}).Limit(maybeLen(mid)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) _ = post_changes // Prevent any noused variable errors // changefeeds/edge.yaml line #38 - // premap_changes1 = table_test_changefeed_edge.map(r.branch(r.row['value'].lt('2'), r.row, r.row["dummy"])).changes(squash=False).limit(len(erroredres))['new_val']['value'] - suite.T().Log("Possibly executing: var premap_changes1 r.Term = table_test_changefeed_edge.Map(r.Branch(r.Row.AtIndex('value').Lt('2'), r.Row, r.Row.AtIndex('dummy'))).Changes().OptArgs(r.ChangesOpts{Squash: false, }).Limit(maybeLen(erroredres)).AtIndex('new_val').AtIndex('value')") + // premap_changes1 = tbl.map(r.branch(r.row['value'].lt('2'), r.row, r.row["dummy"])).changes(squash=False).limit(len(erroredres))['new_val']['value'] + suite.T().Log("Possibly executing: var premap_changes1 r.Term = tbl.Map(r.Branch(r.Row.AtIndex('value').Lt('2'), r.Row, r.Row.AtIndex('dummy'))).Changes().OptArgs(r.ChangesOpts{Squash: false, }).Limit(maybeLen(erroredres)).AtIndex('new_val').AtIndex('value')") - premap_changes1 := maybeRun(table_test_changefeed_edge.Map(r.Branch(r.Row.AtIndex("value").Lt("2"), r.Row, r.Row.AtIndex("dummy"))).Changes().OptArgs(r.ChangesOpts{Squash: false}).Limit(maybeLen(erroredres)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) + premap_changes1 := maybeRun(tbl.Map(r.Branch(r.Row.AtIndex("value").Lt("2"), r.Row, r.Row.AtIndex("dummy"))).Changes().OptArgs(r.ChangesOpts{Squash: false}).Limit(maybeLen(erroredres)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) _ = premap_changes1 // Prevent any noused variable errors // changefeeds/edge.yaml line #42 - // postmap_changes1 = table_test_changefeed_edge.changes(squash=False).map(r.branch(r.row['new_val']['value'].lt('2'), r.row, r.row["dummy"])).limit(len(erroredres))['new_val']['value'] - suite.T().Log("Possibly executing: var postmap_changes1 r.Term = table_test_changefeed_edge.Changes().OptArgs(r.ChangesOpts{Squash: false, }).Map(r.Branch(r.Row.AtIndex('new_val').AtIndex('value').Lt('2'), r.Row, r.Row.AtIndex('dummy'))).Limit(maybeLen(erroredres)).AtIndex('new_val').AtIndex('value')") + // postmap_changes1 = tbl.changes(squash=False).map(r.branch(r.row['new_val']['value'].lt('2'), r.row, r.row["dummy"])).limit(len(erroredres))['new_val']['value'] + suite.T().Log("Possibly executing: var postmap_changes1 r.Term = tbl.Changes().OptArgs(r.ChangesOpts{Squash: false, }).Map(r.Branch(r.Row.AtIndex('new_val').AtIndex('value').Lt('2'), r.Row, r.Row.AtIndex('dummy'))).Limit(maybeLen(erroredres)).AtIndex('new_val').AtIndex('value')") - postmap_changes1 := maybeRun(table_test_changefeed_edge.Changes().OptArgs(r.ChangesOpts{Squash: false}).Map(r.Branch(r.Row.AtIndex("new_val").AtIndex("value").Lt("2"), r.Row, r.Row.AtIndex("dummy"))).Limit(maybeLen(erroredres)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) + postmap_changes1 := maybeRun(tbl.Changes().OptArgs(r.ChangesOpts{Squash: false}).Map(r.Branch(r.Row.AtIndex("new_val").AtIndex("value").Lt("2"), r.Row, r.Row.AtIndex("dummy"))).Limit(maybeLen(erroredres)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) _ = postmap_changes1 // Prevent any noused variable errors // changefeeds/edge.yaml line #46 - // prefilter_changes1 = table_test_changefeed_edge.filter(r.branch(r.row['value'].lt('2'), True, r.row["dummy"])).changes(squash=False).limit(len(erroredres))['new_val']['value'] - suite.T().Log("Possibly executing: var prefilter_changes1 r.Term = table_test_changefeed_edge.Filter(r.Branch(r.Row.AtIndex('value').Lt('2'), true, r.Row.AtIndex('dummy'))).Changes().OptArgs(r.ChangesOpts{Squash: false, }).Limit(maybeLen(erroredres)).AtIndex('new_val').AtIndex('value')") + // prefilter_changes1 = tbl.filter(r.branch(r.row['value'].lt('2'), True, r.row["dummy"])).changes(squash=False).limit(len(erroredres))['new_val']['value'] + suite.T().Log("Possibly executing: var prefilter_changes1 r.Term = tbl.Filter(r.Branch(r.Row.AtIndex('value').Lt('2'), true, r.Row.AtIndex('dummy'))).Changes().OptArgs(r.ChangesOpts{Squash: false, }).Limit(maybeLen(erroredres)).AtIndex('new_val').AtIndex('value')") - prefilter_changes1 := maybeRun(table_test_changefeed_edge.Filter(r.Branch(r.Row.AtIndex("value").Lt("2"), true, r.Row.AtIndex("dummy"))).Changes().OptArgs(r.ChangesOpts{Squash: false}).Limit(maybeLen(erroredres)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) + prefilter_changes1 := maybeRun(tbl.Filter(r.Branch(r.Row.AtIndex("value").Lt("2"), true, r.Row.AtIndex("dummy"))).Changes().OptArgs(r.ChangesOpts{Squash: false}).Limit(maybeLen(erroredres)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) _ = prefilter_changes1 // Prevent any noused variable errors // changefeeds/edge.yaml line #50 - // postfilter_changes1 = table_test_changefeed_edge.changes(squash=False).filter(r.branch(r.row['new_val']['value'].lt('2'), True, r.row["dummy"])).limit(len(erroredres))['new_val']['value'] - suite.T().Log("Possibly executing: var postfilter_changes1 r.Term = table_test_changefeed_edge.Changes().OptArgs(r.ChangesOpts{Squash: false, }).Filter(r.Branch(r.Row.AtIndex('new_val').AtIndex('value').Lt('2'), true, r.Row.AtIndex('dummy'))).Limit(maybeLen(erroredres)).AtIndex('new_val').AtIndex('value')") + // postfilter_changes1 = tbl.changes(squash=False).filter(r.branch(r.row['new_val']['value'].lt('2'), True, r.row["dummy"])).limit(len(erroredres))['new_val']['value'] + suite.T().Log("Possibly executing: var postfilter_changes1 r.Term = tbl.Changes().OptArgs(r.ChangesOpts{Squash: false, }).Filter(r.Branch(r.Row.AtIndex('new_val').AtIndex('value').Lt('2'), true, r.Row.AtIndex('dummy'))).Limit(maybeLen(erroredres)).AtIndex('new_val').AtIndex('value')") - postfilter_changes1 := maybeRun(table_test_changefeed_edge.Changes().OptArgs(r.ChangesOpts{Squash: false}).Filter(r.Branch(r.Row.AtIndex("new_val").AtIndex("value").Lt("2"), true, r.Row.AtIndex("dummy"))).Limit(maybeLen(erroredres)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) + postfilter_changes1 := maybeRun(tbl.Changes().OptArgs(r.ChangesOpts{Squash: false}).Filter(r.Branch(r.Row.AtIndex("new_val").AtIndex("value").Lt("2"), true, r.Row.AtIndex("dummy"))).Limit(maybeLen(erroredres)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) _ = postfilter_changes1 // Prevent any noused variable errors // changefeeds/edge.yaml line #56 - // premap_changes2 = table_test_changefeed_edge.map(r.branch(r.row['value'].lt('2'), r.row, r.expr([])[1])).changes(squash=False).limit(len(erroredres))['new_val']['value'] - suite.T().Log("Possibly executing: var premap_changes2 r.Term = table_test_changefeed_edge.Map(r.Branch(r.Row.AtIndex('value').Lt('2'), r.Row, r.Expr([]interface{}{}).AtIndex(1))).Changes().OptArgs(r.ChangesOpts{Squash: false, }).Limit(maybeLen(erroredres)).AtIndex('new_val').AtIndex('value')") + // premap_changes2 = tbl.map(r.branch(r.row['value'].lt('2'), r.row, r.expr([])[1])).changes(squash=False).limit(len(erroredres))['new_val']['value'] + suite.T().Log("Possibly executing: var premap_changes2 r.Term = tbl.Map(r.Branch(r.Row.AtIndex('value').Lt('2'), r.Row, r.Expr([]interface{}{}).AtIndex(1))).Changes().OptArgs(r.ChangesOpts{Squash: false, }).Limit(maybeLen(erroredres)).AtIndex('new_val').AtIndex('value')") - premap_changes2 := maybeRun(table_test_changefeed_edge.Map(r.Branch(r.Row.AtIndex("value").Lt("2"), r.Row, r.Expr([]interface{}{}).AtIndex(1))).Changes().OptArgs(r.ChangesOpts{Squash: false}).Limit(maybeLen(erroredres)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) + premap_changes2 := maybeRun(tbl.Map(r.Branch(r.Row.AtIndex("value").Lt("2"), r.Row, r.Expr([]interface{}{}).AtIndex(1))).Changes().OptArgs(r.ChangesOpts{Squash: false}).Limit(maybeLen(erroredres)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) _ = premap_changes2 // Prevent any noused variable errors // changefeeds/edge.yaml line #60 - // postmap_changes2 = table_test_changefeed_edge.changes(squash=False).map(r.branch(r.row['new_val']['value'].lt('2'), r.row, r.expr([])[1])).limit(len(erroredres))['new_val']['value'] - suite.T().Log("Possibly executing: var postmap_changes2 r.Term = table_test_changefeed_edge.Changes().OptArgs(r.ChangesOpts{Squash: false, }).Map(r.Branch(r.Row.AtIndex('new_val').AtIndex('value').Lt('2'), r.Row, r.Expr([]interface{}{}).AtIndex(1))).Limit(maybeLen(erroredres)).AtIndex('new_val').AtIndex('value')") + // postmap_changes2 = tbl.changes(squash=False).map(r.branch(r.row['new_val']['value'].lt('2'), r.row, r.expr([])[1])).limit(len(erroredres))['new_val']['value'] + suite.T().Log("Possibly executing: var postmap_changes2 r.Term = tbl.Changes().OptArgs(r.ChangesOpts{Squash: false, }).Map(r.Branch(r.Row.AtIndex('new_val').AtIndex('value').Lt('2'), r.Row, r.Expr([]interface{}{}).AtIndex(1))).Limit(maybeLen(erroredres)).AtIndex('new_val').AtIndex('value')") - postmap_changes2 := maybeRun(table_test_changefeed_edge.Changes().OptArgs(r.ChangesOpts{Squash: false}).Map(r.Branch(r.Row.AtIndex("new_val").AtIndex("value").Lt("2"), r.Row, r.Expr([]interface{}{}).AtIndex(1))).Limit(maybeLen(erroredres)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) + postmap_changes2 := maybeRun(tbl.Changes().OptArgs(r.ChangesOpts{Squash: false}).Map(r.Branch(r.Row.AtIndex("new_val").AtIndex("value").Lt("2"), r.Row, r.Expr([]interface{}{}).AtIndex(1))).Limit(maybeLen(erroredres)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) _ = postmap_changes2 // Prevent any noused variable errors // changefeeds/edge.yaml line #64 - // prefilter_changes2 = table_test_changefeed_edge.filter(r.branch(r.row['value'].lt('2'), True, r.expr([])[1])).changes(squash=False).limit(len(erroredres))['new_val']['value'] - suite.T().Log("Possibly executing: var prefilter_changes2 r.Term = table_test_changefeed_edge.Filter(r.Branch(r.Row.AtIndex('value').Lt('2'), true, r.Expr([]interface{}{}).AtIndex(1))).Changes().OptArgs(r.ChangesOpts{Squash: false, }).Limit(maybeLen(erroredres)).AtIndex('new_val').AtIndex('value')") + // prefilter_changes2 = tbl.filter(r.branch(r.row['value'].lt('2'), True, r.expr([])[1])).changes(squash=False).limit(len(erroredres))['new_val']['value'] + suite.T().Log("Possibly executing: var prefilter_changes2 r.Term = tbl.Filter(r.Branch(r.Row.AtIndex('value').Lt('2'), true, r.Expr([]interface{}{}).AtIndex(1))).Changes().OptArgs(r.ChangesOpts{Squash: false, }).Limit(maybeLen(erroredres)).AtIndex('new_val').AtIndex('value')") - prefilter_changes2 := maybeRun(table_test_changefeed_edge.Filter(r.Branch(r.Row.AtIndex("value").Lt("2"), true, r.Expr([]interface{}{}).AtIndex(1))).Changes().OptArgs(r.ChangesOpts{Squash: false}).Limit(maybeLen(erroredres)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) + prefilter_changes2 := maybeRun(tbl.Filter(r.Branch(r.Row.AtIndex("value").Lt("2"), true, r.Expr([]interface{}{}).AtIndex(1))).Changes().OptArgs(r.ChangesOpts{Squash: false}).Limit(maybeLen(erroredres)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) _ = prefilter_changes2 // Prevent any noused variable errors // changefeeds/edge.yaml line #68 - // postfilter_changes2 = table_test_changefeed_edge.changes(squash=False).filter(r.branch(r.row['new_val']['value'].lt('2'), True, r.expr([])[1])).limit(len(erroredres))['new_val']['value'] - suite.T().Log("Possibly executing: var postfilter_changes2 r.Term = table_test_changefeed_edge.Changes().OptArgs(r.ChangesOpts{Squash: false, }).Filter(r.Branch(r.Row.AtIndex('new_val').AtIndex('value').Lt('2'), true, r.Expr([]interface{}{}).AtIndex(1))).Limit(maybeLen(erroredres)).AtIndex('new_val').AtIndex('value')") + // postfilter_changes2 = tbl.changes(squash=False).filter(r.branch(r.row['new_val']['value'].lt('2'), True, r.expr([])[1])).limit(len(erroredres))['new_val']['value'] + suite.T().Log("Possibly executing: var postfilter_changes2 r.Term = tbl.Changes().OptArgs(r.ChangesOpts{Squash: false, }).Filter(r.Branch(r.Row.AtIndex('new_val').AtIndex('value').Lt('2'), true, r.Expr([]interface{}{}).AtIndex(1))).Limit(maybeLen(erroredres)).AtIndex('new_val').AtIndex('value')") - postfilter_changes2 := maybeRun(table_test_changefeed_edge.Changes().OptArgs(r.ChangesOpts{Squash: false}).Filter(r.Branch(r.Row.AtIndex("new_val").AtIndex("value").Lt("2"), true, r.Expr([]interface{}{}).AtIndex(1))).Limit(maybeLen(erroredres)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) + postfilter_changes2 := maybeRun(tbl.Changes().OptArgs(r.ChangesOpts{Squash: false}).Filter(r.Branch(r.Row.AtIndex("new_val").AtIndex("value").Lt("2"), true, r.Expr([]interface{}{}).AtIndex(1))).Limit(maybeLen(erroredres)).AtIndex("new_val").AtIndex("value"), suite.session, r.RunOpts{}) _ = postfilter_changes2 // Prevent any noused variable errors // changefeeds/edge.yaml line #73 @@ -227,11 +227,11 @@ func (suite *ChangefeedsEdgeSuite) TestCases() { // changefeeds/edge.yaml line #83 /* err('ReqlQueryLogicError', 'Cannot call `changes` after a non-deterministic function.') */ var expected_ Err = err("ReqlQueryLogicError", "Cannot call `changes` after a non-deterministic function.") - /* table_test_changefeed_edge.map(nondetermmap).changes(squash=False) */ + /* tbl.map(nondetermmap).changes(squash=False) */ - suite.T().Log("About to run line #83: table_test_changefeed_edge.Map(nondetermmap).Changes().OptArgs(r.ChangesOpts{Squash: false, })") + suite.T().Log("About to run line #83: tbl.Map(nondetermmap).Changes().OptArgs(r.ChangesOpts{Squash: false, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_edge.Map(nondetermmap).Changes().OptArgs(r.ChangesOpts{Squash: false}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Map(nondetermmap).Changes().OptArgs(r.ChangesOpts{Squash: false}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -239,21 +239,21 @@ func (suite *ChangefeedsEdgeSuite) TestCases() { } // changefeeds/edge.yaml line #88 - // postmap_changes3 = table_test_changefeed_edge.changes(squash=False).map(nondetermmap).limit(100) - suite.T().Log("Possibly executing: var postmap_changes3 r.Term = table_test_changefeed_edge.Changes().OptArgs(r.ChangesOpts{Squash: false, }).Map(nondetermmap).Limit(100)") + // postmap_changes3 = tbl.changes(squash=False).map(nondetermmap).limit(100) + suite.T().Log("Possibly executing: var postmap_changes3 r.Term = tbl.Changes().OptArgs(r.ChangesOpts{Squash: false, }).Map(nondetermmap).Limit(100)") - postmap_changes3 := maybeRun(table_test_changefeed_edge.Changes().OptArgs(r.ChangesOpts{Squash: false}).Map(nondetermmap).Limit(100), suite.session, r.RunOpts{}) + postmap_changes3 := maybeRun(tbl.Changes().OptArgs(r.ChangesOpts{Squash: false}).Map(nondetermmap).Limit(100), suite.session, r.RunOpts{}) _ = postmap_changes3 // Prevent any noused variable errors { // changefeeds/edge.yaml line #92 /* err('ReqlQueryLogicError', 'Cannot call `changes` after a non-deterministic function.') */ var expected_ Err = err("ReqlQueryLogicError", "Cannot call `changes` after a non-deterministic function.") - /* table_test_changefeed_edge.filter(nondetermfilter).changes(squash=False) */ + /* tbl.filter(nondetermfilter).changes(squash=False) */ - suite.T().Log("About to run line #92: table_test_changefeed_edge.Filter(nondetermfilter).Changes().OptArgs(r.ChangesOpts{Squash: false, })") + suite.T().Log("About to run line #92: tbl.Filter(nondetermfilter).Changes().OptArgs(r.ChangesOpts{Squash: false, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_edge.Filter(nondetermfilter).Changes().OptArgs(r.ChangesOpts{Squash: false}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(nondetermfilter).Changes().OptArgs(r.ChangesOpts{Squash: false}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -261,21 +261,21 @@ func (suite *ChangefeedsEdgeSuite) TestCases() { } // changefeeds/edge.yaml line #97 - // postfilter_changes3 = table_test_changefeed_edge.changes(squash=False).filter(nondetermfilter).limit(4) - suite.T().Log("Possibly executing: var postfilter_changes3 r.Term = table_test_changefeed_edge.Changes().OptArgs(r.ChangesOpts{Squash: false, }).Filter(nondetermfilter).Limit(4)") + // postfilter_changes3 = tbl.changes(squash=False).filter(nondetermfilter).limit(4) + suite.T().Log("Possibly executing: var postfilter_changes3 r.Term = tbl.Changes().OptArgs(r.ChangesOpts{Squash: false, }).Filter(nondetermfilter).Limit(4)") - postfilter_changes3 := maybeRun(table_test_changefeed_edge.Changes().OptArgs(r.ChangesOpts{Squash: false}).Filter(nondetermfilter).Limit(4), suite.session, r.RunOpts{}) + postfilter_changes3 := maybeRun(tbl.Changes().OptArgs(r.ChangesOpts{Squash: false}).Filter(nondetermfilter).Limit(4), suite.session, r.RunOpts{}) _ = postfilter_changes3 // Prevent any noused variable errors { // changefeeds/edge.yaml line #100 /* ({'skipped':0,'deleted':0,'unchanged':0,'errors':0,'replaced':0,'inserted':101}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"skipped": 0, "deleted": 0, "unchanged": 0, "errors": 0, "replaced": 0, "inserted": 101} - /* table_test_changefeed_edge.insert(r.range(101).map({'id':r.uuid().coerce_to('binary').slice(0,r.random(4,24)).coerce_to('string'),'value':r.row.coerce_to('string')})) */ + /* tbl.insert(r.range(101).map({'id':r.uuid().coerce_to('binary').slice(0,r.random(4,24)).coerce_to('string'),'value':r.row.coerce_to('string')})) */ - suite.T().Log("About to run line #100: table_test_changefeed_edge.Insert(r.Range(101).Map(map[interface{}]interface{}{'id': r.UUID().CoerceTo('binary').Slice(0, r.Random(4, 24)).CoerceTo('string'), 'value': r.Row.CoerceTo('string'), }))") + suite.T().Log("About to run line #100: tbl.Insert(r.Range(101).Map(map[interface{}]interface{}{'id': r.UUID().CoerceTo('binary').Slice(0, r.Random(4, 24)).CoerceTo('string'), 'value': r.Row.CoerceTo('string'), }))") - runAndAssert(suite.Suite, expected_, table_test_changefeed_edge.Insert(r.Range(101).Map(map[interface{}]interface{}{"id": r.UUID().CoerceTo("binary").Slice(0, r.Random(4, 24)).CoerceTo("string"), "value": r.Row.CoerceTo("string")})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(r.Range(101).Map(map[interface{}]interface{}{"id": r.UUID().CoerceTo("binary").Slice(0, r.Random(4, 24)).CoerceTo("string"), "value": r.Row.CoerceTo("string")})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_changefeeds_idxcopy_test.go b/internal/integration/reql_tests/reql_changefeeds_idxcopy_test.go index d8f8af47..374242f7 100644 --- a/internal/integration/reql_tests/reql_changefeeds_idxcopy_test.go +++ b/internal/integration/reql_tests/reql_changefeeds_idxcopy_test.go @@ -36,16 +36,16 @@ func (suite *ChangefeedsIdxcopySuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_feed_idxcopy").Exec(suite.session) - err = r.DBCreate("db_feed_idxcopy").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_feed_idxcopy").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_feed_idxcopy").TableDrop("table_test_changefeed_idx").Exec(suite.session) - err = r.DB("db_feed_idxcopy").TableCreate("table_test_changefeed_idx").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_feed_idxcopy").Table("table_test_changefeed_idx").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -54,8 +54,8 @@ func (suite *ChangefeedsIdxcopySuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_feed_idxcopy").TableDrop("table_test_changefeed_idx").Exec(suite.session) - r.DBDrop("db_feed_idxcopy").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -64,18 +64,18 @@ func (suite *ChangefeedsIdxcopySuite) TearDownSuite() { func (suite *ChangefeedsIdxcopySuite) TestCases() { suite.T().Log("Running ChangefeedsIdxcopySuite: Test duplicate indexes with squashing") - table_test_changefeed_idx := r.DB("db_feed_idxcopy").Table("table_test_changefeed_idx") - _ = table_test_changefeed_idx // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors { // changefeeds/idxcopy.yaml line #4 /* partial({'created':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"created": 1}) - /* table_test_changefeed_idx.index_create('a') */ + /* tbl.index_create('a') */ - suite.T().Log("About to run line #4: table_test_changefeed_idx.IndexCreate('a')") + suite.T().Log("About to run line #4: tbl.IndexCreate('a')") - runAndAssert(suite.Suite, expected_, table_test_changefeed_idx.IndexCreate("a"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreate("a"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -86,11 +86,11 @@ func (suite *ChangefeedsIdxcopySuite) TestCases() { // changefeeds/idxcopy.yaml line #6 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_changefeed_idx.index_wait('a') */ + /* tbl.index_wait('a') */ - suite.T().Log("About to run line #6: table_test_changefeed_idx.IndexWait('a')") + suite.T().Log("About to run line #6: tbl.IndexWait('a')") - runAndAssert(suite.Suite, expected_, table_test_changefeed_idx.IndexWait("a"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexWait("a"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -98,10 +98,10 @@ func (suite *ChangefeedsIdxcopySuite) TestCases() { } // changefeeds/idxcopy.yaml line #8 - // feed = table_test_changefeed_idx.order_by(index='a').limit(10).changes(squash=2).limit(9) - suite.T().Log("Possibly executing: var feed r.Term = table_test_changefeed_idx.OrderBy().OptArgs(r.OrderByOpts{Index: 'a', }).Limit(10).Changes().OptArgs(r.ChangesOpts{Squash: 2, }).Limit(9)") + // feed = tbl.order_by(index='a').limit(10).changes(squash=2) + suite.T().Log("Possibly executing: var feed r.Term = tbl.OrderBy().OptArgs(r.OrderByOpts{Index: 'a', }).Limit(10).Changes().OptArgs(r.ChangesOpts{Squash: 2, })") - feed := maybeRun(table_test_changefeed_idx.OrderBy().OptArgs(r.OrderByOpts{Index: "a"}).Limit(10).Changes().OptArgs(r.ChangesOpts{Squash: 2}).Limit(9), suite.session, r.RunOpts{ + feed := maybeRun(tbl.OrderBy().OptArgs(r.OrderByOpts{Index: "a"}).Limit(10).Changes().OptArgs(r.ChangesOpts{Squash: 2}), suite.session, r.RunOpts{ MaxBatchRows: 1, }) _ = feed // Prevent any noused variable errors @@ -110,11 +110,11 @@ func (suite *ChangefeedsIdxcopySuite) TestCases() { // changefeeds/idxcopy.yaml line #15 /* partial({'inserted':12, 'errors':0}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"inserted": 12, "errors": 0}) - /* table_test_changefeed_idx.insert(r.range(0, 12).map({'id':r.row, 'a':5})) */ + /* tbl.insert(r.range(0, 12).map({'id':r.row, 'a':5})) */ - suite.T().Log("About to run line #15: table_test_changefeed_idx.Insert(r.Range(0, 12).Map(map[interface{}]interface{}{'id': r.Row, 'a': 5, }))") + suite.T().Log("About to run line #15: tbl.Insert(r.Range(0, 12).Map(map[interface{}]interface{}{'id': r.Row, 'a': 5, }))") - runAndAssert(suite.Suite, expected_, table_test_changefeed_idx.Insert(r.Range(0, 12).Map(map[interface{}]interface{}{"id": r.Row, "a": 5})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(r.Range(0, 12).Map(map[interface{}]interface{}{"id": r.Row, "a": 5})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -125,11 +125,11 @@ func (suite *ChangefeedsIdxcopySuite) TestCases() { // changefeeds/idxcopy.yaml line #20 /* partial({'deleted':3, 'errors':0}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"deleted": 3, "errors": 0}) - /* table_test_changefeed_idx.get_all(1, 8, 9, index='id').delete() */ + /* tbl.get_all(1, 8, 9, index='id').delete() */ - suite.T().Log("About to run line #20: table_test_changefeed_idx.GetAll(1, 8, 9).OptArgs(r.GetAllOpts{Index: 'id', }).Delete()") + suite.T().Log("About to run line #20: tbl.GetAll(1, 8, 9).OptArgs(r.GetAllOpts{Index: 'id', }).Delete()") - runAndAssert(suite.Suite, expected_, table_test_changefeed_idx.GetAll(1, 8, 9).OptArgs(r.GetAllOpts{Index: "id"}).Delete(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1, 8, 9).OptArgs(r.GetAllOpts{Index: "id"}).Delete(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -149,25 +149,4 @@ func (suite *ChangefeedsIdxcopySuite) TestCases() { compare.Assert(suite.T(), expected_, actual) suite.T().Log("Finished running line #26") } - - { - // changefeeds/idxcopy.yaml line #28 - /* bag([ - {"new_val":{"a":5, "id":0}, "old_val":nil}, - {"new_val":{"a":5, "id":2}, "old_val":nil}, - {"new_val":{"a":5, "id":3}, "old_val":nil}, - {"new_val":{"a":5, "id":4}, "old_val":nil}, - {"new_val":{"a":5, "id":5}, "old_val":nil}, - {"new_val":{"a":5, "id":6}, "old_val":nil}, - {"new_val":{"a":5, "id":7}, "old_val":nil}, - {"new_val":{"a":5, "id":10}, "old_val":nil}, - {"new_val":{"a":5, "id":11}, "old_val":nil}]) */ - var expected_ compare.Expected = compare.UnorderedMatch([]interface{}{map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 0}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 2}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 3}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 4}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 5}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 6}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 7}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 10}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 5, "id": 11}, "old_val": nil}}) - /* fetch(feed) */ - - suite.T().Log("About to run line #28: fetch(feed, 0)") - - fetchAndAssert(suite.Suite, expected_, feed, 0) - suite.T().Log("Finished running line #28") - } } diff --git a/internal/integration/reql_tests/reql_changefeeds_include_states_test.go b/internal/integration/reql_tests/reql_changefeeds_include_states_test.go index dbe417d6..8fba28d9 100644 --- a/internal/integration/reql_tests/reql_changefeeds_include_states_test.go +++ b/internal/integration/reql_tests/reql_changefeeds_include_states_test.go @@ -36,16 +36,16 @@ func (suite *ChangefeedsIncludeStatesSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_feed_include").Exec(suite.session) - err = r.DBCreate("db_feed_include").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_feed_include").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_feed_include").TableDrop("table_test_changefeed_include").Exec(suite.session) - err = r.DB("db_feed_include").TableCreate("table_test_changefeed_include").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_feed_include").Table("table_test_changefeed_include").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -54,8 +54,8 @@ func (suite *ChangefeedsIncludeStatesSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_feed_include").TableDrop("table_test_changefeed_include").Exec(suite.session) - r.DBDrop("db_feed_include").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -64,18 +64,18 @@ func (suite *ChangefeedsIncludeStatesSuite) TearDownSuite() { func (suite *ChangefeedsIncludeStatesSuite) TestCases() { suite.T().Log("Running ChangefeedsIncludeStatesSuite: Test `include_states`") - table_test_changefeed_include := r.DB("db_feed_include").Table("table_test_changefeed_include") - _ = table_test_changefeed_include // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors { // changefeeds/include_states.yaml line #4 /* [{'state':'ready'}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"state": "ready"}} - /* table_test_changefeed_include.changes(squash=true, include_states=true).limit(1) */ + /* tbl.changes(squash=true, include_states=true).limit(1) */ - suite.T().Log("About to run line #4: table_test_changefeed_include.Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true, }).Limit(1)") + suite.T().Log("About to run line #4: tbl.Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true, }).Limit(1)") - runAndAssert(suite.Suite, expected_, table_test_changefeed_include.Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true}).Limit(1), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true}).Limit(1), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -86,11 +86,11 @@ func (suite *ChangefeedsIncludeStatesSuite) TestCases() { // changefeeds/include_states.yaml line #9 /* [{'state':'initializing'}, {'new_val':null}, {'state':'ready'}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"state": "initializing"}, map[interface{}]interface{}{"new_val": nil}, map[interface{}]interface{}{"state": "ready"}} - /* table_test_changefeed_include.get(0).changes(squash=true, include_states=true, include_initial=true).limit(3) */ + /* tbl.get(0).changes(squash=true, include_states=true, include_initial=true).limit(3) */ - suite.T().Log("About to run line #9: table_test_changefeed_include.Get(0).Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true, IncludeInitial: true, }).Limit(3)") + suite.T().Log("About to run line #9: tbl.Get(0).Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true, IncludeInitial: true, }).Limit(3)") - runAndAssert(suite.Suite, expected_, table_test_changefeed_include.Get(0).Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true, IncludeInitial: true}).Limit(3), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(0).Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true, IncludeInitial: true}).Limit(3), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -101,11 +101,11 @@ func (suite *ChangefeedsIncludeStatesSuite) TestCases() { // changefeeds/include_states.yaml line #14 /* [{'state':'initializing'}, {'state':'ready'}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"state": "initializing"}, map[interface{}]interface{}{"state": "ready"}} - /* table_test_changefeed_include.order_by(index='id').limit(10).changes(squash=true, include_states=true, include_initial=true).limit(2) */ + /* tbl.order_by(index='id').limit(10).changes(squash=true, include_states=true, include_initial=true).limit(2) */ - suite.T().Log("About to run line #14: table_test_changefeed_include.OrderBy().OptArgs(r.OrderByOpts{Index: 'id', }).Limit(10).Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true, IncludeInitial: true, }).Limit(2)") + suite.T().Log("About to run line #14: tbl.OrderBy().OptArgs(r.OrderByOpts{Index: 'id', }).Limit(10).Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true, IncludeInitial: true, }).Limit(2)") - runAndAssert(suite.Suite, expected_, table_test_changefeed_include.OrderBy().OptArgs(r.OrderByOpts{Index: "id"}).Limit(10).Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true, IncludeInitial: true}).Limit(2), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.OrderBy().OptArgs(r.OrderByOpts{Index: "id"}).Limit(10).Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true, IncludeInitial: true}).Limit(2), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -116,11 +116,11 @@ func (suite *ChangefeedsIncludeStatesSuite) TestCases() { // changefeeds/include_states.yaml line #19 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_changefeed_include.insert({'id':1}) */ + /* tbl.insert({'id':1}) */ - suite.T().Log("About to run line #19: table_test_changefeed_include.Insert(map[interface{}]interface{}{'id': 1, })") + suite.T().Log("About to run line #19: tbl.Insert(map[interface{}]interface{}{'id': 1, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_include.Insert(map[interface{}]interface{}{"id": 1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -131,11 +131,11 @@ func (suite *ChangefeedsIncludeStatesSuite) TestCases() { // changefeeds/include_states.yaml line #21 /* [{'state':'initializing'}, {'new_val':{'id':1}}, {'state':'ready'}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"state": "initializing"}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"id": 1}}, map[interface{}]interface{}{"state": "ready"}} - /* table_test_changefeed_include.order_by(index='id').limit(10).changes(squash=true, include_states=true, include_initial=true).limit(3) */ + /* tbl.order_by(index='id').limit(10).changes(squash=true, include_states=true, include_initial=true).limit(3) */ - suite.T().Log("About to run line #21: table_test_changefeed_include.OrderBy().OptArgs(r.OrderByOpts{Index: 'id', }).Limit(10).Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true, IncludeInitial: true, }).Limit(3)") + suite.T().Log("About to run line #21: tbl.OrderBy().OptArgs(r.OrderByOpts{Index: 'id', }).Limit(10).Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true, IncludeInitial: true, }).Limit(3)") - runAndAssert(suite.Suite, expected_, table_test_changefeed_include.OrderBy().OptArgs(r.OrderByOpts{Index: "id"}).Limit(10).Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true, IncludeInitial: true}).Limit(3), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.OrderBy().OptArgs(r.OrderByOpts{Index: "id"}).Limit(10).Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true, IncludeInitial: true}).Limit(3), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -143,21 +143,21 @@ func (suite *ChangefeedsIncludeStatesSuite) TestCases() { } // changefeeds/include_states.yaml line #26 - // table_test_changefeed_includechanges = table_test_changefeed_include.changes(squash=true, include_states=true) - suite.T().Log("Possibly executing: var table_test_changefeed_includechanges r.Term = table_test_changefeed_include.Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true, })") + // tblchanges = tbl.changes(squash=true, include_states=true) + suite.T().Log("Possibly executing: var tblchanges r.Term = tbl.Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true, })") - table_test_changefeed_includechanges := maybeRun(table_test_changefeed_include.Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true}), suite.session, r.RunOpts{}) - _ = table_test_changefeed_includechanges // Prevent any noused variable errors + tblchanges := maybeRun(tbl.Changes().OptArgs(r.ChangesOpts{Squash: true, IncludeStates: true}), suite.session, r.RunOpts{}) + _ = tblchanges // Prevent any noused variable errors { // changefeeds/include_states.yaml line #30 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_changefeed_include.insert({'id':2}) */ + /* tbl.insert({'id':2}) */ - suite.T().Log("About to run line #30: table_test_changefeed_include.Insert(map[interface{}]interface{}{'id': 2, })") + suite.T().Log("About to run line #30: tbl.Insert(map[interface{}]interface{}{'id': 2, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_include.Insert(map[interface{}]interface{}{"id": 2}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 2}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -168,30 +168,30 @@ func (suite *ChangefeedsIncludeStatesSuite) TestCases() { // changefeeds/include_states.yaml line #32 /* [{'state':'ready'},{'new_val':{'id':2},'old_val':null}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"state": "ready"}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"id": 2}, "old_val": nil}} - /* fetch(table_test_changefeed_includechanges, 2) */ + /* fetch(tblchanges, 2) */ - suite.T().Log("About to run line #32: fetch(table_test_changefeed_includechanges, 2)") + suite.T().Log("About to run line #32: fetch(tblchanges, 2)") - fetchAndAssert(suite.Suite, expected_, table_test_changefeed_includechanges, 2) + fetchAndAssert(suite.Suite, expected_, tblchanges, 2) suite.T().Log("Finished running line #32") } // changefeeds/include_states.yaml line #35 - // getchanges = table_test_changefeed_include.get(2).changes(include_states=true, include_initial=true) - suite.T().Log("Possibly executing: var getchanges r.Term = table_test_changefeed_include.Get(2).Changes().OptArgs(r.ChangesOpts{IncludeStates: true, IncludeInitial: true, })") + // getchanges = tbl.get(2).changes(include_states=true, include_initial=true) + suite.T().Log("Possibly executing: var getchanges r.Term = tbl.Get(2).Changes().OptArgs(r.ChangesOpts{IncludeStates: true, IncludeInitial: true, })") - getchanges := maybeRun(table_test_changefeed_include.Get(2).Changes().OptArgs(r.ChangesOpts{IncludeStates: true, IncludeInitial: true}), suite.session, r.RunOpts{}) + getchanges := maybeRun(tbl.Get(2).Changes().OptArgs(r.ChangesOpts{IncludeStates: true, IncludeInitial: true}), suite.session, r.RunOpts{}) _ = getchanges // Prevent any noused variable errors { // changefeeds/include_states.yaml line #39 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_changefeed_include.get(2).update({'a':1}) */ + /* tbl.get(2).update({'a':1}) */ - suite.T().Log("About to run line #39: table_test_changefeed_include.Get(2).Update(map[interface{}]interface{}{'a': 1, })") + suite.T().Log("About to run line #39: tbl.Get(2).Update(map[interface{}]interface{}{'a': 1, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_include.Get(2).Update(map[interface{}]interface{}{"a": 1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(2).Update(map[interface{}]interface{}{"a": 1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -211,28 +211,28 @@ func (suite *ChangefeedsIncludeStatesSuite) TestCases() { } // changefeeds/include_states.yaml line #44 - // limitchanges = table_test_changefeed_include.order_by(index='id').limit(10).changes(include_states=true, include_initial=true) - suite.T().Log("Possibly executing: var limitchanges r.Term = table_test_changefeed_include.OrderBy().OptArgs(r.OrderByOpts{Index: 'id', }).Limit(10).Changes().OptArgs(r.ChangesOpts{IncludeStates: true, IncludeInitial: true, })") + // limitchanges = tbl.order_by(index='id').limit(10).changes(include_states=true, include_initial=true) + suite.T().Log("Possibly executing: var limitchanges r.Term = tbl.OrderBy().OptArgs(r.OrderByOpts{Index: 'id', }).Limit(10).Changes().OptArgs(r.ChangesOpts{IncludeStates: true, IncludeInitial: true, })") - limitchanges := maybeRun(table_test_changefeed_include.OrderBy().OptArgs(r.OrderByOpts{Index: "id"}).Limit(10).Changes().OptArgs(r.ChangesOpts{IncludeStates: true, IncludeInitial: true}), suite.session, r.RunOpts{}) + limitchanges := maybeRun(tbl.OrderBy().OptArgs(r.OrderByOpts{Index: "id"}).Limit(10).Changes().OptArgs(r.ChangesOpts{IncludeStates: true, IncludeInitial: true}), suite.session, r.RunOpts{}) _ = limitchanges // Prevent any noused variable errors // changefeeds/include_states.yaml line #48 - // limitchangesdesc = table_test_changefeed_include.order_by(index=r.desc('id')).limit(10).changes(include_states=true, include_initial=true) - suite.T().Log("Possibly executing: var limitchangesdesc r.Term = table_test_changefeed_include.OrderBy().OptArgs(r.OrderByOpts{Index: r.Desc('id'), }).Limit(10).Changes().OptArgs(r.ChangesOpts{IncludeStates: true, IncludeInitial: true, })") + // limitchangesdesc = tbl.order_by(index=r.desc('id')).limit(10).changes(include_states=true, include_initial=true) + suite.T().Log("Possibly executing: var limitchangesdesc r.Term = tbl.OrderBy().OptArgs(r.OrderByOpts{Index: r.Desc('id'), }).Limit(10).Changes().OptArgs(r.ChangesOpts{IncludeStates: true, IncludeInitial: true, })") - limitchangesdesc := maybeRun(table_test_changefeed_include.OrderBy().OptArgs(r.OrderByOpts{Index: r.Desc("id")}).Limit(10).Changes().OptArgs(r.ChangesOpts{IncludeStates: true, IncludeInitial: true}), suite.session, r.RunOpts{}) + limitchangesdesc := maybeRun(tbl.OrderBy().OptArgs(r.OrderByOpts{Index: r.Desc("id")}).Limit(10).Changes().OptArgs(r.ChangesOpts{IncludeStates: true, IncludeInitial: true}), suite.session, r.RunOpts{}) _ = limitchangesdesc // Prevent any noused variable errors { // changefeeds/include_states.yaml line #52 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_changefeed_include.insert({'id':3}) */ + /* tbl.insert({'id':3}) */ - suite.T().Log("About to run line #52: table_test_changefeed_include.Insert(map[interface{}]interface{}{'id': 3, })") + suite.T().Log("About to run line #52: tbl.Insert(map[interface{}]interface{}{'id': 3, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_include.Insert(map[interface{}]interface{}{"id": 3}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 3}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_changefeeds_now_test.go b/internal/integration/reql_tests/reql_changefeeds_now_test.go new file mode 100644 index 00000000..7d3cd366 --- /dev/null +++ b/internal/integration/reql_tests/reql_changefeeds_now_test.go @@ -0,0 +1,84 @@ +// Code generated by gen_tests.py and process_polyglot.py. +// Do not edit this file directly. +// The template for this file is located at: +// ../template.go.tpl +package reql_tests + +import ( + "testing" + "time" + + "github.com/stretchr/testify/suite" + r "gopkg.in/rethinkdb/rethinkdb-go.v6" + "gopkg.in/rethinkdb/rethinkdb-go.v6/internal/compare" +) + +// Test that r.now() is allowed before changes(), disallowed after. +func TestChangefeedsNowSuite(t *testing.T) { + suite.Run(t, new(ChangefeedsNowSuite)) +} + +type ChangefeedsNowSuite struct { + suite.Suite + + session *r.Session +} + +func (suite *ChangefeedsNowSuite) SetupTest() { + suite.T().Log("Setting up ChangefeedsNowSuite") + // Use imports to prevent errors + _ = time.Time{} + _ = compare.AnythingIsFine + + session, err := r.Connect(r.ConnectOpts{ + Address: url, + }) + suite.Require().NoError(err, "Error returned when connecting to server") + suite.session = session + + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) + suite.Require().NoError(err) + err = r.DB("test").Wait().Exec(suite.session) + suite.Require().NoError(err) + + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) + suite.Require().NoError(err) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) + suite.Require().NoError(err) +} + +func (suite *ChangefeedsNowSuite) TearDownSuite() { + suite.T().Log("Tearing down ChangefeedsNowSuite") + + if suite.session != nil { + r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + + suite.session.Close() + } +} + +func (suite *ChangefeedsNowSuite) TestCases() { + suite.T().Log("Running ChangefeedsNowSuite: Test that r.now() is allowed before changes(), disallowed after.") + + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors + + { + // changefeeds/now.py_one.yaml line #8 + /* AnythingIsFine */ + var expected_ string = compare.AnythingIsFine + /* tbl.merge({'a': r.now()}).changes() */ + + suite.T().Log("About to run line #8: tbl.Merge(map[interface{}]interface{}{'a': r.Now(), }).Changes()") + + runAndAssert(suite.Suite, expected_, tbl.Merge(map[interface{}]interface{}{"a": r.Now()}).Changes(), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #8") + } +} diff --git a/internal/integration/reql_tests/reql_changefeeds_point_test.go b/internal/integration/reql_tests/reql_changefeeds_point_test.go index 27e6b936..df24122e 100644 --- a/internal/integration/reql_tests/reql_changefeeds_point_test.go +++ b/internal/integration/reql_tests/reql_changefeeds_point_test.go @@ -36,16 +36,16 @@ func (suite *ChangefeedsPointSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_feed_point").Exec(suite.session) - err = r.DBCreate("db_feed_point").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_feed_point").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_feed_point").TableDrop("table_test_changefeed_point").Exec(suite.session) - err = r.DB("db_feed_point").TableCreate("table_test_changefeed_point").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_feed_point").Table("table_test_changefeed_point").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -54,8 +54,8 @@ func (suite *ChangefeedsPointSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_feed_point").TableDrop("table_test_changefeed_point").Exec(suite.session) - r.DBDrop("db_feed_point").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -64,14 +64,14 @@ func (suite *ChangefeedsPointSuite) TearDownSuite() { func (suite *ChangefeedsPointSuite) TestCases() { suite.T().Log("Running ChangefeedsPointSuite: Test point changebasics") - table_test_changefeed_point := r.DB("db_feed_point").Table("table_test_changefeed_point") - _ = table_test_changefeed_point // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors // changefeeds/point.yaml line #10 - // basic = table_test_changefeed_point.get(1).changes(include_initial=True) - suite.T().Log("Possibly executing: var basic r.Term = table_test_changefeed_point.Get(1).Changes().OptArgs(r.ChangesOpts{IncludeInitial: true, })") + // basic = tbl.get(1).changes(include_initial=True) + suite.T().Log("Possibly executing: var basic r.Term = tbl.Get(1).Changes().OptArgs(r.ChangesOpts{IncludeInitial: true, })") - basic := maybeRun(table_test_changefeed_point.Get(1).Changes().OptArgs(r.ChangesOpts{IncludeInitial: true}), suite.session, r.RunOpts{}) + basic := maybeRun(tbl.Get(1).Changes().OptArgs(r.ChangesOpts{IncludeInitial: true}), suite.session, r.RunOpts{}) _ = basic // Prevent any noused variable errors { @@ -90,11 +90,11 @@ func (suite *ChangefeedsPointSuite) TestCases() { // changefeeds/point.yaml line #19 /* partial({'errors':0, 'inserted':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "inserted": 1}) - /* table_test_changefeed_point.insert({'id':1}) */ + /* tbl.insert({'id':1}) */ - suite.T().Log("About to run line #19: table_test_changefeed_point.Insert(map[interface{}]interface{}{'id': 1, })") + suite.T().Log("About to run line #19: tbl.Insert(map[interface{}]interface{}{'id': 1, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_point.Insert(map[interface{}]interface{}{"id": 1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -117,11 +117,11 @@ func (suite *ChangefeedsPointSuite) TestCases() { // changefeeds/point.yaml line #27 /* partial({'errors':0, 'replaced':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "replaced": 1}) - /* table_test_changefeed_point.get(1).update({'update':1}) */ + /* tbl.get(1).update({'update':1}) */ - suite.T().Log("About to run line #27: table_test_changefeed_point.Get(1).Update(map[interface{}]interface{}{'update': 1, })") + suite.T().Log("About to run line #27: tbl.Get(1).Update(map[interface{}]interface{}{'update': 1, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_point.Get(1).Update(map[interface{}]interface{}{"update": 1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Update(map[interface{}]interface{}{"update": 1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -144,11 +144,11 @@ func (suite *ChangefeedsPointSuite) TestCases() { // changefeeds/point.yaml line #35 /* partial({'errors':0, 'deleted':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "deleted": 1}) - /* table_test_changefeed_point.get(1).delete() */ + /* tbl.get(1).delete() */ - suite.T().Log("About to run line #35: table_test_changefeed_point.Get(1).Delete()") + suite.T().Log("About to run line #35: tbl.Get(1).Delete()") - runAndAssert(suite.Suite, expected_, table_test_changefeed_point.Get(1).Delete(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Delete(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -168,21 +168,21 @@ func (suite *ChangefeedsPointSuite) TestCases() { } // changefeeds/point.yaml line #49 - // filter = table_test_changefeed_point.get(1).changes(squash=false,include_initial=True).filter(r.row['new_val']['update'].gt(2))['new_val']['update'] - suite.T().Log("Possibly executing: var filter r.Term = table_test_changefeed_point.Get(1).Changes().OptArgs(r.ChangesOpts{Squash: false, IncludeInitial: true, }).Filter(r.Row.AtIndex('new_val').AtIndex('update').Gt(2)).AtIndex('new_val').AtIndex('update')") + // filter = tbl.get(1).changes(squash=false,include_initial=True).filter(r.row['new_val']['update'].gt(2))['new_val']['update'] + suite.T().Log("Possibly executing: var filter r.Term = tbl.Get(1).Changes().OptArgs(r.ChangesOpts{Squash: false, IncludeInitial: true, }).Filter(r.Row.AtIndex('new_val').AtIndex('update').Gt(2)).AtIndex('new_val').AtIndex('update')") - filter := maybeRun(table_test_changefeed_point.Get(1).Changes().OptArgs(r.ChangesOpts{Squash: false, IncludeInitial: true}).Filter(r.Row.AtIndex("new_val").AtIndex("update").Gt(2)).AtIndex("new_val").AtIndex("update"), suite.session, r.RunOpts{}) + filter := maybeRun(tbl.Get(1).Changes().OptArgs(r.ChangesOpts{Squash: false, IncludeInitial: true}).Filter(r.Row.AtIndex("new_val").AtIndex("update").Gt(2)).AtIndex("new_val").AtIndex("update"), suite.session, r.RunOpts{}) _ = filter // Prevent any noused variable errors { // changefeeds/point.yaml line #53 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_changefeed_point.insert({'id':1, 'update':1}) */ + /* tbl.insert({'id':1, 'update':1}) */ - suite.T().Log("About to run line #53: table_test_changefeed_point.Insert(map[interface{}]interface{}{'id': 1, 'update': 1, })") + suite.T().Log("About to run line #53: tbl.Insert(map[interface{}]interface{}{'id': 1, 'update': 1, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_point.Insert(map[interface{}]interface{}{"id": 1, "update": 1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 1, "update": 1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -193,11 +193,11 @@ func (suite *ChangefeedsPointSuite) TestCases() { // changefeeds/point.yaml line #54 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_changefeed_point.get(1).update({'update':4}) */ + /* tbl.get(1).update({'update':4}) */ - suite.T().Log("About to run line #54: table_test_changefeed_point.Get(1).Update(map[interface{}]interface{}{'update': 4, })") + suite.T().Log("About to run line #54: tbl.Get(1).Update(map[interface{}]interface{}{'update': 4, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_point.Get(1).Update(map[interface{}]interface{}{"update": 4}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Update(map[interface{}]interface{}{"update": 4}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -208,11 +208,11 @@ func (suite *ChangefeedsPointSuite) TestCases() { // changefeeds/point.yaml line #55 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_changefeed_point.get(1).update({'update':1}) */ + /* tbl.get(1).update({'update':1}) */ - suite.T().Log("About to run line #55: table_test_changefeed_point.Get(1).Update(map[interface{}]interface{}{'update': 1, })") + suite.T().Log("About to run line #55: tbl.Get(1).Update(map[interface{}]interface{}{'update': 1, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_point.Get(1).Update(map[interface{}]interface{}{"update": 1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Update(map[interface{}]interface{}{"update": 1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -223,11 +223,11 @@ func (suite *ChangefeedsPointSuite) TestCases() { // changefeeds/point.yaml line #56 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_changefeed_point.get(1).update({'update':7}) */ + /* tbl.get(1).update({'update':7}) */ - suite.T().Log("About to run line #56: table_test_changefeed_point.Get(1).Update(map[interface{}]interface{}{'update': 7, })") + suite.T().Log("About to run line #56: tbl.Get(1).Update(map[interface{}]interface{}{'update': 7, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_point.Get(1).Update(map[interface{}]interface{}{"update": 7}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Update(map[interface{}]interface{}{"update": 7}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -247,21 +247,21 @@ func (suite *ChangefeedsPointSuite) TestCases() { } // changefeeds/point.yaml line #63 - // pluck = table_test_changefeed_point.get(3).changes(squash=false,include_initial=True).pluck({'new_val':['red', 'blue']})['new_val'] - suite.T().Log("Possibly executing: var pluck r.Term = table_test_changefeed_point.Get(3).Changes().OptArgs(r.ChangesOpts{Squash: false, IncludeInitial: true, }).Pluck(map[interface{}]interface{}{'new_val': []interface{}{'red', 'blue'}, }).AtIndex('new_val')") + // pluck = tbl.get(3).changes(squash=false,include_initial=True).pluck({'new_val':['red', 'blue']})['new_val'] + suite.T().Log("Possibly executing: var pluck r.Term = tbl.Get(3).Changes().OptArgs(r.ChangesOpts{Squash: false, IncludeInitial: true, }).Pluck(map[interface{}]interface{}{'new_val': []interface{}{'red', 'blue'}, }).AtIndex('new_val')") - pluck := maybeRun(table_test_changefeed_point.Get(3).Changes().OptArgs(r.ChangesOpts{Squash: false, IncludeInitial: true}).Pluck(map[interface{}]interface{}{"new_val": []interface{}{"red", "blue"}}).AtIndex("new_val"), suite.session, r.RunOpts{}) + pluck := maybeRun(tbl.Get(3).Changes().OptArgs(r.ChangesOpts{Squash: false, IncludeInitial: true}).Pluck(map[interface{}]interface{}{"new_val": []interface{}{"red", "blue"}}).AtIndex("new_val"), suite.session, r.RunOpts{}) _ = pluck // Prevent any noused variable errors { // changefeeds/point.yaml line #67 /* partial({'errors':0, 'inserted':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "inserted": 1}) - /* table_test_changefeed_point.insert({'id':3, 'red':1, 'green':1}) */ + /* tbl.insert({'id':3, 'red':1, 'green':1}) */ - suite.T().Log("About to run line #67: table_test_changefeed_point.Insert(map[interface{}]interface{}{'id': 3, 'red': 1, 'green': 1, })") + suite.T().Log("About to run line #67: tbl.Insert(map[interface{}]interface{}{'id': 3, 'red': 1, 'green': 1, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_point.Insert(map[interface{}]interface{}{"id": 3, "red": 1, "green": 1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 3, "red": 1, "green": 1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -272,11 +272,11 @@ func (suite *ChangefeedsPointSuite) TestCases() { // changefeeds/point.yaml line #69 /* partial({'errors':0, 'replaced':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "replaced": 1}) - /* table_test_changefeed_point.get(3).update({'blue':2, 'green':3}) */ + /* tbl.get(3).update({'blue':2, 'green':3}) */ - suite.T().Log("About to run line #69: table_test_changefeed_point.Get(3).Update(map[interface{}]interface{}{'blue': 2, 'green': 3, })") + suite.T().Log("About to run line #69: tbl.Get(3).Update(map[interface{}]interface{}{'blue': 2, 'green': 3, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_point.Get(3).Update(map[interface{}]interface{}{"blue": 2, "green": 3}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(3).Update(map[interface{}]interface{}{"blue": 2, "green": 3}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -287,11 +287,11 @@ func (suite *ChangefeedsPointSuite) TestCases() { // changefeeds/point.yaml line #71 /* partial({'errors':0, 'replaced':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "replaced": 1}) - /* table_test_changefeed_point.get(3).update({'green':4}) */ + /* tbl.get(3).update({'green':4}) */ - suite.T().Log("About to run line #71: table_test_changefeed_point.Get(3).Update(map[interface{}]interface{}{'green': 4, })") + suite.T().Log("About to run line #71: tbl.Get(3).Update(map[interface{}]interface{}{'green': 4, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_point.Get(3).Update(map[interface{}]interface{}{"green": 4}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(3).Update(map[interface{}]interface{}{"green": 4}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -302,11 +302,11 @@ func (suite *ChangefeedsPointSuite) TestCases() { // changefeeds/point.yaml line #73 /* partial({'errors':0, 'replaced':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "replaced": 1}) - /* table_test_changefeed_point.get(3).update({'blue':4}) */ + /* tbl.get(3).update({'blue':4}) */ - suite.T().Log("About to run line #73: table_test_changefeed_point.Get(3).Update(map[interface{}]interface{}{'blue': 4, })") + suite.T().Log("About to run line #73: tbl.Get(3).Update(map[interface{}]interface{}{'blue': 4, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_point.Get(3).Update(map[interface{}]interface{}{"blue": 4}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(3).Update(map[interface{}]interface{}{"blue": 4}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -326,17 +326,17 @@ func (suite *ChangefeedsPointSuite) TestCases() { } // changefeeds/point.yaml line #83 - // dtable_test_changefeed_point = r.db('rethinkdb').table('_debug_scratch') - suite.T().Log("Possibly executing: var dtable_test_changefeed_point r.Term = r.DB('rethinkdb').Table('_debug_scratch')") + // dtbl = r.db('rethinkdb').table('_debug_scratch') + suite.T().Log("Possibly executing: var dtbl r.Term = r.DB('rethinkdb').Table('_debug_scratch')") - dtable_test_changefeed_point := r.DB("rethinkdb").Table("_debug_scratch") - _ = dtable_test_changefeed_point // Prevent any noused variable errors + dtbl := r.DB("rethinkdb").Table("_debug_scratch") + _ = dtbl // Prevent any noused variable errors // changefeeds/point.yaml line #86 - // debug = dtable_test_changefeed_point.get(1).changes(include_initial=True) - suite.T().Log("Possibly executing: var debug r.Term = dtable_test_changefeed_point.Get(1).Changes().OptArgs(r.ChangesOpts{IncludeInitial: true, })") + // debug = dtbl.get(1).changes(include_initial=True) + suite.T().Log("Possibly executing: var debug r.Term = dtbl.Get(1).Changes().OptArgs(r.ChangesOpts{IncludeInitial: true, })") - debug := maybeRun(dtable_test_changefeed_point.Get(1).Changes().OptArgs(r.ChangesOpts{IncludeInitial: true}), suite.session, r.RunOpts{}) + debug := maybeRun(dtbl.Get(1).Changes().OptArgs(r.ChangesOpts{IncludeInitial: true}), suite.session, r.RunOpts{}) _ = debug // Prevent any noused variable errors { @@ -355,11 +355,11 @@ func (suite *ChangefeedsPointSuite) TestCases() { // changefeeds/point.yaml line #91 /* partial({'errors':0, 'inserted':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "inserted": 1}) - /* dtable_test_changefeed_point.insert({'id':1}) */ + /* dtbl.insert({'id':1}) */ - suite.T().Log("About to run line #91: dtable_test_changefeed_point.Insert(map[interface{}]interface{}{'id': 1, })") + suite.T().Log("About to run line #91: dtbl.Insert(map[interface{}]interface{}{'id': 1, })") - runAndAssert(suite.Suite, expected_, dtable_test_changefeed_point.Insert(map[interface{}]interface{}{"id": 1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, dtbl.Insert(map[interface{}]interface{}{"id": 1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -382,11 +382,11 @@ func (suite *ChangefeedsPointSuite) TestCases() { // changefeeds/point.yaml line #96 /* partial({'errors':0, 'replaced':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "replaced": 1}) - /* dtable_test_changefeed_point.get(1).update({'update':1}) */ + /* dtbl.get(1).update({'update':1}) */ - suite.T().Log("About to run line #96: dtable_test_changefeed_point.Get(1).Update(map[interface{}]interface{}{'update': 1, })") + suite.T().Log("About to run line #96: dtbl.Get(1).Update(map[interface{}]interface{}{'update': 1, })") - runAndAssert(suite.Suite, expected_, dtable_test_changefeed_point.Get(1).Update(map[interface{}]interface{}{"update": 1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, dtbl.Get(1).Update(map[interface{}]interface{}{"update": 1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -409,11 +409,11 @@ func (suite *ChangefeedsPointSuite) TestCases() { // changefeeds/point.yaml line #101 /* partial({'errors':0, 'deleted':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "deleted": 1}) - /* dtable_test_changefeed_point.get(1).delete() */ + /* dtbl.get(1).delete() */ - suite.T().Log("About to run line #101: dtable_test_changefeed_point.Get(1).Delete()") + suite.T().Log("About to run line #101: dtbl.Get(1).Delete()") - runAndAssert(suite.Suite, expected_, dtable_test_changefeed_point.Get(1).Delete(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, dtbl.Get(1).Delete(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -436,11 +436,11 @@ func (suite *ChangefeedsPointSuite) TestCases() { // changefeeds/point.yaml line #106 /* {'skipped':0, 'deleted':0, 'unchanged':0, 'errors':0, 'replaced':0, 'inserted':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"skipped": 0, "deleted": 0, "unchanged": 0, "errors": 0, "replaced": 0, "inserted": 1} - /* dtable_test_changefeed_point.insert({'id':5, 'red':1, 'green':1}) */ + /* dtbl.insert({'id':5, 'red':1, 'green':1}) */ - suite.T().Log("About to run line #106: dtable_test_changefeed_point.Insert(map[interface{}]interface{}{'id': 5, 'red': 1, 'green': 1, })") + suite.T().Log("About to run line #106: dtbl.Insert(map[interface{}]interface{}{'id': 5, 'red': 1, 'green': 1, })") - runAndAssert(suite.Suite, expected_, dtable_test_changefeed_point.Insert(map[interface{}]interface{}{"id": 5, "red": 1, "green": 1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, dtbl.Insert(map[interface{}]interface{}{"id": 5, "red": 1, "green": 1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -448,21 +448,21 @@ func (suite *ChangefeedsPointSuite) TestCases() { } // changefeeds/point.yaml line #108 - // dtable_test_changefeed_pointPluck = dtable_test_changefeed_point.get(5).changes(include_initial=True).pluck({'new_val':['red', 'blue']})['new_val'] - suite.T().Log("Possibly executing: var dtable_test_changefeed_pointPluck r.Term = dtable_test_changefeed_point.Get(5).Changes().OptArgs(r.ChangesOpts{IncludeInitial: true, }).Pluck(map[interface{}]interface{}{'new_val': []interface{}{'red', 'blue'}, }).AtIndex('new_val')") + // dtblPluck = dtbl.get(5).changes(include_initial=True).pluck({'new_val':['red', 'blue']})['new_val'] + suite.T().Log("Possibly executing: var dtblPluck r.Term = dtbl.Get(5).Changes().OptArgs(r.ChangesOpts{IncludeInitial: true, }).Pluck(map[interface{}]interface{}{'new_val': []interface{}{'red', 'blue'}, }).AtIndex('new_val')") - dtable_test_changefeed_pointPluck := maybeRun(dtable_test_changefeed_point.Get(5).Changes().OptArgs(r.ChangesOpts{IncludeInitial: true}).Pluck(map[interface{}]interface{}{"new_val": []interface{}{"red", "blue"}}).AtIndex("new_val"), suite.session, r.RunOpts{}) - _ = dtable_test_changefeed_pointPluck // Prevent any noused variable errors + dtblPluck := maybeRun(dtbl.Get(5).Changes().OptArgs(r.ChangesOpts{IncludeInitial: true}).Pluck(map[interface{}]interface{}{"new_val": []interface{}{"red", "blue"}}).AtIndex("new_val"), suite.session, r.RunOpts{}) + _ = dtblPluck // Prevent any noused variable errors { // changefeeds/point.yaml line #113 /* [{'red':1}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"red": 1}} - /* fetch(dtable_test_changefeed_pointPluck, 1) */ + /* fetch(dtblPluck, 1) */ - suite.T().Log("About to run line #113: fetch(dtable_test_changefeed_pointPluck, 1)") + suite.T().Log("About to run line #113: fetch(dtblPluck, 1)") - fetchAndAssert(suite.Suite, expected_, dtable_test_changefeed_pointPluck, 1) + fetchAndAssert(suite.Suite, expected_, dtblPluck, 1) suite.T().Log("Finished running line #113") } @@ -470,11 +470,11 @@ func (suite *ChangefeedsPointSuite) TestCases() { // changefeeds/point.yaml line #116 /* partial({'errors':0, 'replaced':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "replaced": 1}) - /* dtable_test_changefeed_point.get(5).update({'blue':2, 'green':3}) */ + /* dtbl.get(5).update({'blue':2, 'green':3}) */ - suite.T().Log("About to run line #116: dtable_test_changefeed_point.Get(5).Update(map[interface{}]interface{}{'blue': 2, 'green': 3, })") + suite.T().Log("About to run line #116: dtbl.Get(5).Update(map[interface{}]interface{}{'blue': 2, 'green': 3, })") - runAndAssert(suite.Suite, expected_, dtable_test_changefeed_point.Get(5).Update(map[interface{}]interface{}{"blue": 2, "green": 3}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, dtbl.Get(5).Update(map[interface{}]interface{}{"blue": 2, "green": 3}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -485,19 +485,19 @@ func (suite *ChangefeedsPointSuite) TestCases() { // changefeeds/point.yaml line #119 /* [{'blue':2, 'red':1}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"blue": 2, "red": 1}} - /* fetch(dtable_test_changefeed_pointPluck, 1) */ + /* fetch(dtblPluck, 1) */ - suite.T().Log("About to run line #119: fetch(dtable_test_changefeed_pointPluck, 1)") + suite.T().Log("About to run line #119: fetch(dtblPluck, 1)") - fetchAndAssert(suite.Suite, expected_, dtable_test_changefeed_pointPluck, 1) + fetchAndAssert(suite.Suite, expected_, dtblPluck, 1) suite.T().Log("Finished running line #119") } // changefeeds/point.yaml line #132 - // tableId = table_test_changefeed_point.info()['id'] - suite.T().Log("Possibly executing: var tableId r.Term = table_test_changefeed_point.Info().AtIndex('id')") + // tableId = tbl.info()['id'] + suite.T().Log("Possibly executing: var tableId r.Term = tbl.Info().AtIndex('id')") - tableId := maybeRun(table_test_changefeed_point.Info().AtIndex("id"), suite.session, r.RunOpts{}) + tableId := maybeRun(tbl.Info().AtIndex("id"), suite.session, r.RunOpts{}) _ = tableId // Prevent any noused variable errors // changefeeds/point.yaml line #136 @@ -510,7 +510,7 @@ func (suite *ChangefeedsPointSuite) TestCases() { { // changefeeds/point.yaml line #137 /* partial([{'new_val':partial({'db':'test'})}]) */ - var expected_ compare.Expected = compare.PartialMatch([]interface{}{map[interface{}]interface{}{"new_val": compare.PartialMatch(map[interface{}]interface{}{"db": "db_feed_point"})}}) + var expected_ compare.Expected = compare.PartialMatch([]interface{}{map[interface{}]interface{}{"new_val": compare.PartialMatch(map[interface{}]interface{}{"db": "test"})}}) /* fetch(rtblPluck, 1) */ suite.T().Log("About to run line #137: fetch(rtblPluck, 1)") @@ -523,11 +523,11 @@ func (suite *ChangefeedsPointSuite) TestCases() { // changefeeds/point.yaml line #140 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_changefeed_point.reconfigure(shards=3, replicas=1) */ + /* tbl.reconfigure(shards=3, replicas=1) */ - suite.T().Log("About to run line #140: table_test_changefeed_point.Reconfigure().OptArgs(r.ReconfigureOpts{Shards: 3, Replicas: 1, })") + suite.T().Log("About to run line #140: tbl.Reconfigure().OptArgs(r.ReconfigureOpts{Shards: 3, Replicas: 1, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_point.Reconfigure().OptArgs(r.ReconfigureOpts{Shards: 3, Replicas: 1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Reconfigure().OptArgs(r.ReconfigureOpts{Shards: 3, Replicas: 1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -537,7 +537,7 @@ func (suite *ChangefeedsPointSuite) TestCases() { { // changefeeds/point.yaml line #143 /* partial([{'old_val':partial({'db':'test'}), 'new_val':partial({'db':'test'})}]) */ - var expected_ compare.Expected = compare.PartialMatch([]interface{}{map[interface{}]interface{}{"old_val": compare.PartialMatch(map[interface{}]interface{}{"db": "db_feed_point"}), "new_val": compare.PartialMatch(map[interface{}]interface{}{"db": "db_feed_point"})}}) + var expected_ compare.Expected = compare.PartialMatch([]interface{}{map[interface{}]interface{}{"old_val": compare.PartialMatch(map[interface{}]interface{}{"db": "test"}), "new_val": compare.PartialMatch(map[interface{}]interface{}{"db": "test"})}}) /* fetch(rtblPluck, 1, 2) */ suite.T().Log("About to run line #143: fetch(rtblPluck, 1)") diff --git a/internal/integration/reql_tests/reql_changefeeds_squash_test.go b/internal/integration/reql_tests/reql_changefeeds_squash_test.go new file mode 100644 index 00000000..9eba1c33 --- /dev/null +++ b/internal/integration/reql_tests/reql_changefeeds_squash_test.go @@ -0,0 +1,204 @@ +// Code generated by gen_tests.py and process_polyglot.py. +// Do not edit this file directly. +// The template for this file is located at: +// ../template.go.tpl +package reql_tests + +import ( + "testing" + "time" + + "github.com/stretchr/testify/suite" + r "gopkg.in/rethinkdb/rethinkdb-go.v6" + "gopkg.in/rethinkdb/rethinkdb-go.v6/internal/compare" +) + +// Test changefeed squashing +func TestChangefeedsSquashSuite(t *testing.T) { + suite.Run(t, new(ChangefeedsSquashSuite)) +} + +type ChangefeedsSquashSuite struct { + suite.Suite + + session *r.Session +} + +func (suite *ChangefeedsSquashSuite) SetupTest() { + suite.T().Log("Setting up ChangefeedsSquashSuite") + // Use imports to prevent errors + _ = time.Time{} + _ = compare.AnythingIsFine + + session, err := r.Connect(r.ConnectOpts{ + Address: url, + }) + suite.Require().NoError(err, "Error returned when connecting to server") + suite.session = session + + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) + suite.Require().NoError(err) + err = r.DB("test").Wait().Exec(suite.session) + suite.Require().NoError(err) + + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) + suite.Require().NoError(err) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) + suite.Require().NoError(err) +} + +func (suite *ChangefeedsSquashSuite) TearDownSuite() { + suite.T().Log("Tearing down ChangefeedsSquashSuite") + + if suite.session != nil { + r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + + suite.session.Close() + } +} + +func (suite *ChangefeedsSquashSuite) TestCases() { + suite.T().Log("Running ChangefeedsSquashSuite: Test changefeed squashing") + + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors + + { + // changefeeds/squash.yaml line #7 + /* ("STREAM") */ + var expected_ string = "STREAM" + /* tbl.changes(squash=true).type_of() */ + + suite.T().Log("About to run line #7: tbl.Changes().OptArgs(r.ChangesOpts{Squash: true, }).TypeOf()") + + runAndAssert(suite.Suite, expected_, tbl.Changes().OptArgs(r.ChangesOpts{Squash: true}).TypeOf(), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #7") + } + + // changefeeds/squash.yaml line #14 + // normal_changes = tbl.changes().limit(2) + suite.T().Log("Possibly executing: var normal_changes r.Term = tbl.Changes().Limit(2)") + + normal_changes := maybeRun(tbl.Changes().Limit(2), suite.session, r.RunOpts{}) + _ = normal_changes // Prevent any noused variable errors + + // changefeeds/squash.yaml line #16 + // false_squash_changes = tbl.changes(squash=False).limit(2) + suite.T().Log("Possibly executing: var false_squash_changes r.Term = tbl.Changes().OptArgs(r.ChangesOpts{Squash: false, }).Limit(2)") + + false_squash_changes := maybeRun(tbl.Changes().OptArgs(r.ChangesOpts{Squash: false}).Limit(2), suite.session, r.RunOpts{}) + _ = false_squash_changes // Prevent any noused variable errors + + // changefeeds/squash.yaml line #20 + // long_squash_changes = tbl.changes(squash=0.5).limit(1) + suite.T().Log("Possibly executing: var long_squash_changes r.Term = tbl.Changes().OptArgs(r.ChangesOpts{Squash: 0.5, }).Limit(1)") + + long_squash_changes := maybeRun(tbl.Changes().OptArgs(r.ChangesOpts{Squash: 0.5}).Limit(1), suite.session, r.RunOpts{}) + _ = long_squash_changes // Prevent any noused variable errors + + // changefeeds/squash.yaml line #24 + // squash_changes = tbl.changes(squash=true).limit(1) + suite.T().Log("Possibly executing: var squash_changes r.Term = tbl.Changes().OptArgs(r.ChangesOpts{Squash: true, }).Limit(1)") + + squash_changes := maybeRun(tbl.Changes().OptArgs(r.ChangesOpts{Squash: true}).Limit(1), suite.session, r.RunOpts{}) + _ = squash_changes // Prevent any noused variable errors + + { + // changefeeds/squash.yaml line #28 + /* 1 */ + var expected_ int = 1 + /* tbl.insert({'id':100})['inserted'] */ + + suite.T().Log("About to run line #28: tbl.Insert(map[interface{}]interface{}{'id': 100, }).AtIndex('inserted')") + + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 100}).AtIndex("inserted"), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #28") + } + + { + // changefeeds/squash.yaml line #32 + /* 1 */ + var expected_ int = 1 + /* tbl.get(100).update({'a':1})['replaced'] */ + + suite.T().Log("About to run line #32: tbl.Get(100).Update(map[interface{}]interface{}{'a': 1, }).AtIndex('replaced')") + + runAndAssert(suite.Suite, expected_, tbl.Get(100).Update(map[interface{}]interface{}{"a": 1}).AtIndex("replaced"), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #32") + } + + { + // changefeeds/squash.yaml line #36 + /* ([{'new_val':{'id':100}, 'old_val':null}, + {'new_val':{'a':1, 'id':100}, 'old_val':{'id':100}}]) */ + var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"id": 100}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 1, "id": 100}, "old_val": map[interface{}]interface{}{"id": 100}}} + /* normal_changes */ + + suite.T().Log("About to run line #36: normal_changes") + + runAndAssert(suite.Suite, expected_, normal_changes, suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #36") + } + + { + // changefeeds/squash.yaml line #40 + /* ([{'new_val':{'id':100}, 'old_val':null}, + {'new_val':{'a':1, 'id':100}, 'old_val':{'id':100}}]) */ + var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"id": 100}, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 1, "id": 100}, "old_val": map[interface{}]interface{}{"id": 100}}} + /* false_squash_changes */ + + suite.T().Log("About to run line #40: false_squash_changes") + + runAndAssert(suite.Suite, expected_, false_squash_changes, suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #40") + } + + { + // changefeeds/squash.yaml line #44 + /* ([{'new_val':{'a':1, 'id':100}, 'old_val':null}]) */ + var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"a": 1, "id": 100}, "old_val": nil}} + /* long_squash_changes */ + + suite.T().Log("About to run line #44: long_squash_changes") + + runAndAssert(suite.Suite, expected_, long_squash_changes, suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #44") + } + + { + // changefeeds/squash.yaml line #59 + /* err('ReqlQueryLogicError', 'Expected BOOL or a positive NUMBER but found a negative NUMBER.') */ + var expected_ Err = err("ReqlQueryLogicError", "Expected BOOL or a positive NUMBER but found a negative NUMBER.") + /* tbl.changes(squash=-10) */ + + suite.T().Log("About to run line #59: tbl.Changes().OptArgs(r.ChangesOpts{Squash: -10, })") + + runAndAssert(suite.Suite, expected_, tbl.Changes().OptArgs(r.ChangesOpts{Squash: -10}), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #59") + } +} diff --git a/internal/integration/reql_tests/reql_changefeeds_table_test.go b/internal/integration/reql_tests/reql_changefeeds_table_test.go index 54ec74ad..083e8321 100644 --- a/internal/integration/reql_tests/reql_changefeeds_table_test.go +++ b/internal/integration/reql_tests/reql_changefeeds_table_test.go @@ -36,16 +36,16 @@ func (suite *ChangefeedsTableSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_feed_table").Exec(suite.session) - err = r.DBCreate("db_feed_table").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_feed_table").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_feed_table").TableDrop("table_test_changefeed_table").Exec(suite.session) - err = r.DB("db_feed_table").TableCreate("table_test_changefeed_table").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_feed_table").Table("table_test_changefeed_table").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -54,8 +54,8 @@ func (suite *ChangefeedsTableSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_feed_table").TableDrop("table_test_changefeed_table").Exec(suite.session) - r.DBDrop("db_feed_table").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -64,25 +64,25 @@ func (suite *ChangefeedsTableSuite) TearDownSuite() { func (suite *ChangefeedsTableSuite) TestCases() { suite.T().Log("Running ChangefeedsTableSuite: Test changefeeds on a table") - table_test_changefeed_table := r.DB("db_feed_table").Table("table_test_changefeed_table") - _ = table_test_changefeed_table // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors // changefeeds/table.yaml line #9 - // all = table_test_changefeed_table.changes() - suite.T().Log("Possibly executing: var all r.Term = table_test_changefeed_table.Changes()") + // all = tbl.changes() + suite.T().Log("Possibly executing: var all r.Term = tbl.Changes()") - all := maybeRun(table_test_changefeed_table.Changes(), suite.session, r.RunOpts{}) + all := maybeRun(tbl.Changes(), suite.session, r.RunOpts{}) _ = all // Prevent any noused variable errors { // changefeeds/table.yaml line #15 /* partial({'errors':0, 'inserted':2}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "inserted": 2}) - /* table_test_changefeed_table.insert([{'id':1}, {'id':2}]) */ + /* tbl.insert([{'id':1}, {'id':2}]) */ - suite.T().Log("About to run line #15: table_test_changefeed_table.Insert([]interface{}{map[interface{}]interface{}{'id': 1, }, map[interface{}]interface{}{'id': 2, }})") + suite.T().Log("About to run line #15: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 1, }, map[interface{}]interface{}{'id': 2, }})") - runAndAssert(suite.Suite, expected_, table_test_changefeed_table.Insert([]interface{}{map[interface{}]interface{}{"id": 1}, map[interface{}]interface{}{"id": 2}}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 1}, map[interface{}]interface{}{"id": 2}}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -105,11 +105,11 @@ func (suite *ChangefeedsTableSuite) TestCases() { // changefeeds/table.yaml line #22 /* partial({'errors':0, 'replaced':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "replaced": 1}) - /* table_test_changefeed_table.get(1).update({'version':1}) */ + /* tbl.get(1).update({'version':1}) */ - suite.T().Log("About to run line #22: table_test_changefeed_table.Get(1).Update(map[interface{}]interface{}{'version': 1, })") + suite.T().Log("About to run line #22: tbl.Get(1).Update(map[interface{}]interface{}{'version': 1, })") - runAndAssert(suite.Suite, expected_, table_test_changefeed_table.Get(1).Update(map[interface{}]interface{}{"version": 1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Update(map[interface{}]interface{}{"version": 1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -132,11 +132,11 @@ func (suite *ChangefeedsTableSuite) TestCases() { // changefeeds/table.yaml line #29 /* partial({'errors':0, 'deleted':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "deleted": 1}) - /* table_test_changefeed_table.get(1).delete() */ + /* tbl.get(1).delete() */ - suite.T().Log("About to run line #29: table_test_changefeed_table.Get(1).Delete()") + suite.T().Log("About to run line #29: tbl.Get(1).Delete()") - runAndAssert(suite.Suite, expected_, table_test_changefeed_table.Get(1).Delete(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Delete(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -156,21 +156,21 @@ func (suite *ChangefeedsTableSuite) TestCases() { } // changefeeds/table.yaml line #36 - // pluck = table_test_changefeed_table.changes().pluck({'new_val':['version']}) - suite.T().Log("Possibly executing: var pluck r.Term = table_test_changefeed_table.Changes().Pluck(map[interface{}]interface{}{'new_val': []interface{}{'version'}, })") + // pluck = tbl.changes().pluck({'new_val':['version']}) + suite.T().Log("Possibly executing: var pluck r.Term = tbl.Changes().Pluck(map[interface{}]interface{}{'new_val': []interface{}{'version'}, })") - pluck := maybeRun(table_test_changefeed_table.Changes().Pluck(map[interface{}]interface{}{"new_val": []interface{}{"version"}}), suite.session, r.RunOpts{}) + pluck := maybeRun(tbl.Changes().Pluck(map[interface{}]interface{}{"new_val": []interface{}{"version"}}), suite.session, r.RunOpts{}) _ = pluck // Prevent any noused variable errors { // changefeeds/table.yaml line #37 /* partial({'errors':0, 'inserted':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "inserted": 1}) - /* table_test_changefeed_table.insert([{'id':5, 'version':5}]) */ + /* tbl.insert([{'id':5, 'version':5}]) */ - suite.T().Log("About to run line #37: table_test_changefeed_table.Insert([]interface{}{map[interface{}]interface{}{'id': 5, 'version': 5, }})") + suite.T().Log("About to run line #37: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 5, 'version': 5, }})") - runAndAssert(suite.Suite, expected_, table_test_changefeed_table.Insert([]interface{}{map[interface{}]interface{}{"id": 5, "version": 5}}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 5, "version": 5}}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -193,11 +193,11 @@ func (suite *ChangefeedsTableSuite) TestCases() { // changefeeds/table.yaml line #44 /* err('ReqlQueryLogicError', "Cannot call a terminal (`reduce`, `count`, etc.) on an infinite stream (such as a changefeed).") */ var expected_ Err = err("ReqlQueryLogicError", "Cannot call a terminal (`reduce`, `count`, etc.) on an infinite stream (such as a changefeed).") - /* table_test_changefeed_table.changes().order_by('id') */ + /* tbl.changes().order_by('id') */ - suite.T().Log("About to run line #44: table_test_changefeed_table.Changes().OrderBy('id')") + suite.T().Log("About to run line #44: tbl.Changes().OrderBy('id')") - runAndAssert(suite.Suite, expected_, table_test_changefeed_table.Changes().OrderBy("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Changes().OrderBy("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -205,165 +205,167 @@ func (suite *ChangefeedsTableSuite) TestCases() { } // changefeeds/table.yaml line #59 - // overflow = table_test_changefeed_table.changes(changefeed_queue_size=100) - suite.T().Log("Possibly executing: var overflow r.Term = table_test_changefeed_table.Changes().OptArgs(r.ChangesOpts{ChangefeedQueueSize: 100, })") + // overflow = tbl.changes() + suite.T().Log("Possibly executing: var overflow r.Term = tbl.Changes()") - overflow := maybeRun(table_test_changefeed_table.Changes().OptArgs(r.ChangesOpts{ChangefeedQueueSize: 100}), suite.session, r.RunOpts{}) + overflow := maybeRun(tbl.Changes(), suite.session, r.RunOpts{ + ChangefeedQueueSize: 100, + }) _ = overflow // Prevent any noused variable errors { - // changefeeds/table.yaml line #62 + // changefeeds/table.yaml line #64 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_changefeed_table.insert(r.range(200).map(lambda x: {})) */ + /* tbl.insert(r.range(200).map(lambda x: {})) */ - suite.T().Log("About to run line #62: table_test_changefeed_table.Insert(r.Range(200).Map(func(x r.Term) interface{} { return map[interface{}]interface{}{}}))") + suite.T().Log("About to run line #64: tbl.Insert(r.Range(200).Map(func(x r.Term) interface{} { return map[interface{}]interface{}{}}))") - runAndAssert(suite.Suite, expected_, table_test_changefeed_table.Insert(r.Range(200).Map(func(x r.Term) interface{} { return map[interface{}]interface{}{} })), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(r.Range(200).Map(func(x r.Term) interface{} { return map[interface{}]interface{}{} })), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #62") + suite.T().Log("Finished running line #64") } { - // changefeeds/table.yaml line #64 + // changefeeds/table.yaml line #66 /* partial([{'error': regex('Changefeed cache over array size limit, skipped \d+ elements.')}]) */ var expected_ compare.Expected = compare.PartialMatch([]interface{}{map[interface{}]interface{}{"error": compare.MatchesRegexp("Changefeed cache over array size limit, skipped \\d+ elements.")}}) /* fetch(overflow, 90) */ - suite.T().Log("About to run line #64: fetch(overflow, 90)") + suite.T().Log("About to run line #66: fetch(overflow, 90)") fetchAndAssert(suite.Suite, expected_, overflow, 90) - suite.T().Log("Finished running line #64") + suite.T().Log("Finished running line #66") } - // changefeeds/table.yaml line #69 - // vtable_test_changefeed_table = r.db('rethinkdb').table('_debug_scratch') - suite.T().Log("Possibly executing: var vtable_test_changefeed_table r.Term = r.DB('rethinkdb').Table('_debug_scratch')") + // changefeeds/table.yaml line #71 + // vtbl = r.db('rethinkdb').table('_debug_scratch') + suite.T().Log("Possibly executing: var vtbl r.Term = r.DB('rethinkdb').Table('_debug_scratch')") - vtable_test_changefeed_table := r.DB("rethinkdb").Table("_debug_scratch") - _ = vtable_test_changefeed_table // Prevent any noused variable errors + vtbl := r.DB("rethinkdb").Table("_debug_scratch") + _ = vtbl // Prevent any noused variable errors - // changefeeds/table.yaml line #70 - // allVirtual = vtable_test_changefeed_table.changes() - suite.T().Log("Possibly executing: var allVirtual r.Term = vtable_test_changefeed_table.Changes()") + // changefeeds/table.yaml line #72 + // allVirtual = vtbl.changes() + suite.T().Log("Possibly executing: var allVirtual r.Term = vtbl.Changes()") - allVirtual := maybeRun(vtable_test_changefeed_table.Changes(), suite.session, r.RunOpts{}) + allVirtual := maybeRun(vtbl.Changes(), suite.session, r.RunOpts{}) _ = allVirtual // Prevent any noused variable errors { - // changefeeds/table.yaml line #74 + // changefeeds/table.yaml line #76 /* partial({'errors':0, 'inserted':2}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "inserted": 2}) - /* vtable_test_changefeed_table.insert([{'id':1}, {'id':2}]) */ + /* vtbl.insert([{'id':1}, {'id':2}]) */ - suite.T().Log("About to run line #74: vtable_test_changefeed_table.Insert([]interface{}{map[interface{}]interface{}{'id': 1, }, map[interface{}]interface{}{'id': 2, }})") + suite.T().Log("About to run line #76: vtbl.Insert([]interface{}{map[interface{}]interface{}{'id': 1, }, map[interface{}]interface{}{'id': 2, }})") - runAndAssert(suite.Suite, expected_, vtable_test_changefeed_table.Insert([]interface{}{map[interface{}]interface{}{"id": 1}, map[interface{}]interface{}{"id": 2}}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, vtbl.Insert([]interface{}{map[interface{}]interface{}{"id": 1}, map[interface{}]interface{}{"id": 2}}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #74") + suite.T().Log("Finished running line #76") } { - // changefeeds/table.yaml line #76 + // changefeeds/table.yaml line #78 /* bag([{'old_val':null, 'new_val':{'id':1}}, {'old_val':null, 'new_val':{'id':2}}]) */ var expected_ compare.Expected = compare.UnorderedMatch([]interface{}{map[interface{}]interface{}{"old_val": nil, "new_val": map[interface{}]interface{}{"id": 1}}, map[interface{}]interface{}{"old_val": nil, "new_val": map[interface{}]interface{}{"id": 2}}}) /* fetch(allVirtual, 2) */ - suite.T().Log("About to run line #76: fetch(allVirtual, 2)") + suite.T().Log("About to run line #78: fetch(allVirtual, 2)") fetchAndAssert(suite.Suite, expected_, allVirtual, 2) - suite.T().Log("Finished running line #76") + suite.T().Log("Finished running line #78") } { - // changefeeds/table.yaml line #81 + // changefeeds/table.yaml line #83 /* partial({'errors':0, 'replaced':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "replaced": 1}) - /* vtable_test_changefeed_table.get(1).update({'version':1}) */ + /* vtbl.get(1).update({'version':1}) */ - suite.T().Log("About to run line #81: vtable_test_changefeed_table.Get(1).Update(map[interface{}]interface{}{'version': 1, })") + suite.T().Log("About to run line #83: vtbl.Get(1).Update(map[interface{}]interface{}{'version': 1, })") - runAndAssert(suite.Suite, expected_, vtable_test_changefeed_table.Get(1).Update(map[interface{}]interface{}{"version": 1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, vtbl.Get(1).Update(map[interface{}]interface{}{"version": 1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #81") + suite.T().Log("Finished running line #83") } { - // changefeeds/table.yaml line #83 + // changefeeds/table.yaml line #85 /* [{'old_val':{'id':1}, 'new_val':{'id':1, 'version':1}}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"old_val": map[interface{}]interface{}{"id": 1}, "new_val": map[interface{}]interface{}{"id": 1, "version": 1}}} /* fetch(allVirtual, 1) */ - suite.T().Log("About to run line #83: fetch(allVirtual, 1)") + suite.T().Log("About to run line #85: fetch(allVirtual, 1)") fetchAndAssert(suite.Suite, expected_, allVirtual, 1) - suite.T().Log("Finished running line #83") + suite.T().Log("Finished running line #85") } { - // changefeeds/table.yaml line #88 + // changefeeds/table.yaml line #90 /* partial({'errors':0, 'deleted':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "deleted": 1}) - /* vtable_test_changefeed_table.get(1).delete() */ + /* vtbl.get(1).delete() */ - suite.T().Log("About to run line #88: vtable_test_changefeed_table.Get(1).Delete()") + suite.T().Log("About to run line #90: vtbl.Get(1).Delete()") - runAndAssert(suite.Suite, expected_, vtable_test_changefeed_table.Get(1).Delete(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, vtbl.Get(1).Delete(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #88") + suite.T().Log("Finished running line #90") } { - // changefeeds/table.yaml line #90 + // changefeeds/table.yaml line #92 /* [{'old_val':{'id':1, 'version':1}, 'new_val':null}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"old_val": map[interface{}]interface{}{"id": 1, "version": 1}, "new_val": nil}} /* fetch(allVirtual, 1) */ - suite.T().Log("About to run line #90: fetch(allVirtual, 1)") + suite.T().Log("About to run line #92: fetch(allVirtual, 1)") fetchAndAssert(suite.Suite, expected_, allVirtual, 1) - suite.T().Log("Finished running line #90") + suite.T().Log("Finished running line #92") } - // changefeeds/table.yaml line #95 - // vpluck = vtable_test_changefeed_table.changes().pluck({'new_val':['version']}) - suite.T().Log("Possibly executing: var vpluck r.Term = vtable_test_changefeed_table.Changes().Pluck(map[interface{}]interface{}{'new_val': []interface{}{'version'}, })") + // changefeeds/table.yaml line #97 + // vpluck = vtbl.changes().pluck({'new_val':['version']}) + suite.T().Log("Possibly executing: var vpluck r.Term = vtbl.Changes().Pluck(map[interface{}]interface{}{'new_val': []interface{}{'version'}, })") - vpluck := maybeRun(vtable_test_changefeed_table.Changes().Pluck(map[interface{}]interface{}{"new_val": []interface{}{"version"}}), suite.session, r.RunOpts{}) + vpluck := maybeRun(vtbl.Changes().Pluck(map[interface{}]interface{}{"new_val": []interface{}{"version"}}), suite.session, r.RunOpts{}) _ = vpluck // Prevent any noused variable errors { - // changefeeds/table.yaml line #96 + // changefeeds/table.yaml line #98 /* partial({'errors':0, 'inserted':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "inserted": 1}) - /* vtable_test_changefeed_table.insert([{'id':5, 'version':5}]) */ + /* vtbl.insert([{'id':5, 'version':5}]) */ - suite.T().Log("About to run line #96: vtable_test_changefeed_table.Insert([]interface{}{map[interface{}]interface{}{'id': 5, 'version': 5, }})") + suite.T().Log("About to run line #98: vtbl.Insert([]interface{}{map[interface{}]interface{}{'id': 5, 'version': 5, }})") - runAndAssert(suite.Suite, expected_, vtable_test_changefeed_table.Insert([]interface{}{map[interface{}]interface{}{"id": 5, "version": 5}}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, vtbl.Insert([]interface{}{map[interface{}]interface{}{"id": 5, "version": 5}}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #96") + suite.T().Log("Finished running line #98") } { - // changefeeds/table.yaml line #98 + // changefeeds/table.yaml line #100 /* [{'new_val':{'version':5}}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"version": 5}}} /* fetch(vpluck, 1) */ - suite.T().Log("About to run line #98: fetch(vpluck, 1)") + suite.T().Log("About to run line #100: fetch(vpluck, 1)") fetchAndAssert(suite.Suite, expected_, vpluck, 1) - suite.T().Log("Finished running line #98") + suite.T().Log("Finished running line #100") } } diff --git a/internal/integration/reql_tests/reql_control_test.go b/internal/integration/reql_tests/reql_control_test.go index ed15439c..aca50326 100644 --- a/internal/integration/reql_tests/reql_control_test.go +++ b/internal/integration/reql_tests/reql_control_test.go @@ -36,21 +36,21 @@ func (suite *ControlSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_control").Exec(suite.session) - err = r.DBCreate("db_control").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_control").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_control").TableDrop("table_test_control").Exec(suite.session) - err = r.DB("db_control").TableCreate("table_test_control").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_control").Table("table_test_control").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_control").TableDrop("table_test_control2").Exec(suite.session) - err = r.DB("db_control").TableCreate("table_test_control2").Exec(suite.session) + r.DB("test").TableDrop("tbl2").Exec(suite.session) + err = r.DB("test").TableCreate("tbl2").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_control").Table("table_test_control2").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl2").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -59,9 +59,9 @@ func (suite *ControlSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_control").TableDrop("table_test_control").Exec(suite.session) - r.DB("db_control").TableDrop("table_test_control2").Exec(suite.session) - r.DBDrop("db_control").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DB("test").TableDrop("tbl2").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -70,10 +70,10 @@ func (suite *ControlSuite) TearDownSuite() { func (suite *ControlSuite) TestCases() { suite.T().Log("Running ControlSuite: Tests RQL control flow structures") - table_test_control := r.DB("db_control").Table("table_test_control") - _ = table_test_control // Prevent any noused variable errors - table_test_control2 := r.DB("db_control").Table("table_test_control2") - _ = table_test_control2 // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors + tbl2 := r.DB("test").Table("tbl2") + _ = tbl2 // Prevent any noused variable errors { // control.yaml line #7 @@ -278,7 +278,7 @@ func (suite *ControlSuite) TestCases() { suite.T().Log("About to run line #93: r.Branch(r.DB('test'), 1, 2)") - runAndAssert(suite.Suite, expected_, r.Branch(r.DB("db_control"), 1, 2), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Branch(r.DB("test"), 1, 2), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -289,11 +289,11 @@ func (suite *ControlSuite) TestCases() { // control.yaml line #95 /* err("ReqlQueryLogicError", "Expected type DATUM but found TABLE:", []) */ var expected_ Err = err("ReqlQueryLogicError", "Expected type DATUM but found TABLE:") - /* r.branch(table_test_control, 1, 2) */ + /* r.branch(tbl, 1, 2) */ - suite.T().Log("About to run line #95: r.Branch(table_test_control, 1, 2)") + suite.T().Log("About to run line #95: r.Branch(tbl, 1, 2)") - runAndAssert(suite.Suite, expected_, r.Branch(table_test_control, 1, 2), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Branch(tbl, 1, 2), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -784,11 +784,11 @@ func (suite *ControlSuite) TestCases() { // control.yaml line #205 /* 0 */ var expected_ int = 0 - /* table_test_control.count() */ + /* tbl.count() */ - suite.T().Log("About to run line #205: table_test_control.Count()") + suite.T().Log("About to run line #205: tbl.Count()") - runAndAssert(suite.Suite, expected_, table_test_control.Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -799,11 +799,11 @@ func (suite *ControlSuite) TestCases() { // control.yaml line #210 /* ({'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':3}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 3} - /* r.expr([1, 2, 3]).for_each(lambda row:table_test_control.insert({ 'id':row })) */ + /* r.expr([1, 2, 3]).for_each(lambda row:tbl.insert({ 'id':row })) */ - suite.T().Log("About to run line #210: r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return table_test_control.Insert(map[interface{}]interface{}{'id': row, })})") + suite.T().Log("About to run line #210: r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return tbl.Insert(map[interface{}]interface{}{'id': row, })})") - runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return table_test_control.Insert(map[interface{}]interface{}{"id": row}) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return tbl.Insert(map[interface{}]interface{}{"id": row}) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -814,11 +814,11 @@ func (suite *ControlSuite) TestCases() { // control.yaml line #214 /* 3 */ var expected_ int = 3 - /* table_test_control.count() */ + /* tbl.count() */ - suite.T().Log("About to run line #214: table_test_control.Count()") + suite.T().Log("About to run line #214: tbl.Count()") - runAndAssert(suite.Suite, expected_, table_test_control.Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -829,13 +829,11 @@ func (suite *ControlSuite) TestCases() { // control.yaml line #219 /* ({'deleted':0.0,'replaced':9,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':0.0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 9, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* r.expr([1,2,3]).for_each(lambda row:table_test_control.update({'foo':row})) */ + /* r.expr([1,2,3]).for_each(lambda row:tbl.update({'foo':row})) */ - suite.T().Log("About to run line #219: r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return table_test_control.Update(map[interface{}]interface{}{'foo': row, })})") + suite.T().Log("About to run line #219: r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return tbl.Update(map[interface{}]interface{}{'foo': row, })})") - runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { - return table_test_control.Update(map[interface{}]interface{}{"foo": row}) - }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return tbl.Update(map[interface{}]interface{}{"foo": row}) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -846,12 +844,12 @@ func (suite *ControlSuite) TestCases() { // control.yaml line #225 /* {'first_error':"Duplicate primary key `id`:\n{\n\t\"foo\":\t3,\n\t\"id\":\t1\n}\n{\n\t\"id\":\t1\n}",'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':3,'skipped':0.0,'inserted':3} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"first_error": "Duplicate primary key `id`:\n{\n\t\"foo\":\t3,\n\t\"id\":\t1\n}\n{\n\t\"id\":\t1\n}", "deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 3, "skipped": 0.0, "inserted": 3} - /* r.expr([1,2,3]).for_each(lambda row:[table_test_control.insert({ 'id':row }), table_test_control.insert({ 'id':row*10 })]) */ + /* r.expr([1,2,3]).for_each(lambda row:[tbl.insert({ 'id':row }), tbl.insert({ 'id':row*10 })]) */ - suite.T().Log("About to run line #225: r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return []interface{}{table_test_control.Insert(map[interface{}]interface{}{'id': row, }), table_test_control.Insert(map[interface{}]interface{}{'id': r.Mul(row, 10), })}})") + suite.T().Log("About to run line #225: r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return []interface{}{tbl.Insert(map[interface{}]interface{}{'id': row, }), tbl.Insert(map[interface{}]interface{}{'id': r.Mul(row, 10), })}})") runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { - return []interface{}{table_test_control.Insert(map[interface{}]interface{}{"id": row}), table_test_control.Insert(map[interface{}]interface{}{"id": r.Mul(row, 10)})} + return []interface{}{tbl.Insert(map[interface{}]interface{}{"id": row}), tbl.Insert(map[interface{}]interface{}{"id": r.Mul(row, 10)})} }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", @@ -863,241 +861,249 @@ func (suite *ControlSuite) TestCases() { // control.yaml line #229 /* 6 */ var expected_ int = 6 - /* table_test_control.count() */ + /* tbl.count() */ - suite.T().Log("About to run line #229: table_test_control.Count()") + suite.T().Log("About to run line #229: tbl.Count()") - runAndAssert(suite.Suite, expected_, table_test_control.Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) suite.T().Log("Finished running line #229") } - { - // control.yaml line #232 - /* ({'deleted':0.0,'replaced':0.0,'generated_keys':arrlen(3,uuid()),'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':3}) */ - var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "generated_keys": arrlen(3, compare.IsUUID()), "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 3} - /* r.expr([1, 2, 3]).for_each( table_test_control2.insert({}) ) */ + // control.yaml line #232 + // tableCount = tbl2.count() + suite.T().Log("Possibly executing: var tableCount r.Term = tbl2.Count()") - suite.T().Log("About to run line #232: r.Expr([]interface{}{1, 2, 3}).ForEach(table_test_control2.Insert(map[interface{}]interface{}{}))") - - runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(table_test_control2.Insert(map[interface{}]interface{}{})), suite.session, r.RunOpts{ - GeometryFormat: "raw", - GroupFormat: "map", - }) - suite.T().Log("Finished running line #232") - } + tableCount := maybeRun(tbl2.Count(), suite.session, r.RunOpts{}) + _ = tableCount // Prevent any noused variable errors { - // control.yaml line #235 - /* 1 */ - var expected_ int = 1 - /* table_test_control2.count() */ + // control.yaml line #233 + /* ({'deleted':0.0,'replaced':0.0,'generated_keys':arrlen(3,uuid()),'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':3}) */ + var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "generated_keys": arrlen(3, compare.IsUUID()), "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 3} + /* r.expr([1, 2, 3]).for_each( tbl2.insert({}) ) */ - suite.T().Log("About to run line #235: table_test_control2.Count()") + suite.T().Log("About to run line #233: r.Expr([]interface{}{1, 2, 3}).ForEach(tbl2.Insert(map[interface{}]interface{}{}))") - runAndAssert(suite.Suite, expected_, table_test_control2.Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(tbl2.Insert(map[interface{}]interface{}{})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #235") + suite.T().Log("Finished running line #233") } { - // control.yaml line #240 + // control.yaml line #241 /* ({'deleted':0.0,'replaced':36,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':0.0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 36, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* r.expr([1,2,3]).for_each(lambda row:[table_test_control.update({'foo':row}), table_test_control.update({'bar':row})]) */ + /* r.expr([1,2,3]).for_each(lambda row:[tbl.update({'foo':row}), tbl.update({'bar':row})]) */ - suite.T().Log("About to run line #240: r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return []interface{}{table_test_control.Update(map[interface{}]interface{}{'foo': row, }), table_test_control.Update(map[interface{}]interface{}{'bar': row, })}})") + suite.T().Log("About to run line #241: r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return []interface{}{tbl.Update(map[interface{}]interface{}{'foo': row, }), tbl.Update(map[interface{}]interface{}{'bar': row, })}})") runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { - return []interface{}{table_test_control.Update(map[interface{}]interface{}{"foo": row}), table_test_control.Update(map[interface{}]interface{}{"bar": row})} + return []interface{}{tbl.Update(map[interface{}]interface{}{"foo": row}), tbl.Update(map[interface{}]interface{}{"bar": row})} }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #240") + suite.T().Log("Finished running line #241") } { - // control.yaml line #245 + // control.yaml line #246 /* ({'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':3}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 3} - /* r.expr([1, 2, 3]).for_each( table_test_control2.insert({ 'id':r.row }) ) */ + /* r.expr([1, 2, 3]).for_each( tbl2.insert({ 'id':r.row }) ) */ - suite.T().Log("About to run line #245: r.Expr([]interface{}{1, 2, 3}).ForEach(table_test_control2.Insert(map[interface{}]interface{}{'id': r.Row, }))") + suite.T().Log("About to run line #246: r.Expr([]interface{}{1, 2, 3}).ForEach(tbl2.Insert(map[interface{}]interface{}{'id': r.Row, }))") - runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(table_test_control2.Insert(map[interface{}]interface{}{"id": r.Row})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(tbl2.Insert(map[interface{}]interface{}{"id": r.Row})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #245") + suite.T().Log("Finished running line #246") } { - // control.yaml line #249 + // control.yaml line #250 /* err("ReqlQueryLogicError", "FOR_EACH expects one or more basic write queries. Expected type ARRAY but found NUMBER.", [0]) */ var expected_ Err = err("ReqlQueryLogicError", "FOR_EACH expects one or more basic write queries. Expected type ARRAY but found NUMBER.") /* r.expr([1, 2, 3]).for_each(1) */ - suite.T().Log("About to run line #249: r.Expr([]interface{}{1, 2, 3}).ForEach(1)") + suite.T().Log("About to run line #250: r.Expr([]interface{}{1, 2, 3}).ForEach(1)") runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(1), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #249") + suite.T().Log("Finished running line #250") } { - // control.yaml line #252 + // control.yaml line #253 /* err("ReqlQueryLogicError", "FOR_EACH expects one or more basic write queries. Expected type ARRAY but found NUMBER.", [1, 1]) */ var expected_ Err = err("ReqlQueryLogicError", "FOR_EACH expects one or more basic write queries. Expected type ARRAY but found NUMBER.") /* r.expr([1, 2, 3]).for_each(lambda x:x) */ - suite.T().Log("About to run line #252: r.Expr([]interface{}{1, 2, 3}).ForEach(func(x r.Term) interface{} { return x})") + suite.T().Log("About to run line #253: r.Expr([]interface{}{1, 2, 3}).ForEach(func(x r.Term) interface{} { return x})") runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(func(x r.Term) interface{} { return x }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #252") + suite.T().Log("Finished running line #253") } { - // control.yaml line #257 + // control.yaml line #258 /* err("ReqlQueryLogicError", "FOR_EACH expects one or more basic write queries. Expected type ARRAY but found NUMBER.", [1, 1]) */ var expected_ Err = err("ReqlQueryLogicError", "FOR_EACH expects one or more basic write queries. Expected type ARRAY but found NUMBER.") /* r.expr([1, 2, 3]).for_each(r.row) */ - suite.T().Log("About to run line #257: r.Expr([]interface{}{1, 2, 3}).ForEach(r.Row)") + suite.T().Log("About to run line #258: r.Expr([]interface{}{1, 2, 3}).ForEach(r.Row)") runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(r.Row), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #257") + suite.T().Log("Finished running line #258") } { - // control.yaml line #262 + // control.yaml line #263 /* err("ReqlQueryLogicError", "FOR_EACH expects one or more basic write queries.", [1, 1]) */ var expected_ Err = err("ReqlQueryLogicError", "FOR_EACH expects one or more basic write queries.") - /* r.expr([1, 2, 3]).for_each(lambda row:table_test_control) */ + /* r.expr([1, 2, 3]).for_each(lambda row:tbl) */ - suite.T().Log("About to run line #262: r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return table_test_control})") + suite.T().Log("About to run line #263: r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return tbl})") - runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return table_test_control }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(func(row r.Term) interface{} { return tbl }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #262") + suite.T().Log("Finished running line #263") } { - // control.yaml line #271 + // control.yaml line #272 /* ({'deleted':0.0,'replaced':0.0,'generated_keys':arrlen(1,uuid()),'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':1}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "generated_keys": arrlen(1, compare.IsUUID()), "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 1} - /* r.expr(1).do(table_test_control.insert({'foo':r.row})) */ + /* r.expr(1).do(tbl.insert({'foo':r.row})) */ - suite.T().Log("About to run line #271: r.Expr(1).Do(table_test_control.Insert(map[interface{}]interface{}{'foo': r.Row, }))") + suite.T().Log("About to run line #272: r.Expr(1).Do(tbl.Insert(map[interface{}]interface{}{'foo': r.Row, }))") - runAndAssert(suite.Suite, expected_, r.Expr(1).Do(table_test_control.Insert(map[interface{}]interface{}{"foo": r.Row})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Expr(1).Do(tbl.Insert(map[interface{}]interface{}{"foo": r.Row})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #271") + suite.T().Log("Finished running line #272") } { - // control.yaml line #275 + // control.yaml line #276 /* ({'deleted':0.0,'replaced':0.0,'generated_keys':arrlen(1,uuid()),'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':1}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "generated_keys": arrlen(1, compare.IsUUID()), "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 1} - /* r.expr([1, 2])[0].do(table_test_control.insert({'foo':r.row})) */ + /* r.expr([1, 2])[0].do(tbl.insert({'foo':r.row})) */ - suite.T().Log("About to run line #275: r.Expr([]interface{}{1, 2}).AtIndex(0).Do(table_test_control.Insert(map[interface{}]interface{}{'foo': r.Row, }))") + suite.T().Log("About to run line #276: r.Expr([]interface{}{1, 2}).AtIndex(0).Do(tbl.Insert(map[interface{}]interface{}{'foo': r.Row, }))") - runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2}).AtIndex(0).Do(table_test_control.Insert(map[interface{}]interface{}{"foo": r.Row})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2}).AtIndex(0).Do(tbl.Insert(map[interface{}]interface{}{"foo": r.Row})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #275") + suite.T().Log("Finished running line #276") } { - // control.yaml line #280 + // control.yaml line #281 /* err('ReqlCompileError', 'Cannot nest writes or meta ops in stream operations. Use FOR_EACH instead.', [0]) */ var expected_ Err = err("ReqlCompileError", "Cannot nest writes or meta ops in stream operations. Use FOR_EACH instead.") - /* r.expr([1, 2]).map(table_test_control.insert({'foo':r.row})) */ + /* r.expr([1, 2]).map(tbl.insert({'foo':r.row})) */ - suite.T().Log("About to run line #280: r.Expr([]interface{}{1, 2}).Map(table_test_control.Insert(map[interface{}]interface{}{'foo': r.Row, }))") + suite.T().Log("About to run line #281: r.Expr([]interface{}{1, 2}).Map(tbl.Insert(map[interface{}]interface{}{'foo': r.Row, }))") - runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2}).Map(table_test_control.Insert(map[interface{}]interface{}{"foo": r.Row})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2}).Map(tbl.Insert(map[interface{}]interface{}{"foo": r.Row})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #280") + suite.T().Log("Finished running line #281") } { - // control.yaml line #284 + // control.yaml line #285 /* err('ReqlCompileError', 'Cannot nest writes or meta ops in stream operations. Use FOR_EACH instead.', [0]) */ var expected_ Err = err("ReqlCompileError", "Cannot nest writes or meta ops in stream operations. Use FOR_EACH instead.") /* r.expr([1, 2]).map(r.db('test').table_create('table_create_failure')) */ - suite.T().Log("About to run line #284: r.Expr([]interface{}{1, 2}).Map(r.DB('test').TableCreate('table_create_failure'))") + suite.T().Log("About to run line #285: r.Expr([]interface{}{1, 2}).Map(r.DB('test').TableCreate('table_create_failure'))") - runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2}).Map(r.DB("db_control").TableCreate("table_create_failure")), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2}).Map(r.DB("test").TableCreate("table_create_failure")), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #284") + suite.T().Log("Finished running line #285") } { - // control.yaml line #287 + // control.yaml line #288 /* err('ReqlCompileError', 'Cannot nest writes or meta ops in stream operations. Use FOR_EACH instead.', [0]) */ var expected_ Err = err("ReqlCompileError", "Cannot nest writes or meta ops in stream operations. Use FOR_EACH instead.") - /* r.expr([1, 2]).map(table_test_control.insert({'foo':r.row}).get_field('inserted')) */ + /* r.expr([1, 2]).map(tbl.insert({'foo':r.row}).get_field('inserted')) */ - suite.T().Log("About to run line #287: r.Expr([]interface{}{1, 2}).Map(table_test_control.Insert(map[interface{}]interface{}{'foo': r.Row, }).Field('inserted'))") + suite.T().Log("About to run line #288: r.Expr([]interface{}{1, 2}).Map(tbl.Insert(map[interface{}]interface{}{'foo': r.Row, }).Field('inserted'))") - runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2}).Map(table_test_control.Insert(map[interface{}]interface{}{"foo": r.Row}).Field("inserted")), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2}).Map(tbl.Insert(map[interface{}]interface{}{"foo": r.Row}).Field("inserted")), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #287") + suite.T().Log("Finished running line #288") } { - // control.yaml line #291 + // control.yaml line #292 /* err('ReqlCompileError', 'Cannot nest writes or meta ops in stream operations. Use FOR_EACH instead.', [0]) */ var expected_ Err = err("ReqlCompileError", "Cannot nest writes or meta ops in stream operations. Use FOR_EACH instead.") - /* r.expr([1, 2]).map(table_test_control.insert({'foo':r.row}).get_field('inserted').add(5)) */ + /* r.expr([1, 2]).map(tbl.insert({'foo':r.row}).get_field('inserted').add(5)) */ - suite.T().Log("About to run line #291: r.Expr([]interface{}{1, 2}).Map(table_test_control.Insert(map[interface{}]interface{}{'foo': r.Row, }).Field('inserted').Add(5))") + suite.T().Log("About to run line #292: r.Expr([]interface{}{1, 2}).Map(tbl.Insert(map[interface{}]interface{}{'foo': r.Row, }).Field('inserted').Add(5))") - runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2}).Map(table_test_control.Insert(map[interface{}]interface{}{"foo": r.Row}).Field("inserted").Add(5)), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2}).Map(tbl.Insert(map[interface{}]interface{}{"foo": r.Row}).Field("inserted").Add(5)), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #291") + suite.T().Log("Finished running line #292") } { - // control.yaml line #295 + // control.yaml line #296 /* partial({'tables_created':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"tables_created": 1}) /* r.expr(1).do(r.db('test').table_create('table_create_success')) */ - suite.T().Log("About to run line #295: r.Expr(1).Do(r.DB('test').TableCreate('table_create_success'))") + suite.T().Log("About to run line #296: r.Expr(1).Do(r.DB('test').TableCreate('table_create_success'))") + + runAndAssert(suite.Suite, expected_, r.Expr(1).Do(r.DB("test").TableCreate("table_create_success")), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #296") + } + + { + // control.yaml line #300 + /* [1, 2] */ + var expected_ []interface{} = []interface{}{1, 2} + /* r.expr([1, 2]) */ + + suite.T().Log("About to run line #300: r.Expr([]interface{}{1, 2})") - runAndAssert(suite.Suite, expected_, r.Expr(1).Do(r.DB("db_control").TableCreate("table_create_success")), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", + ReadMode: []interface{}{"a", "b"}, }) - suite.T().Log("Finished running line #295") + suite.T().Log("Finished running line #300") } } diff --git a/internal/integration/reql_tests/reql_datum_array_test.go b/internal/integration/reql_tests/reql_datum_array_test.go index 07e58ee2..3960f484 100644 --- a/internal/integration/reql_tests/reql_datum_array_test.go +++ b/internal/integration/reql_tests/reql_datum_array_test.go @@ -36,10 +36,10 @@ func (suite *DatumArraySuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_darray").Exec(suite.session) - err = r.DBCreate("db_darray").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_darray").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *DatumArraySuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_darray").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_datum_binary_test.go b/internal/integration/reql_tests/reql_datum_binary_test.go index 8ab6b1b0..98f93ad1 100644 --- a/internal/integration/reql_tests/reql_datum_binary_test.go +++ b/internal/integration/reql_tests/reql_datum_binary_test.go @@ -36,10 +36,10 @@ func (suite *DatumBinarySuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_dbin").Exec(suite.session) - err = r.DBCreate("db_dbin").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_dbin").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *DatumBinarySuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_dbin").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_datum_bool_test.go b/internal/integration/reql_tests/reql_datum_bool_test.go index aafa24a1..0d17f56d 100644 --- a/internal/integration/reql_tests/reql_datum_bool_test.go +++ b/internal/integration/reql_tests/reql_datum_bool_test.go @@ -36,10 +36,10 @@ func (suite *DatumBoolSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_dbool").Exec(suite.session) - err = r.DBCreate("db_dbool").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_dbool").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *DatumBoolSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_dbool").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_datum_null_test.go b/internal/integration/reql_tests/reql_datum_null_test.go index 8ab92929..183aa740 100644 --- a/internal/integration/reql_tests/reql_datum_null_test.go +++ b/internal/integration/reql_tests/reql_datum_null_test.go @@ -36,10 +36,10 @@ func (suite *DatumNullSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_dnull").Exec(suite.session) - err = r.DBCreate("db_dnull").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_dnull").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *DatumNullSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_dnull").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_datum_number_test.go b/internal/integration/reql_tests/reql_datum_number_test.go index 3864b891..ab7b4ee2 100644 --- a/internal/integration/reql_tests/reql_datum_number_test.go +++ b/internal/integration/reql_tests/reql_datum_number_test.go @@ -36,10 +36,10 @@ func (suite *DatumNumberSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_dnum").Exec(suite.session) - err = r.DBCreate("db_dnum").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_dnum").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *DatumNumberSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_dnum").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_datum_object_test.go b/internal/integration/reql_tests/reql_datum_object_test.go index 47e2aea9..427939da 100644 --- a/internal/integration/reql_tests/reql_datum_object_test.go +++ b/internal/integration/reql_tests/reql_datum_object_test.go @@ -36,10 +36,10 @@ func (suite *DatumObjectSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_dobj").Exec(suite.session) - err = r.DBCreate("db_dobj").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_dobj").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *DatumObjectSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_dobj").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -291,7 +291,7 @@ func (suite *DatumObjectSuite) TestCases() { suite.T().Log("About to run line #84: r.Object('g', r.DB('test'))") - runAndAssert(suite.Suite, expected_, r.Object("g", r.DB("db_dobj")), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Object("g", r.DB("test")), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_datum_string_test.go b/internal/integration/reql_tests/reql_datum_string_test.go index 00060396..fe9d21ad 100644 --- a/internal/integration/reql_tests/reql_datum_string_test.go +++ b/internal/integration/reql_tests/reql_datum_string_test.go @@ -36,10 +36,10 @@ func (suite *DatumStringSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_dstr").Exec(suite.session) - err = r.DBCreate("db_dstr").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_dstr").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *DatumStringSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_dstr").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_datum_typeof_test.go b/internal/integration/reql_tests/reql_datum_typeof_test.go index 1350c85a..e2c61239 100644 --- a/internal/integration/reql_tests/reql_datum_typeof_test.go +++ b/internal/integration/reql_tests/reql_datum_typeof_test.go @@ -36,10 +36,10 @@ func (suite *DatumTypeofSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_dtype").Exec(suite.session) - err = r.DBCreate("db_dtype").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_dtype").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *DatumTypeofSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_dtype").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_datum_uuid_test.go b/internal/integration/reql_tests/reql_datum_uuid_test.go index d690c915..5a477199 100644 --- a/internal/integration/reql_tests/reql_datum_uuid_test.go +++ b/internal/integration/reql_tests/reql_datum_uuid_test.go @@ -36,10 +36,10 @@ func (suite *DatumUuidSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_duuid").Exec(suite.session) - err = r.DBCreate("db_duuid").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_duuid").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *DatumUuidSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_duuid").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_default_test.go b/internal/integration/reql_tests/reql_default_test.go index 53ed772f..bb48c41d 100644 --- a/internal/integration/reql_tests/reql_default_test.go +++ b/internal/integration/reql_tests/reql_default_test.go @@ -36,10 +36,10 @@ func (suite *DefaultSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_def").Exec(suite.session) - err = r.DBCreate("db_def").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_def").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *DefaultSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_def").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_geo_constructors_test.go b/internal/integration/reql_tests/reql_geo_constructors_test.go index 9679054f..dcba4f41 100644 --- a/internal/integration/reql_tests/reql_geo_constructors_test.go +++ b/internal/integration/reql_tests/reql_geo_constructors_test.go @@ -36,10 +36,10 @@ func (suite *GeoConstructorsSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_geoc").Exec(suite.session) - err = r.DBCreate("db_geoc").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_geoc").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *GeoConstructorsSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_geoc").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_geo_geojson_test.go b/internal/integration/reql_tests/reql_geo_geojson_test.go index 4d7a022e..41dc160b 100644 --- a/internal/integration/reql_tests/reql_geo_geojson_test.go +++ b/internal/integration/reql_tests/reql_geo_geojson_test.go @@ -36,10 +36,10 @@ func (suite *GeoGeojsonSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_geoj").Exec(suite.session) - err = r.DBCreate("db_geoj").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_geoj").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *GeoGeojsonSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_geoj").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_geo_indexing_test.go b/internal/integration/reql_tests/reql_geo_indexing_test.go index 503886fd..834bf3ad 100644 --- a/internal/integration/reql_tests/reql_geo_indexing_test.go +++ b/internal/integration/reql_tests/reql_geo_indexing_test.go @@ -36,16 +36,16 @@ func (suite *GeoIndexingSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_geo_index").Exec(suite.session) - err = r.DBCreate("db_geo_index").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_geo_index").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_geo_index").TableDrop("table_test_indexing").Exec(suite.session) - err = r.DB("db_geo_index").TableCreate("table_test_indexing").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_geo_index").Table("table_test_indexing").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -54,8 +54,8 @@ func (suite *GeoIndexingSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_geo_index").TableDrop("table_test_indexing").Exec(suite.session) - r.DBDrop("db_geo_index").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -64,8 +64,8 @@ func (suite *GeoIndexingSuite) TearDownSuite() { func (suite *GeoIndexingSuite) TestCases() { suite.T().Log("Running GeoIndexingSuite: Test ReQL interface to geo indexes") - table_test_indexing := r.DB("db_geo_index").Table("table_test_indexing") - _ = table_test_indexing // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors // geo/indexing.yaml line #4 // rows = [{'id':0, 'g':r.point(10,10), 'm':[r.point(0,0),r.point(1,0),r.point(2,0)]},{'id':1, 'g':r.polygon([0,0], [0,1], [1,1], [1,0])},{'id':2, 'g':r.line([0.000002,-1], [-0.000001,1])}] @@ -78,11 +78,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #8 /* ({'deleted':0,'inserted':3,'skipped':0,'errors':0,'replaced':0,'unchanged':0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "inserted": 3, "skipped": 0, "errors": 0, "replaced": 0, "unchanged": 0} - /* table_test_indexing.insert(rows) */ + /* tbl.insert(rows) */ - suite.T().Log("About to run line #8: table_test_indexing.Insert(rows)") + suite.T().Log("About to run line #8: tbl.Insert(rows)") - runAndAssert(suite.Suite, expected_, table_test_indexing.Insert(rows), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(rows), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -93,11 +93,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #12 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_indexing.index_create('g', geo=true) */ + /* tbl.index_create('g', geo=true) */ - suite.T().Log("About to run line #12: table_test_indexing.IndexCreate('g').OptArgs(r.IndexCreateOpts{Geo: true, })") + suite.T().Log("About to run line #12: tbl.IndexCreate('g').OptArgs(r.IndexCreateOpts{Geo: true, })") - runAndAssert(suite.Suite, expected_, table_test_indexing.IndexCreate("g").OptArgs(r.IndexCreateOpts{Geo: true}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreate("g").OptArgs(r.IndexCreateOpts{Geo: true}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -108,11 +108,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #16 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_indexing.index_create('m', geo=true, multi=true) */ + /* tbl.index_create('m', geo=true, multi=true) */ - suite.T().Log("About to run line #16: table_test_indexing.IndexCreate('m').OptArgs(r.IndexCreateOpts{Geo: true, Multi: true, })") + suite.T().Log("About to run line #16: tbl.IndexCreate('m').OptArgs(r.IndexCreateOpts{Geo: true, Multi: true, })") - runAndAssert(suite.Suite, expected_, table_test_indexing.IndexCreate("m").OptArgs(r.IndexCreateOpts{Geo: true, Multi: true}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreate("m").OptArgs(r.IndexCreateOpts{Geo: true, Multi: true}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -123,11 +123,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #19 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_indexing.index_create('other') */ + /* tbl.index_create('other') */ - suite.T().Log("About to run line #19: table_test_indexing.IndexCreate('other')") + suite.T().Log("About to run line #19: tbl.IndexCreate('other')") - runAndAssert(suite.Suite, expected_, table_test_indexing.IndexCreate("other"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreate("other"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -138,11 +138,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #23 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_indexing.index_create('point_det', lambda x: r.point(x, x) ) */ + /* tbl.index_create('point_det', lambda x: r.point(x, x) ) */ - suite.T().Log("About to run line #23: table_test_indexing.IndexCreateFunc('point_det', func(x r.Term) interface{} { return r.Point(x, x)})") + suite.T().Log("About to run line #23: tbl.IndexCreateFunc('point_det', func(x r.Term) interface{} { return r.Point(x, x)})") - runAndAssert(suite.Suite, expected_, table_test_indexing.IndexCreateFunc("point_det", func(x r.Term) interface{} { return r.Point(x, x) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("point_det", func(x r.Term) interface{} { return r.Point(x, x) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -153,11 +153,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #27 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_indexing.index_wait() */ + /* tbl.index_wait() */ - suite.T().Log("About to run line #27: table_test_indexing.IndexWait()") + suite.T().Log("About to run line #27: tbl.IndexWait()") - runAndAssert(suite.Suite, expected_, table_test_indexing.IndexWait(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexWait(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -168,11 +168,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #32 /* err('ReqlQueryLogicError', 'Could not prove function deterministic. Index functions must be deterministic.') */ var expected_ Err = err("ReqlQueryLogicError", "Could not prove function deterministic. Index functions must be deterministic.") - /* table_test_indexing.index_create('point_det', lambda x: r.line(x, x) ) */ + /* tbl.index_create('point_det', lambda x: r.line(x, x) ) */ - suite.T().Log("About to run line #32: table_test_indexing.IndexCreateFunc('point_det', func(x r.Term) interface{} { return r.Line(x, x)})") + suite.T().Log("About to run line #32: tbl.IndexCreateFunc('point_det', func(x r.Term) interface{} { return r.Line(x, x)})") - runAndAssert(suite.Suite, expected_, table_test_indexing.IndexCreateFunc("point_det", func(x r.Term) interface{} { return r.Line(x, x) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("point_det", func(x r.Term) interface{} { return r.Line(x, x) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -183,11 +183,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #37 /* err('ReqlQueryLogicError', 'Index `other` is not a geospatial index. get_intersecting can only be used with a geospatial index.', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Index `other` is not a geospatial index. get_intersecting can only be used with a geospatial index.") - /* table_test_indexing.get_intersecting(r.point(0,0), index='other').count() */ + /* tbl.get_intersecting(r.point(0,0), index='other').count() */ - suite.T().Log("About to run line #37: table_test_indexing.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: 'other', }).Count()") + suite.T().Log("About to run line #37: tbl.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: 'other', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: "other"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: "other"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -198,11 +198,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #41 /* err_regex('ReqlOpFailedError', 'Index `missing` was not found on table `[a-zA-Z0-9_]+.[a-zA-Z0-9_]+`[.]', [0]) */ var expected_ Err = err_regex("ReqlOpFailedError", "Index `missing` was not found on table `[a-zA-Z0-9_]+.[a-zA-Z0-9_]+`[.]") - /* table_test_indexing.get_intersecting(r.point(0,0), index='missing').count() */ + /* tbl.get_intersecting(r.point(0,0), index='missing').count() */ - suite.T().Log("About to run line #41: table_test_indexing.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: 'missing', }).Count()") + suite.T().Log("About to run line #41: tbl.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: 'missing', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: "missing"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: "missing"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -213,11 +213,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #44 /* err('ReqlQueryLogicError', 'get_intersecting requires an index argument.', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "get_intersecting requires an index argument.") - /* table_test_indexing.get_intersecting(r.point(0,0)).count() */ + /* tbl.get_intersecting(r.point(0,0)).count() */ - suite.T().Log("About to run line #44: table_test_indexing.GetIntersecting(r.Point(0, 0)).Count()") + suite.T().Log("About to run line #44: tbl.GetIntersecting(r.Point(0, 0)).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Point(0, 0)).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Point(0, 0)).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -228,11 +228,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #47 /* err('ReqlQueryLogicError', 'Index `g` is a geospatial index. Only get_nearest and get_intersecting can use a geospatial index.', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Index `g` is a geospatial index. Only get_nearest and get_intersecting can use a geospatial index.") - /* table_test_indexing.get_all(0, index='g').count() */ + /* tbl.get_all(0, index='g').count() */ - suite.T().Log("About to run line #47: table_test_indexing.GetAll(0).OptArgs(r.GetAllOpts{Index: 'g', }).Count()") + suite.T().Log("About to run line #47: tbl.GetAll(0).OptArgs(r.GetAllOpts{Index: 'g', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetAll(0).OptArgs(r.GetAllOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(0).OptArgs(r.GetAllOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -243,11 +243,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #51 /* err('ReqlQueryLogicError', 'Index `g` is a geospatial index. Only get_nearest and get_intersecting can use a geospatial index.', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Index `g` is a geospatial index. Only get_nearest and get_intersecting can use a geospatial index.") - /* table_test_indexing.between(0, 1, index='g').count() */ + /* tbl.between(0, 1, index='g').count() */ - suite.T().Log("About to run line #51: table_test_indexing.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'g', }).Count()") + suite.T().Log("About to run line #51: tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'g', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.Between(0, 1).OptArgs(r.BetweenOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -258,11 +258,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #55 /* err('ReqlQueryLogicError', 'Index `g` is a geospatial index. Only get_nearest and get_intersecting can use a geospatial index.', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Index `g` is a geospatial index. Only get_nearest and get_intersecting can use a geospatial index.") - /* table_test_indexing.order_by(index='g').count() */ + /* tbl.order_by(index='g').count() */ - suite.T().Log("About to run line #55: table_test_indexing.OrderBy().OptArgs(r.OrderByOpts{Index: 'g', }).Count()") + suite.T().Log("About to run line #55: tbl.OrderBy().OptArgs(r.OrderByOpts{Index: 'g', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.OrderBy().OptArgs(r.OrderByOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.OrderBy().OptArgs(r.OrderByOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -273,11 +273,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #77 /* err('ReqlQueryLogicError', 'get_intersecting cannot use the primary index.', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "get_intersecting cannot use the primary index.") - /* table_test_indexing.get_intersecting(r.point(0,0), index='id').count() */ + /* tbl.get_intersecting(r.point(0,0), index='id').count() */ - suite.T().Log("About to run line #77: table_test_indexing.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: 'id', }).Count()") + suite.T().Log("About to run line #77: tbl.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: 'id', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -288,11 +288,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #82 /* 1 */ var expected_ int = 1 - /* table_test_indexing.get_intersecting(r.point(0,0), index='g').count() */ + /* tbl.get_intersecting(r.point(0,0), index='g').count() */ - suite.T().Log("About to run line #82: table_test_indexing.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: 'g', }).Count()") + suite.T().Log("About to run line #82: tbl.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: 'g', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -303,11 +303,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #86 /* 1 */ var expected_ int = 1 - /* table_test_indexing.get_intersecting(r.point(10,10), index='g').count() */ + /* tbl.get_intersecting(r.point(10,10), index='g').count() */ - suite.T().Log("About to run line #86: table_test_indexing.GetIntersecting(r.Point(10, 10)).OptArgs(r.GetIntersectingOpts{Index: 'g', }).Count()") + suite.T().Log("About to run line #86: tbl.GetIntersecting(r.Point(10, 10)).OptArgs(r.GetIntersectingOpts{Index: 'g', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Point(10, 10)).OptArgs(r.GetIntersectingOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Point(10, 10)).OptArgs(r.GetIntersectingOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -318,11 +318,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #90 /* 1 */ var expected_ int = 1 - /* table_test_indexing.get_intersecting(r.point(0.5,0.5), index='g').count() */ + /* tbl.get_intersecting(r.point(0.5,0.5), index='g').count() */ - suite.T().Log("About to run line #90: table_test_indexing.GetIntersecting(r.Point(0.5, 0.5)).OptArgs(r.GetIntersectingOpts{Index: 'g', }).Count()") + suite.T().Log("About to run line #90: tbl.GetIntersecting(r.Point(0.5, 0.5)).OptArgs(r.GetIntersectingOpts{Index: 'g', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Point(0.5, 0.5)).OptArgs(r.GetIntersectingOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Point(0.5, 0.5)).OptArgs(r.GetIntersectingOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -333,11 +333,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #94 /* 0 */ var expected_ int = 0 - /* table_test_indexing.get_intersecting(r.point(20,20), index='g').count() */ + /* tbl.get_intersecting(r.point(20,20), index='g').count() */ - suite.T().Log("About to run line #94: table_test_indexing.GetIntersecting(r.Point(20, 20)).OptArgs(r.GetIntersectingOpts{Index: 'g', }).Count()") + suite.T().Log("About to run line #94: tbl.GetIntersecting(r.Point(20, 20)).OptArgs(r.GetIntersectingOpts{Index: 'g', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Point(20, 20)).OptArgs(r.GetIntersectingOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Point(20, 20)).OptArgs(r.GetIntersectingOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -348,11 +348,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #98 /* 2 */ var expected_ int = 2 - /* table_test_indexing.get_intersecting(r.polygon([0,0], [1,0], [1,1], [0,1]), index='g').count() */ + /* tbl.get_intersecting(r.polygon([0,0], [1,0], [1,1], [0,1]), index='g').count() */ - suite.T().Log("About to run line #98: table_test_indexing.GetIntersecting(r.Polygon([]interface{}{0, 0}, []interface{}{1, 0}, []interface{}{1, 1}, []interface{}{0, 1})).OptArgs(r.GetIntersectingOpts{Index: 'g', }).Count()") + suite.T().Log("About to run line #98: tbl.GetIntersecting(r.Polygon([]interface{}{0, 0}, []interface{}{1, 0}, []interface{}{1, 1}, []interface{}{0, 1})).OptArgs(r.GetIntersectingOpts{Index: 'g', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Polygon([]interface{}{0, 0}, []interface{}{1, 0}, []interface{}{1, 1}, []interface{}{0, 1})).OptArgs(r.GetIntersectingOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Polygon([]interface{}{0, 0}, []interface{}{1, 0}, []interface{}{1, 1}, []interface{}{0, 1})).OptArgs(r.GetIntersectingOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -363,11 +363,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #102 /* 3 */ var expected_ int = 3 - /* table_test_indexing.get_intersecting(r.line([0,0], [10,10]), index='g').count() */ + /* tbl.get_intersecting(r.line([0,0], [10,10]), index='g').count() */ - suite.T().Log("About to run line #102: table_test_indexing.GetIntersecting(r.Line([]interface{}{0, 0}, []interface{}{10, 10})).OptArgs(r.GetIntersectingOpts{Index: 'g', }).Count()") + suite.T().Log("About to run line #102: tbl.GetIntersecting(r.Line([]interface{}{0, 0}, []interface{}{10, 10})).OptArgs(r.GetIntersectingOpts{Index: 'g', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Line([]interface{}{0, 0}, []interface{}{10, 10})).OptArgs(r.GetIntersectingOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Line([]interface{}{0, 0}, []interface{}{10, 10})).OptArgs(r.GetIntersectingOpts{Index: "g"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -378,11 +378,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #106 /* ("SELECTION") */ var expected_ string = "SELECTION" - /* table_test_indexing.get_intersecting(r.point(0,0), index='g').type_of() */ + /* tbl.get_intersecting(r.point(0,0), index='g').type_of() */ - suite.T().Log("About to run line #106: table_test_indexing.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: 'g', }).TypeOf()") + suite.T().Log("About to run line #106: tbl.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: 'g', }).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: "g"}).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: "g"}).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -393,11 +393,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #110 /* ("SELECTION") */ var expected_ string = "SELECTION" - /* table_test_indexing.get_intersecting(r.point(0,0), index='g').filter(true).type_of() */ + /* tbl.get_intersecting(r.point(0,0), index='g').filter(true).type_of() */ - suite.T().Log("About to run line #110: table_test_indexing.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: 'g', }).Filter(true).TypeOf()") + suite.T().Log("About to run line #110: tbl.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: 'g', }).Filter(true).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: "g"}).Filter(true).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: "g"}).Filter(true).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -408,11 +408,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #114 /* ("STREAM") */ var expected_ string = "STREAM" - /* table_test_indexing.get_intersecting(r.point(0,0), index='g').map(r.row).type_of() */ + /* tbl.get_intersecting(r.point(0,0), index='g').map(r.row).type_of() */ - suite.T().Log("About to run line #114: table_test_indexing.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: 'g', }).Map(r.Row).TypeOf()") + suite.T().Log("About to run line #114: tbl.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: 'g', }).Map(r.Row).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: "g"}).Map(r.Row).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: "g"}).Map(r.Row).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -423,11 +423,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #119 /* 1 */ var expected_ int = 1 - /* table_test_indexing.get_intersecting(r.point(0,0), index='m').count() */ + /* tbl.get_intersecting(r.point(0,0), index='m').count() */ - suite.T().Log("About to run line #119: table_test_indexing.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: 'm', }).Count()") + suite.T().Log("About to run line #119: tbl.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: 'm', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: "m"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Point(0, 0)).OptArgs(r.GetIntersectingOpts{Index: "m"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -438,11 +438,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #123 /* 1 */ var expected_ int = 1 - /* table_test_indexing.get_intersecting(r.point(1,0), index='m').count() */ + /* tbl.get_intersecting(r.point(1,0), index='m').count() */ - suite.T().Log("About to run line #123: table_test_indexing.GetIntersecting(r.Point(1, 0)).OptArgs(r.GetIntersectingOpts{Index: 'm', }).Count()") + suite.T().Log("About to run line #123: tbl.GetIntersecting(r.Point(1, 0)).OptArgs(r.GetIntersectingOpts{Index: 'm', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Point(1, 0)).OptArgs(r.GetIntersectingOpts{Index: "m"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Point(1, 0)).OptArgs(r.GetIntersectingOpts{Index: "m"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -453,11 +453,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #127 /* 1 */ var expected_ int = 1 - /* table_test_indexing.get_intersecting(r.point(2,0), index='m').count() */ + /* tbl.get_intersecting(r.point(2,0), index='m').count() */ - suite.T().Log("About to run line #127: table_test_indexing.GetIntersecting(r.Point(2, 0)).OptArgs(r.GetIntersectingOpts{Index: 'm', }).Count()") + suite.T().Log("About to run line #127: tbl.GetIntersecting(r.Point(2, 0)).OptArgs(r.GetIntersectingOpts{Index: 'm', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Point(2, 0)).OptArgs(r.GetIntersectingOpts{Index: "m"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Point(2, 0)).OptArgs(r.GetIntersectingOpts{Index: "m"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -468,11 +468,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #131 /* 0 */ var expected_ int = 0 - /* table_test_indexing.get_intersecting(r.point(3,0), index='m').count() */ + /* tbl.get_intersecting(r.point(3,0), index='m').count() */ - suite.T().Log("About to run line #131: table_test_indexing.GetIntersecting(r.Point(3, 0)).OptArgs(r.GetIntersectingOpts{Index: 'm', }).Count()") + suite.T().Log("About to run line #131: tbl.GetIntersecting(r.Point(3, 0)).OptArgs(r.GetIntersectingOpts{Index: 'm', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Point(3, 0)).OptArgs(r.GetIntersectingOpts{Index: "m"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Point(3, 0)).OptArgs(r.GetIntersectingOpts{Index: "m"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -483,11 +483,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #136 /* 2 */ var expected_ int = 2 - /* table_test_indexing.get_intersecting(r.polygon([0,0], [0,1], [1,1], [1,0]), index='m').count() */ + /* tbl.get_intersecting(r.polygon([0,0], [0,1], [1,1], [1,0]), index='m').count() */ - suite.T().Log("About to run line #136: table_test_indexing.GetIntersecting(r.Polygon([]interface{}{0, 0}, []interface{}{0, 1}, []interface{}{1, 1}, []interface{}{1, 0})).OptArgs(r.GetIntersectingOpts{Index: 'm', }).Count()") + suite.T().Log("About to run line #136: tbl.GetIntersecting(r.Polygon([]interface{}{0, 0}, []interface{}{0, 1}, []interface{}{1, 1}, []interface{}{1, 0})).OptArgs(r.GetIntersectingOpts{Index: 'm', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetIntersecting(r.Polygon([]interface{}{0, 0}, []interface{}{0, 1}, []interface{}{1, 1}, []interface{}{1, 0})).OptArgs(r.GetIntersectingOpts{Index: "m"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetIntersecting(r.Polygon([]interface{}{0, 0}, []interface{}{0, 1}, []interface{}{1, 1}, []interface{}{1, 0})).OptArgs(r.GetIntersectingOpts{Index: "m"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -498,11 +498,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #142 /* err('ReqlQueryLogicError', 'Index `other` is not a geospatial index. get_nearest can only be used with a geospatial index.', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Index `other` is not a geospatial index. get_nearest can only be used with a geospatial index.") - /* table_test_indexing.get_nearest(r.point(0,0), index='other') */ + /* tbl.get_nearest(r.point(0,0), index='other') */ - suite.T().Log("About to run line #142: table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'other', })") + suite.T().Log("About to run line #142: tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'other', })") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "other"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "other"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -513,11 +513,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #146 /* err_regex('ReqlOpFailedError', 'Index `missing` was not found on table `[a-zA-Z0-9_]+.[a-zA-Z0-9_]+`[.]', [0]) */ var expected_ Err = err_regex("ReqlOpFailedError", "Index `missing` was not found on table `[a-zA-Z0-9_]+.[a-zA-Z0-9_]+`[.]") - /* table_test_indexing.get_nearest(r.point(0,0), index='missing') */ + /* tbl.get_nearest(r.point(0,0), index='missing') */ - suite.T().Log("About to run line #146: table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'missing', })") + suite.T().Log("About to run line #146: tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'missing', })") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "missing"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "missing"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -528,11 +528,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #149 /* err('ReqlQueryLogicError', 'get_nearest requires an index argument.', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "get_nearest requires an index argument.") - /* table_test_indexing.get_nearest(r.point(0,0)) */ + /* tbl.get_nearest(r.point(0,0)) */ - suite.T().Log("About to run line #149: table_test_indexing.GetNearest(r.Point(0, 0))") + suite.T().Log("About to run line #149: tbl.GetNearest(r.Point(0, 0))") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetNearest(r.Point(0, 0)), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetNearest(r.Point(0, 0)), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -543,11 +543,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #170 /* err('ReqlQueryLogicError', 'get_nearest cannot use the primary index.', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "get_nearest cannot use the primary index.") - /* table_test_indexing.get_nearest(r.point(0,0), index='id').count() */ + /* tbl.get_nearest(r.point(0,0), index='id').count() */ - suite.T().Log("About to run line #170: table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'id', }).Count()") + suite.T().Log("About to run line #170: tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'id', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -558,11 +558,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #175 /* ([{'dist':0,'doc':{'id':1}},{'dist':0.055659745396754216,'doc':{'id':2}}]) */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"dist": 0, "doc": map[interface{}]interface{}{"id": 1}}, map[interface{}]interface{}{"dist": 0.055659745396754216, "doc": map[interface{}]interface{}{"id": 2}}} - /* table_test_indexing.get_nearest(r.point(0,0), index='g').pluck('dist', {'doc':'id'}) */ + /* tbl.get_nearest(r.point(0,0), index='g').pluck('dist', {'doc':'id'}) */ - suite.T().Log("About to run line #175: table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'g', }).Pluck('dist', map[interface{}]interface{}{'doc': 'id', })") + suite.T().Log("About to run line #175: tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'g', }).Pluck('dist', map[interface{}]interface{}{'doc': 'id', })") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "g"}).Pluck("dist", map[interface{}]interface{}{"doc": "id"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "g"}).Pluck("dist", map[interface{}]interface{}{"doc": "id"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -573,11 +573,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #179 /* ([{'dist':0,'doc':{'id':2}},{'dist':0.11130264976984369,'doc':{'id':1}}]) */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"dist": 0, "doc": map[interface{}]interface{}{"id": 2}}, map[interface{}]interface{}{"dist": 0.11130264976984369, "doc": map[interface{}]interface{}{"id": 1}}} - /* table_test_indexing.get_nearest(r.point(-0.000001,1), index='g').pluck('dist', {'doc':'id'}) */ + /* tbl.get_nearest(r.point(-0.000001,1), index='g').pluck('dist', {'doc':'id'}) */ - suite.T().Log("About to run line #179: table_test_indexing.GetNearest(r.Point(-1e-06, 1)).OptArgs(r.GetNearestOpts{Index: 'g', }).Pluck('dist', map[interface{}]interface{}{'doc': 'id', })") + suite.T().Log("About to run line #179: tbl.GetNearest(r.Point(-1e-06, 1)).OptArgs(r.GetNearestOpts{Index: 'g', }).Pluck('dist', map[interface{}]interface{}{'doc': 'id', })") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetNearest(r.Point(-1e-06, 1)).OptArgs(r.GetNearestOpts{Index: "g"}).Pluck("dist", map[interface{}]interface{}{"doc": "id"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetNearest(r.Point(-1e-06, 1)).OptArgs(r.GetNearestOpts{Index: "g"}).Pluck("dist", map[interface{}]interface{}{"doc": "id"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -588,11 +588,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #183 /* ([{'dist':0,'doc':{'id':1}},{'dist':0.055659745396754216,'doc':{'id':2}},{'dist':1565109.0992178896,'doc':{'id':0}}]) */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"dist": 0, "doc": map[interface{}]interface{}{"id": 1}}, map[interface{}]interface{}{"dist": 0.055659745396754216, "doc": map[interface{}]interface{}{"id": 2}}, map[interface{}]interface{}{"dist": 1565109.0992178896, "doc": map[interface{}]interface{}{"id": 0}}} - /* table_test_indexing.get_nearest(r.point(0,0), index='g', max_dist=1565110).pluck('dist', {'doc':'id'}) */ + /* tbl.get_nearest(r.point(0,0), index='g', max_dist=1565110).pluck('dist', {'doc':'id'}) */ - suite.T().Log("About to run line #183: table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'g', MaxDist: 1565110, }).Pluck('dist', map[interface{}]interface{}{'doc': 'id', })") + suite.T().Log("About to run line #183: tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'g', MaxDist: 1565110, }).Pluck('dist', map[interface{}]interface{}{'doc': 'id', })") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "g", MaxDist: 1565110}).Pluck("dist", map[interface{}]interface{}{"doc": "id"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "g", MaxDist: 1565110}).Pluck("dist", map[interface{}]interface{}{"doc": "id"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -603,11 +603,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #187 /* ([{'dist':0,'doc':{'id':1}},{'dist':0.055659745396754216,'doc':{'id':2}}]) */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"dist": 0, "doc": map[interface{}]interface{}{"id": 1}}, map[interface{}]interface{}{"dist": 0.055659745396754216, "doc": map[interface{}]interface{}{"id": 2}}} - /* table_test_indexing.get_nearest(r.point(0,0), index='g', max_dist=1565110, max_results=2).pluck('dist', {'doc':'id'}) */ + /* tbl.get_nearest(r.point(0,0), index='g', max_dist=1565110, max_results=2).pluck('dist', {'doc':'id'}) */ - suite.T().Log("About to run line #187: table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'g', MaxDist: 1565110, MaxResults: 2, }).Pluck('dist', map[interface{}]interface{}{'doc': 'id', })") + suite.T().Log("About to run line #187: tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'g', MaxDist: 1565110, MaxResults: 2, }).Pluck('dist', map[interface{}]interface{}{'doc': 'id', })") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "g", MaxDist: 1565110, MaxResults: 2}).Pluck("dist", map[interface{}]interface{}{"doc": "id"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "g", MaxDist: 1565110, MaxResults: 2}).Pluck("dist", map[interface{}]interface{}{"doc": "id"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -618,11 +618,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #191 /* err('ReqlQueryLogicError', 'The distance has become too large for continuing the indexed nearest traversal. Consider specifying a smaller `max_dist` parameter. (Radius must be smaller than a quarter of the circumference along the minor axis of the reference ellipsoid. Got 10968937.995244588703m, but must be smaller than 9985163.1855612862855m.)', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "The distance has become too large for continuing the indexed nearest traversal. Consider specifying a smaller `max_dist` parameter. (Radius must be smaller than a quarter of the circumference along the minor axis of the reference ellipsoid. Got 10968937.995244588703m, but must be smaller than 9985163.1855612862855m.)") - /* table_test_indexing.get_nearest(r.point(0,0), index='g', max_dist=10000000).pluck('dist', {'doc':'id'}) */ + /* tbl.get_nearest(r.point(0,0), index='g', max_dist=10000000).pluck('dist', {'doc':'id'}) */ - suite.T().Log("About to run line #191: table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'g', MaxDist: 10000000, }).Pluck('dist', map[interface{}]interface{}{'doc': 'id', })") + suite.T().Log("About to run line #191: tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'g', MaxDist: 10000000, }).Pluck('dist', map[interface{}]interface{}{'doc': 'id', })") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "g", MaxDist: 10000000}).Pluck("dist", map[interface{}]interface{}{"doc": "id"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "g", MaxDist: 10000000}).Pluck("dist", map[interface{}]interface{}{"doc": "id"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -633,11 +633,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #195 /* ([{'dist':0,'doc':{'id':1}},{'dist':0.00005565974539675422,'doc':{'id':2}},{'dist':1565.1090992178897,'doc':{'id':0}}]) */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"dist": 0, "doc": map[interface{}]interface{}{"id": 1}}, map[interface{}]interface{}{"dist": 5.565974539675422e-05, "doc": map[interface{}]interface{}{"id": 2}}, map[interface{}]interface{}{"dist": 1565.1090992178897, "doc": map[interface{}]interface{}{"id": 0}}} - /* table_test_indexing.get_nearest(r.point(0,0), index='g', max_dist=1566, unit='km').pluck('dist', {'doc':'id'}) */ + /* tbl.get_nearest(r.point(0,0), index='g', max_dist=1566, unit='km').pluck('dist', {'doc':'id'}) */ - suite.T().Log("About to run line #195: table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'g', MaxDist: 1566, Unit: 'km', }).Pluck('dist', map[interface{}]interface{}{'doc': 'id', })") + suite.T().Log("About to run line #195: tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'g', MaxDist: 1566, Unit: 'km', }).Pluck('dist', map[interface{}]interface{}{'doc': 'id', })") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "g", MaxDist: 1566, Unit: "km"}).Pluck("dist", map[interface{}]interface{}{"doc": "id"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "g", MaxDist: 1566, Unit: "km"}).Pluck("dist", map[interface{}]interface{}{"doc": "id"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -648,11 +648,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #198 /* ([{'dist':0, 'doc':{'id':1}}, {'dist':8.726646259990191e-09, 'doc':{'id':2}}, {'dist':0.24619691677893205, 'doc':{'id':0}}]) */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"dist": 0, "doc": map[interface{}]interface{}{"id": 1}}, map[interface{}]interface{}{"dist": 8.726646259990191e-09, "doc": map[interface{}]interface{}{"id": 2}}, map[interface{}]interface{}{"dist": 0.24619691677893205, "doc": map[interface{}]interface{}{"id": 0}}} - /* table_test_indexing.get_nearest(r.point(0,0), index='g', max_dist=1, geo_system='unit_sphere').pluck('dist', {'doc':'id'}) */ + /* tbl.get_nearest(r.point(0,0), index='g', max_dist=1, geo_system='unit_sphere').pluck('dist', {'doc':'id'}) */ - suite.T().Log("About to run line #198: table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'g', MaxDist: 1, GeoSystem: 'unit_sphere', }).Pluck('dist', map[interface{}]interface{}{'doc': 'id', })") + suite.T().Log("About to run line #198: tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'g', MaxDist: 1, GeoSystem: 'unit_sphere', }).Pluck('dist', map[interface{}]interface{}{'doc': 'id', })") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "g", MaxDist: 1, GeoSystem: "unit_sphere"}).Pluck("dist", map[interface{}]interface{}{"doc": "id"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "g", MaxDist: 1, GeoSystem: "unit_sphere"}).Pluck("dist", map[interface{}]interface{}{"doc": "id"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -663,11 +663,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #202 /* ("ARRAY") */ var expected_ string = "ARRAY" - /* table_test_indexing.get_nearest(r.point(0,0), index='g').type_of() */ + /* tbl.get_nearest(r.point(0,0), index='g').type_of() */ - suite.T().Log("About to run line #202: table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'g', }).TypeOf()") + suite.T().Log("About to run line #202: tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'g', }).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "g"}).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "g"}).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -678,11 +678,11 @@ func (suite *GeoIndexingSuite) TestCases() { // geo/indexing.yaml line #206 /* ("ARRAY") */ var expected_ string = "ARRAY" - /* table_test_indexing.get_nearest(r.point(0,0), index='g').map(r.row).type_of() */ + /* tbl.get_nearest(r.point(0,0), index='g').map(r.row).type_of() */ - suite.T().Log("About to run line #206: table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'g', }).Map(r.Row).TypeOf()") + suite.T().Log("About to run line #206: tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: 'g', }).Map(r.Row).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_indexing.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "g"}).Map(r.Row).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetNearest(r.Point(0, 0)).OptArgs(r.GetNearestOpts{Index: "g"}).Map(r.Row).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_geo_intersection_inclusion_test.go b/internal/integration/reql_tests/reql_geo_intersection_inclusion_test.go index 97c6f3a1..2042510e 100644 --- a/internal/integration/reql_tests/reql_geo_intersection_inclusion_test.go +++ b/internal/integration/reql_tests/reql_geo_intersection_inclusion_test.go @@ -36,10 +36,10 @@ func (suite *GeoIntersectionInclusionSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_geoint").Exec(suite.session) - err = r.DBCreate("db_geoint").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_geoint").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *GeoIntersectionInclusionSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_geoint").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_geo_operations_test.go b/internal/integration/reql_tests/reql_geo_operations_test.go index fd9ddbdc..eaa92931 100644 --- a/internal/integration/reql_tests/reql_geo_operations_test.go +++ b/internal/integration/reql_tests/reql_geo_operations_test.go @@ -36,10 +36,10 @@ func (suite *GeoOperationsSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_geoop").Exec(suite.session) - err = r.DBCreate("db_geoop").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_geoop").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *GeoOperationsSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_geoop").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_geo_primitives_test.go b/internal/integration/reql_tests/reql_geo_primitives_test.go index f5dc841c..3ad9c492 100644 --- a/internal/integration/reql_tests/reql_geo_primitives_test.go +++ b/internal/integration/reql_tests/reql_geo_primitives_test.go @@ -36,10 +36,10 @@ func (suite *GeoPrimitivesSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_geopr").Exec(suite.session) - err = r.DBCreate("db_geopr").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_geopr").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *GeoPrimitivesSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_geopr").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_joins_test.go b/internal/integration/reql_tests/reql_joins_test.go index 2592fd4b..ecc9d55c 100644 --- a/internal/integration/reql_tests/reql_joins_test.go +++ b/internal/integration/reql_tests/reql_joins_test.go @@ -36,46 +36,46 @@ func (suite *JoinsSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_joins").Exec(suite.session) - err = r.DBCreate("db_joins").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_joins").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_joins").TableDrop("messages").Exec(suite.session) - err = r.DB("db_joins").TableCreate("messages").Exec(suite.session) + r.DB("test").TableDrop("messages").Exec(suite.session) + err = r.DB("test").TableCreate("messages").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_joins").Table("messages").Wait().Exec(suite.session) + err = r.DB("test").Table("messages").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_joins").TableDrop("otable_test_joins").Exec(suite.session) - err = r.DB("db_joins").TableCreate("otable_test_joins").Exec(suite.session) + r.DB("test").TableDrop("otbl").Exec(suite.session) + err = r.DB("test").TableCreate("otbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_joins").Table("otable_test_joins").Wait().Exec(suite.session) + err = r.DB("test").Table("otbl").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_joins").TableDrop("otable_test_joins2").Exec(suite.session) - err = r.DB("db_joins").TableCreate("otable_test_joins2").Exec(suite.session) + r.DB("test").TableDrop("otbl2").Exec(suite.session) + err = r.DB("test").TableCreate("otbl2").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_joins").Table("otable_test_joins2").Wait().Exec(suite.session) + err = r.DB("test").Table("otbl2").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_joins").TableDrop("receivers").Exec(suite.session) - err = r.DB("db_joins").TableCreate("receivers").Exec(suite.session) + r.DB("test").TableDrop("receivers").Exec(suite.session) + err = r.DB("test").TableCreate("receivers").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_joins").Table("receivers").Wait().Exec(suite.session) + err = r.DB("test").Table("receivers").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_joins").TableDrop("senders").Exec(suite.session) - err = r.DB("db_joins").TableCreate("senders").Exec(suite.session) + r.DB("test").TableDrop("senders").Exec(suite.session) + err = r.DB("test").TableCreate("senders").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_joins").Table("senders").Wait().Exec(suite.session) + err = r.DB("test").Table("senders").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_joins").TableDrop("table_test_joins").Exec(suite.session) - err = r.DB("db_joins").TableCreate("table_test_joins").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_joins").Table("table_test_joins").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_joins").TableDrop("table_test_joins2").Exec(suite.session) - err = r.DB("db_joins").TableCreate("table_test_joins2").Exec(suite.session) + r.DB("test").TableDrop("tbl2").Exec(suite.session) + err = r.DB("test").TableCreate("tbl2").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_joins").Table("table_test_joins2").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl2").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -84,14 +84,14 @@ func (suite *JoinsSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_joins").TableDrop("messages").Exec(suite.session) - r.DB("db_joins").TableDrop("otable_test_joins").Exec(suite.session) - r.DB("db_joins").TableDrop("otable_test_joins2").Exec(suite.session) - r.DB("db_joins").TableDrop("receivers").Exec(suite.session) - r.DB("db_joins").TableDrop("senders").Exec(suite.session) - r.DB("db_joins").TableDrop("table_test_joins").Exec(suite.session) - r.DB("db_joins").TableDrop("table_test_joins2").Exec(suite.session) - r.DBDrop("db_joins").Exec(suite.session) + r.DB("test").TableDrop("messages").Exec(suite.session) + r.DB("test").TableDrop("otbl").Exec(suite.session) + r.DB("test").TableDrop("otbl2").Exec(suite.session) + r.DB("test").TableDrop("receivers").Exec(suite.session) + r.DB("test").TableDrop("senders").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DB("test").TableDrop("tbl2").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -100,20 +100,20 @@ func (suite *JoinsSuite) TearDownSuite() { func (suite *JoinsSuite) TestCases() { suite.T().Log("Running JoinsSuite: Tests that manipulation data in tables") - messages := r.DB("db_joins").Table("messages") + messages := r.DB("test").Table("messages") _ = messages // Prevent any noused variable errors - otable_test_joins := r.DB("db_joins").Table("otable_test_joins") - _ = otable_test_joins // Prevent any noused variable errors - otable_test_joins2 := r.DB("db_joins").Table("otable_test_joins2") - _ = otable_test_joins2 // Prevent any noused variable errors - receivers := r.DB("db_joins").Table("receivers") + otbl := r.DB("test").Table("otbl") + _ = otbl // Prevent any noused variable errors + otbl2 := r.DB("test").Table("otbl2") + _ = otbl2 // Prevent any noused variable errors + receivers := r.DB("test").Table("receivers") _ = receivers // Prevent any noused variable errors - senders := r.DB("db_joins").Table("senders") + senders := r.DB("test").Table("senders") _ = senders // Prevent any noused variable errors - table_test_joins := r.DB("db_joins").Table("table_test_joins") - _ = table_test_joins // Prevent any noused variable errors - table_test_joins2 := r.DB("db_joins").Table("table_test_joins2") - _ = table_test_joins2 // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors + tbl2 := r.DB("test").Table("tbl2") + _ = tbl2 // Prevent any noused variable errors { // joins.yaml line #7 @@ -123,7 +123,7 @@ func (suite *JoinsSuite) TestCases() { suite.T().Log("About to run line #7: r.DB('test').TableCreate('test3').OptArgs(r.TableCreateOpts{PrimaryKey: 'foo', })") - runAndAssert(suite.Suite, expected_, r.DB("db_joins").TableCreate("test3").OptArgs(r.TableCreateOpts{PrimaryKey: "foo"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB("test").TableCreate("test3").OptArgs(r.TableCreateOpts{PrimaryKey: "foo"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -131,21 +131,21 @@ func (suite *JoinsSuite) TestCases() { } // joins.yaml line #11 - // table_test_joins3 = r.db('test').table('test3') - suite.T().Log("Possibly executing: var table_test_joins3 r.Term = r.DB('test').Table('test3')") + // tbl3 = r.db('test').table('test3') + suite.T().Log("Possibly executing: var tbl3 r.Term = r.DB('test').Table('test3')") - table_test_joins3 := r.DB("db_joins").Table("test3") - _ = table_test_joins3 // Prevent any noused variable errors + tbl3 := r.DB("test").Table("test3") + _ = tbl3 // Prevent any noused variable errors { // joins.yaml line #13 /* partial({'errors':0, 'inserted':100}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "inserted": 100}) - /* table_test_joins.insert(r.range(0, 100).map({'id':r.row, 'a':r.row % 4})) */ + /* tbl.insert(r.range(0, 100).map({'id':r.row, 'a':r.row % 4})) */ - suite.T().Log("About to run line #13: table_test_joins.Insert(r.Range(0, 100).Map(map[interface{}]interface{}{'id': r.Row, 'a': r.Row.Mod(4), }))") + suite.T().Log("About to run line #13: tbl.Insert(r.Range(0, 100).Map(map[interface{}]interface{}{'id': r.Row, 'a': r.Row.Mod(4), }))") - runAndAssert(suite.Suite, expected_, table_test_joins.Insert(r.Range(0, 100).Map(map[interface{}]interface{}{"id": r.Row, "a": r.Row.Mod(4)})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(r.Range(0, 100).Map(map[interface{}]interface{}{"id": r.Row, "a": r.Row.Mod(4)})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -156,11 +156,11 @@ func (suite *JoinsSuite) TestCases() { // joins.yaml line #18 /* partial({'errors':0, 'inserted':100}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "inserted": 100}) - /* table_test_joins2.insert(r.range(0, 100).map({'id':r.row, 'b':r.row % 4})) */ + /* tbl2.insert(r.range(0, 100).map({'id':r.row, 'b':r.row % 4})) */ - suite.T().Log("About to run line #18: table_test_joins2.Insert(r.Range(0, 100).Map(map[interface{}]interface{}{'id': r.Row, 'b': r.Row.Mod(4), }))") + suite.T().Log("About to run line #18: tbl2.Insert(r.Range(0, 100).Map(map[interface{}]interface{}{'id': r.Row, 'b': r.Row.Mod(4), }))") - runAndAssert(suite.Suite, expected_, table_test_joins2.Insert(r.Range(0, 100).Map(map[interface{}]interface{}{"id": r.Row, "b": r.Row.Mod(4)})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.Insert(r.Range(0, 100).Map(map[interface{}]interface{}{"id": r.Row, "b": r.Row.Mod(4)})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -171,11 +171,11 @@ func (suite *JoinsSuite) TestCases() { // joins.yaml line #23 /* partial({'errors':0, 'inserted':100}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 0, "inserted": 100}) - /* table_test_joins3.insert(r.range(0, 100).map({'foo':r.row, 'b':r.row % 4})) */ + /* tbl3.insert(r.range(0, 100).map({'foo':r.row, 'b':r.row % 4})) */ - suite.T().Log("About to run line #23: table_test_joins3.Insert(r.Range(0, 100).Map(map[interface{}]interface{}{'foo': r.Row, 'b': r.Row.Mod(4), }))") + suite.T().Log("About to run line #23: tbl3.Insert(r.Range(0, 100).Map(map[interface{}]interface{}{'foo': r.Row, 'b': r.Row.Mod(4), }))") - runAndAssert(suite.Suite, expected_, table_test_joins3.Insert(r.Range(0, 100).Map(map[interface{}]interface{}{"foo": r.Row, "b": r.Row.Mod(4)})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl3.Insert(r.Range(0, 100).Map(map[interface{}]interface{}{"foo": r.Row, "b": r.Row.Mod(4)})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -186,11 +186,11 @@ func (suite *JoinsSuite) TestCases() { // joins.yaml line #28 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* otable_test_joins.insert(r.range(1,100).map({'id': r.row, 'a': r.row})) */ + /* otbl.insert(r.range(1,100).map({'id': r.row, 'a': r.row})) */ - suite.T().Log("About to run line #28: otable_test_joins.Insert(r.Range(1, 100).Map(map[interface{}]interface{}{'id': r.Row, 'a': r.Row, }))") + suite.T().Log("About to run line #28: otbl.Insert(r.Range(1, 100).Map(map[interface{}]interface{}{'id': r.Row, 'a': r.Row, }))") - runAndAssert(suite.Suite, expected_, otable_test_joins.Insert(r.Range(1, 100).Map(map[interface{}]interface{}{"id": r.Row, "a": r.Row})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, otbl.Insert(r.Range(1, 100).Map(map[interface{}]interface{}{"id": r.Row, "a": r.Row})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -201,11 +201,11 @@ func (suite *JoinsSuite) TestCases() { // joins.yaml line #29 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* otable_test_joins2.insert(r.range(1,100).map({'id': r.row, 'b': 2 * r.row})) */ + /* otbl2.insert(r.range(1,100).map({'id': r.row, 'b': 2 * r.row})) */ - suite.T().Log("About to run line #29: otable_test_joins2.Insert(r.Range(1, 100).Map(map[interface{}]interface{}{'id': r.Row, 'b': r.Mul(2, r.Row), }))") + suite.T().Log("About to run line #29: otbl2.Insert(r.Range(1, 100).Map(map[interface{}]interface{}{'id': r.Row, 'b': r.Mul(2, r.Row), }))") - runAndAssert(suite.Suite, expected_, otable_test_joins2.Insert(r.Range(1, 100).Map(map[interface{}]interface{}{"id": r.Row, "b": r.Mul(2, r.Row)})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, otbl2.Insert(r.Range(1, 100).Map(map[interface{}]interface{}{"id": r.Row, "b": r.Mul(2, r.Row)})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -213,10 +213,10 @@ func (suite *JoinsSuite) TestCases() { } // joins.yaml line #34 - // ij = table_test_joins.inner_join(table_test_joins2, lambda x,y:x['a'] == y['b']).zip() - suite.T().Log("Possibly executing: var ij r.Term = table_test_joins.InnerJoin(table_test_joins2, func(x r.Term, y r.Term) interface{} { return x.AtIndex('a').Eq(y.AtIndex('b'))}).Zip()") + // ij = tbl.inner_join(tbl2, lambda x,y:x['a'] == y['b']).zip() + suite.T().Log("Possibly executing: var ij r.Term = tbl.InnerJoin(tbl2, func(x r.Term, y r.Term) interface{} { return x.AtIndex('a').Eq(y.AtIndex('b'))}).Zip()") - ij := table_test_joins.InnerJoin(table_test_joins2, func(x r.Term, y r.Term) interface{} { return x.AtIndex("a").Eq(y.AtIndex("b")) }).Zip() + ij := tbl.InnerJoin(tbl2, func(x r.Term, y r.Term) interface{} { return x.AtIndex("a").Eq(y.AtIndex("b")) }).Zip() _ = ij // Prevent any noused variable errors { @@ -250,10 +250,10 @@ func (suite *JoinsSuite) TestCases() { } // joins.yaml line #46 - // oj = table_test_joins.outer_join(table_test_joins2, lambda x,y:x['a'] == y['b']).zip() - suite.T().Log("Possibly executing: var oj r.Term = table_test_joins.OuterJoin(table_test_joins2, func(x r.Term, y r.Term) interface{} { return x.AtIndex('a').Eq(y.AtIndex('b'))}).Zip()") + // oj = tbl.outer_join(tbl2, lambda x,y:x['a'] == y['b']).zip() + suite.T().Log("Possibly executing: var oj r.Term = tbl.OuterJoin(tbl2, func(x r.Term, y r.Term) interface{} { return x.AtIndex('a').Eq(y.AtIndex('b'))}).Zip()") - oj := table_test_joins.OuterJoin(table_test_joins2, func(x r.Term, y r.Term) interface{} { return x.AtIndex("a").Eq(y.AtIndex("b")) }).Zip() + oj := tbl.OuterJoin(tbl2, func(x r.Term, y r.Term) interface{} { return x.AtIndex("a").Eq(y.AtIndex("b")) }).Zip() _ = oj // Prevent any noused variable errors { @@ -287,33 +287,33 @@ func (suite *JoinsSuite) TestCases() { } // joins.yaml line #57 - // blah = otable_test_joins.order_by("id").eq_join(r.row['id'], otable_test_joins2, ordered=True).zip() - suite.T().Log("Possibly executing: var blah r.Term = otable_test_joins.OrderBy('id').EqJoin(r.Row.AtIndex('id'), otable_test_joins2).OptArgs(r.EqJoinOpts{Ordered: true, }).Zip()") + // blah = otbl.order_by("id").eq_join(r.row['id'], otbl2, ordered=True).zip() + suite.T().Log("Possibly executing: var blah r.Term = otbl.OrderBy('id').EqJoin(r.Row.AtIndex('id'), otbl2).OptArgs(r.EqJoinOpts{Ordered: true, }).Zip()") - blah := maybeRun(otable_test_joins.OrderBy("id").EqJoin(r.Row.AtIndex("id"), otable_test_joins2).OptArgs(r.EqJoinOpts{Ordered: true}).Zip(), suite.session, r.RunOpts{}) + blah := maybeRun(otbl.OrderBy("id").EqJoin(r.Row.AtIndex("id"), otbl2).OptArgs(r.EqJoinOpts{Ordered: true}).Zip(), suite.session, r.RunOpts{}) _ = blah // Prevent any noused variable errors // joins.yaml line #59 - // blah = otable_test_joins.order_by(r.desc("id")).eq_join(r.row['id'], otable_test_joins2, ordered=True).zip() - suite.T().Log("Possibly executing: var blah r.Term = otable_test_joins.OrderBy(r.Desc('id')).EqJoin(r.Row.AtIndex('id'), otable_test_joins2).OptArgs(r.EqJoinOpts{Ordered: true, }).Zip()") + // blah = otbl.order_by(r.desc("id")).eq_join(r.row['id'], otbl2, ordered=True).zip() + suite.T().Log("Possibly executing: var blah r.Term = otbl.OrderBy(r.Desc('id')).EqJoin(r.Row.AtIndex('id'), otbl2).OptArgs(r.EqJoinOpts{Ordered: true, }).Zip()") - blah = maybeRun(otable_test_joins.OrderBy(r.Desc("id")).EqJoin(r.Row.AtIndex("id"), otable_test_joins2).OptArgs(r.EqJoinOpts{Ordered: true}).Zip(), suite.session, r.RunOpts{}) + blah = maybeRun(otbl.OrderBy(r.Desc("id")).EqJoin(r.Row.AtIndex("id"), otbl2).OptArgs(r.EqJoinOpts{Ordered: true}).Zip(), suite.session, r.RunOpts{}) // joins.yaml line #61 - // blah = otable_test_joins.order_by("id").eq_join(r.row['a'], otable_test_joins2, ordered=True).zip() - suite.T().Log("Possibly executing: var blah r.Term = otable_test_joins.OrderBy('id').EqJoin(r.Row.AtIndex('a'), otable_test_joins2).OptArgs(r.EqJoinOpts{Ordered: true, }).Zip()") + // blah = otbl.order_by("id").eq_join(r.row['a'], otbl2, ordered=True).zip() + suite.T().Log("Possibly executing: var blah r.Term = otbl.OrderBy('id').EqJoin(r.Row.AtIndex('a'), otbl2).OptArgs(r.EqJoinOpts{Ordered: true, }).Zip()") - blah = maybeRun(otable_test_joins.OrderBy("id").EqJoin(r.Row.AtIndex("a"), otable_test_joins2).OptArgs(r.EqJoinOpts{Ordered: true}).Zip(), suite.session, r.RunOpts{}) + blah = maybeRun(otbl.OrderBy("id").EqJoin(r.Row.AtIndex("a"), otbl2).OptArgs(r.EqJoinOpts{Ordered: true}).Zip(), suite.session, r.RunOpts{}) { // joins.yaml line #65 /* 100 */ var expected_ int = 100 - /* table_test_joins.eq_join('a', table_test_joins2).zip().count() */ + /* tbl.eq_join('a', tbl2).zip().count() */ - suite.T().Log("About to run line #65: table_test_joins.EqJoin('a', table_test_joins2).Zip().Count()") + suite.T().Log("About to run line #65: tbl.EqJoin('a', tbl2).Zip().Count()") - runAndAssert(suite.Suite, expected_, table_test_joins.EqJoin("a", table_test_joins2).Zip().Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.EqJoin("a", tbl2).Zip().Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -324,11 +324,11 @@ func (suite *JoinsSuite) TestCases() { // joins.yaml line #68 /* 0 */ var expected_ int = 0 - /* table_test_joins.eq_join('fake', table_test_joins2).zip().count() */ + /* tbl.eq_join('fake', tbl2).zip().count() */ - suite.T().Log("About to run line #68: table_test_joins.EqJoin('fake', table_test_joins2).Zip().Count()") + suite.T().Log("About to run line #68: tbl.EqJoin('fake', tbl2).Zip().Count()") - runAndAssert(suite.Suite, expected_, table_test_joins.EqJoin("fake", table_test_joins2).Zip().Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.EqJoin("fake", tbl2).Zip().Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -339,11 +339,11 @@ func (suite *JoinsSuite) TestCases() { // joins.yaml line #71 /* 100 */ var expected_ int = 100 - /* table_test_joins.eq_join(lambda x:x['a'], table_test_joins2).zip().count() */ + /* tbl.eq_join(lambda x:x['a'], tbl2).zip().count() */ - suite.T().Log("About to run line #71: table_test_joins.EqJoin(func(x r.Term) interface{} { return x.AtIndex('a')}, table_test_joins2).Zip().Count()") + suite.T().Log("About to run line #71: tbl.EqJoin(func(x r.Term) interface{} { return x.AtIndex('a')}, tbl2).Zip().Count()") - runAndAssert(suite.Suite, expected_, table_test_joins.EqJoin(func(x r.Term) interface{} { return x.AtIndex("a") }, table_test_joins2).Zip().Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.EqJoin(func(x r.Term) interface{} { return x.AtIndex("a") }, tbl2).Zip().Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -354,11 +354,11 @@ func (suite *JoinsSuite) TestCases() { // joins.yaml line #76 /* 0 */ var expected_ int = 0 - /* table_test_joins.eq_join(lambda x:x['fake'], table_test_joins2).zip().count() */ + /* tbl.eq_join(lambda x:x['fake'], tbl2).zip().count() */ - suite.T().Log("About to run line #76: table_test_joins.EqJoin(func(x r.Term) interface{} { return x.AtIndex('fake')}, table_test_joins2).Zip().Count()") + suite.T().Log("About to run line #76: tbl.EqJoin(func(x r.Term) interface{} { return x.AtIndex('fake')}, tbl2).Zip().Count()") - runAndAssert(suite.Suite, expected_, table_test_joins.EqJoin(func(x r.Term) interface{} { return x.AtIndex("fake") }, table_test_joins2).Zip().Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.EqJoin(func(x r.Term) interface{} { return x.AtIndex("fake") }, tbl2).Zip().Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -369,11 +369,11 @@ func (suite *JoinsSuite) TestCases() { // joins.yaml line #81 /* 0 */ var expected_ int = 0 - /* table_test_joins.eq_join(lambda x:null, table_test_joins2).zip().count() */ + /* tbl.eq_join(lambda x:null, tbl2).zip().count() */ - suite.T().Log("About to run line #81: table_test_joins.EqJoin(func(x r.Term) interface{} { return nil}, table_test_joins2).Zip().Count()") + suite.T().Log("About to run line #81: tbl.EqJoin(func(x r.Term) interface{} { return nil}, tbl2).Zip().Count()") - runAndAssert(suite.Suite, expected_, table_test_joins.EqJoin(func(x r.Term) interface{} { return nil }, table_test_joins2).Zip().Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.EqJoin(func(x r.Term) interface{} { return nil }, tbl2).Zip().Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -384,11 +384,11 @@ func (suite *JoinsSuite) TestCases() { // joins.yaml line #86 /* 100 */ var expected_ int = 100 - /* table_test_joins.eq_join(lambda x:x['a'], table_test_joins2).count() */ + /* tbl.eq_join(lambda x:x['a'], tbl2).count() */ - suite.T().Log("About to run line #86: table_test_joins.EqJoin(func(x r.Term) interface{} { return x.AtIndex('a')}, table_test_joins2).Count()") + suite.T().Log("About to run line #86: tbl.EqJoin(func(x r.Term) interface{} { return x.AtIndex('a')}, tbl2).Count()") - runAndAssert(suite.Suite, expected_, table_test_joins.EqJoin(func(x r.Term) interface{} { return x.AtIndex("a") }, table_test_joins2).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.EqJoin(func(x r.Term) interface{} { return x.AtIndex("a") }, tbl2).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -399,11 +399,11 @@ func (suite *JoinsSuite) TestCases() { // joins.yaml line #92 /* 100 */ var expected_ int = 100 - /* table_test_joins.eq_join('a', table_test_joins3).zip().count() */ + /* tbl.eq_join('a', tbl3).zip().count() */ - suite.T().Log("About to run line #92: table_test_joins.EqJoin('a', table_test_joins3).Zip().Count()") + suite.T().Log("About to run line #92: tbl.EqJoin('a', tbl3).Zip().Count()") - runAndAssert(suite.Suite, expected_, table_test_joins.EqJoin("a", table_test_joins3).Zip().Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.EqJoin("a", tbl3).Zip().Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -414,11 +414,11 @@ func (suite *JoinsSuite) TestCases() { // joins.yaml line #95 /* 100 */ var expected_ int = 100 - /* table_test_joins.eq_join(lambda x:x['a'], table_test_joins3).count() */ + /* tbl.eq_join(lambda x:x['a'], tbl3).count() */ - suite.T().Log("About to run line #95: table_test_joins.EqJoin(func(x r.Term) interface{} { return x.AtIndex('a')}, table_test_joins3).Count()") + suite.T().Log("About to run line #95: tbl.EqJoin(func(x r.Term) interface{} { return x.AtIndex('a')}, tbl3).Count()") - runAndAssert(suite.Suite, expected_, table_test_joins.EqJoin(func(x r.Term) interface{} { return x.AtIndex("a") }, table_test_joins3).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.EqJoin(func(x r.Term) interface{} { return x.AtIndex("a") }, tbl3).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -429,11 +429,11 @@ func (suite *JoinsSuite) TestCases() { // joins.yaml line #101 /* 100 */ var expected_ int = 100 - /* table_test_joins.eq_join(r.row['a'], table_test_joins2).count() */ + /* tbl.eq_join(r.row['a'], tbl2).count() */ - suite.T().Log("About to run line #101: table_test_joins.EqJoin(r.Row.AtIndex('a'), table_test_joins2).Count()") + suite.T().Log("About to run line #101: tbl.EqJoin(r.Row.AtIndex('a'), tbl2).Count()") - runAndAssert(suite.Suite, expected_, table_test_joins.EqJoin(r.Row.AtIndex("a"), table_test_joins2).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.EqJoin(r.Row.AtIndex("a"), tbl2).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -492,7 +492,7 @@ func (suite *JoinsSuite) TestCases() { suite.T().Log("About to run line #132: r.DB('test').TableDrop('test3')") - runAndAssert(suite.Suite, expected_, r.DB("db_joins").TableDrop("test3"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB("test").TableDrop("test3"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_json_test.go b/internal/integration/reql_tests/reql_json_test.go index 2e1f6221..9d3d66ad 100644 --- a/internal/integration/reql_tests/reql_json_test.go +++ b/internal/integration/reql_tests/reql_json_test.go @@ -36,10 +36,10 @@ func (suite *JsonSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_json").Exec(suite.session) - err = r.DBCreate("db_json").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_json").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *JsonSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_json").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_limits_test.go b/internal/integration/reql_tests/reql_limits_test.go new file mode 100644 index 00000000..21a44bb0 --- /dev/null +++ b/internal/integration/reql_tests/reql_limits_test.go @@ -0,0 +1,309 @@ +// Code generated by gen_tests.py and process_polyglot.py. +// Do not edit this file directly. +// The template for this file is located at: +// ../template.go.tpl +package reql_tests + +import ( + "testing" + "time" + + "github.com/stretchr/testify/suite" + r "gopkg.in/rethinkdb/rethinkdb-go.v6" + "gopkg.in/rethinkdb/rethinkdb-go.v6/internal/compare" +) + +// Tests array limit variations +func TestLimitsSuite(t *testing.T) { + suite.Run(t, new(LimitsSuite)) +} + +type LimitsSuite struct { + suite.Suite + + session *r.Session +} + +func (suite *LimitsSuite) SetupTest() { + suite.T().Log("Setting up LimitsSuite") + // Use imports to prevent errors + _ = time.Time{} + _ = compare.AnythingIsFine + + session, err := r.Connect(r.ConnectOpts{ + Address: url, + }) + suite.Require().NoError(err, "Error returned when connecting to server") + suite.session = session + + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) + suite.Require().NoError(err) + err = r.DB("test").Wait().Exec(suite.session) + suite.Require().NoError(err) + + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) + suite.Require().NoError(err) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) + suite.Require().NoError(err) +} + +func (suite *LimitsSuite) TearDownSuite() { + suite.T().Log("Tearing down LimitsSuite") + + if suite.session != nil { + r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + + suite.session.Close() + } +} + +func (suite *LimitsSuite) TestCases() { + suite.T().Log("Running LimitsSuite: Tests array limit variations") + + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors + + { + // limits.yaml line #6 + /* [1,1,1,1,1,1,1,1] */ + var expected_ []interface{} = []interface{}{1, 1, 1, 1, 1, 1, 1, 1} + /* r.expr([1,1,1,1]).union([1, 1, 1, 1]) */ + + suite.T().Log("About to run line #6: r.Expr([]interface{}{1, 1, 1, 1}).Union([]interface{}{1, 1, 1, 1})") + + runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 1, 1, 1}).Union([]interface{}{1, 1, 1, 1}), suite.session, r.RunOpts{ + ArrayLimit: 8, + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #6") + } + + { + // limits.yaml line #10 + /* err("ReqlResourceLimitError", "Array over size limit `4`. To raise the number of allowed elements, modify the `array_limit` option to `.run` (not available in the Data Explorer), or use an index.", [0]) */ + var expected_ Err = err("ReqlResourceLimitError", "Array over size limit `4`. To raise the number of allowed elements, modify the `array_limit` option to `.run` (not available in the Data Explorer), or use an index.") + /* r.expr([1,2,3,4]).union([5, 6, 7, 8]) */ + + suite.T().Log("About to run line #10: r.Expr([]interface{}{1, 2, 3, 4}).Union([]interface{}{5, 6, 7, 8})") + + runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3, 4}).Union([]interface{}{5, 6, 7, 8}), suite.session, r.RunOpts{ + ArrayLimit: 4, + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #10") + } + + { + // limits.yaml line #16 + /* err("ReqlResourceLimitError", "Array over size limit `4`. To raise the number of allowed elements, modify the `array_limit` option to `.run` (not available in the Data Explorer), or use an index.", [0]) */ + var expected_ Err = err("ReqlResourceLimitError", "Array over size limit `4`. To raise the number of allowed elements, modify the `array_limit` option to `.run` (not available in the Data Explorer), or use an index.") + /* r.expr([1,2,3,4,5,6,7,8]) */ + + suite.T().Log("About to run line #16: r.Expr([]interface{}{1, 2, 3, 4, 5, 6, 7, 8})") + + runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3, 4, 5, 6, 7, 8}), suite.session, r.RunOpts{ + ArrayLimit: 4, + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #16") + } + + { + // limits.yaml line #22 + /* err("ReqlQueryLogicError", "Illegal array size limit `-1`. (Must be >= 1.)", []) */ + var expected_ Err = err("ReqlQueryLogicError", "Illegal array size limit `-1`. (Must be >= 1.)") + /* r.expr([1,2,3,4,5,6,7,8]) */ + + suite.T().Log("About to run line #22: r.Expr([]interface{}{1, 2, 3, 4, 5, 6, 7, 8})") + + runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3, 4, 5, 6, 7, 8}), suite.session, r.RunOpts{ + ArrayLimit: -1, + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #22") + } + + { + // limits.yaml line #27 + /* err("ReqlQueryLogicError", "Illegal array size limit `0`. (Must be >= 1.)", []) */ + var expected_ Err = err("ReqlQueryLogicError", "Illegal array size limit `0`. (Must be >= 1.)") + /* r.expr([1,2,3,4,5,6,7,8]) */ + + suite.T().Log("About to run line #27: r.Expr([]interface{}{1, 2, 3, 4, 5, 6, 7, 8})") + + runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3, 4, 5, 6, 7, 8}), suite.session, r.RunOpts{ + ArrayLimit: 0, + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #27") + } + + // limits.yaml line #33 + // ten_l = r.expr([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) + suite.T().Log("Possibly executing: var ten_l r.Term = r.Expr([]interface{}{1, 2, 3, 4, 5, 6, 7, 8, 9, 10})") + + ten_l := r.Expr([]interface{}{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) + _ = ten_l // Prevent any noused variable errors + + { + // limits.yaml line #52 + /* (null) */ + var expected_ interface{} = nil + /* tbl.get(0) */ + + suite.T().Log("About to run line #52: tbl.Get(0)") + + runAndAssert(suite.Suite, expected_, tbl.Get(0), suite.session, r.RunOpts{ + ArrayLimit: 100001, + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #52") + } + + { + // limits.yaml line #58 + /* ({'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1}) */ + var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1} + /* tbl.insert({'id':1, 'array':ten_l}) */ + + suite.T().Log("About to run line #58: tbl.Insert(map[interface{}]interface{}{'id': 1, 'array': ten_l, })") + + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 1, "array": ten_l}), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #58") + } + + { + // limits.yaml line #60 + /* ({'array':[1,2,3,4,5,6,7,8,9,10],'id':1}) */ + var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"array": []interface{}{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, "id": 1} + /* tbl.get(1) */ + + suite.T().Log("About to run line #60: tbl.Get(1)") + + runAndAssert(suite.Suite, expected_, tbl.Get(1), suite.session, r.RunOpts{ + ArrayLimit: 4, + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #60") + } + + { + // limits.yaml line #67 + /* 1 */ + var expected_ int = 1 + /* tbl.delete().get_field('deleted') */ + + suite.T().Log("About to run line #67: tbl.Delete().Field('deleted')") + + runAndAssert(suite.Suite, expected_, tbl.Delete().Field("deleted"), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #67") + } + + // limits.yaml line #71 + // c = tbl.changes(squash=1000000, changefeed_queue_size=10) + suite.T().Log("Possibly executing: var c r.Term = tbl.Changes().OptArgs(r.ChangesOpts{Squash: 1000000, ChangefeedQueueSize: 10, })") + + c := maybeRun(tbl.Changes().OptArgs(r.ChangesOpts{Squash: 1000000, ChangefeedQueueSize: 10}), suite.session, r.RunOpts{}) + _ = c // Prevent any noused variable errors + + { + // limits.yaml line #73 + /* 7 */ + var expected_ int = 7 + /* tbl.insert([{'id':0}, {'id':1}, {'id':2}, {'id':3}, {'id':4}, {'id':5}, {'id':6}]).get_field('inserted') */ + + suite.T().Log("About to run line #73: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 0, }, map[interface{}]interface{}{'id': 1, }, map[interface{}]interface{}{'id': 2, }, map[interface{}]interface{}{'id': 3, }, map[interface{}]interface{}{'id': 4, }, map[interface{}]interface{}{'id': 5, }, map[interface{}]interface{}{'id': 6, }}).Field('inserted')") + + runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 0}, map[interface{}]interface{}{"id": 1}, map[interface{}]interface{}{"id": 2}, map[interface{}]interface{}{"id": 3}, map[interface{}]interface{}{"id": 4}, map[interface{}]interface{}{"id": 5}, map[interface{}]interface{}{"id": 6}}).Field("inserted"), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #73") + } + + { + // limits.yaml line #85 + /* 7 */ + var expected_ int = 7 + /* tbl.insert([{'id':7}, {'id':8}, {'id':9}, {'id':10}, {'id':11}, {'id':12}, {'id':13}]).get_field('inserted') */ + + suite.T().Log("About to run line #85: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 7, }, map[interface{}]interface{}{'id': 8, }, map[interface{}]interface{}{'id': 9, }, map[interface{}]interface{}{'id': 10, }, map[interface{}]interface{}{'id': 11, }, map[interface{}]interface{}{'id': 12, }, map[interface{}]interface{}{'id': 13, }}).Field('inserted')") + + runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 7}, map[interface{}]interface{}{"id": 8}, map[interface{}]interface{}{"id": 9}, map[interface{}]interface{}{"id": 10}, map[interface{}]interface{}{"id": 11}, map[interface{}]interface{}{"id": 12}, map[interface{}]interface{}{"id": 13}}).Field("inserted"), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #85") + } + + { + // limits.yaml line #97 + /* 14 */ + var expected_ int = 14 + /* tbl.delete().get_field('deleted') */ + + suite.T().Log("About to run line #97: tbl.Delete().Field('deleted')") + + runAndAssert(suite.Suite, expected_, tbl.Delete().Field("deleted"), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #97") + } + + // limits.yaml line #101 + // c2 = tbl.changes(squash=1000000) + suite.T().Log("Possibly executing: var c2 r.Term = tbl.Changes().OptArgs(r.ChangesOpts{Squash: 1000000, })") + + c2 := maybeRun(tbl.Changes().OptArgs(r.ChangesOpts{Squash: 1000000}), suite.session, r.RunOpts{ + ChangefeedQueueSize: 10, + }) + _ = c2 // Prevent any noused variable errors + + { + // limits.yaml line #106 + /* 7 */ + var expected_ int = 7 + /* tbl.insert([{'id':0}, {'id':1}, {'id':2}, {'id':3}, {'id':4}, {'id':5}, {'id':6}]).get_field('inserted') */ + + suite.T().Log("About to run line #106: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 0, }, map[interface{}]interface{}{'id': 1, }, map[interface{}]interface{}{'id': 2, }, map[interface{}]interface{}{'id': 3, }, map[interface{}]interface{}{'id': 4, }, map[interface{}]interface{}{'id': 5, }, map[interface{}]interface{}{'id': 6, }}).Field('inserted')") + + runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 0}, map[interface{}]interface{}{"id": 1}, map[interface{}]interface{}{"id": 2}, map[interface{}]interface{}{"id": 3}, map[interface{}]interface{}{"id": 4}, map[interface{}]interface{}{"id": 5}, map[interface{}]interface{}{"id": 6}}).Field("inserted"), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #106") + } + + { + // limits.yaml line #118 + /* 7 */ + var expected_ int = 7 + /* tbl.insert([{'id':7}, {'id':8}, {'id':9}, {'id':10}, {'id':11}, {'id':12}, {'id':13}]).get_field('inserted') */ + + suite.T().Log("About to run line #118: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 7, }, map[interface{}]interface{}{'id': 8, }, map[interface{}]interface{}{'id': 9, }, map[interface{}]interface{}{'id': 10, }, map[interface{}]interface{}{'id': 11, }, map[interface{}]interface{}{'id': 12, }, map[interface{}]interface{}{'id': 13, }}).Field('inserted')") + + runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 7}, map[interface{}]interface{}{"id": 8}, map[interface{}]interface{}{"id": 9}, map[interface{}]interface{}{"id": 10}, map[interface{}]interface{}{"id": 11}, map[interface{}]interface{}{"id": 12}, map[interface{}]interface{}{"id": 13}}).Field("inserted"), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #118") + } +} diff --git a/internal/integration/reql_tests/reql_match_test.go b/internal/integration/reql_tests/reql_match_test.go index b6a930a0..486f5b9c 100644 --- a/internal/integration/reql_tests/reql_match_test.go +++ b/internal/integration/reql_tests/reql_match_test.go @@ -36,16 +36,16 @@ func (suite *MatchSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_match").Exec(suite.session) - err = r.DBCreate("db_match").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_match").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_match").TableDrop("table_test_match").Exec(suite.session) - err = r.DB("db_match").TableCreate("table_test_match").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_match").Table("table_test_match").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -54,8 +54,8 @@ func (suite *MatchSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_match").TableDrop("table_test_match").Exec(suite.session) - r.DBDrop("db_match").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -64,8 +64,8 @@ func (suite *MatchSuite) TearDownSuite() { func (suite *MatchSuite) TestCases() { suite.T().Log("Running MatchSuite: Tests for match") - table_test_match := r.DB("db_match").Table("table_test_match") - _ = table_test_match // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors { // match.yaml line #4 @@ -133,11 +133,11 @@ func (suite *MatchSuite) TestCases() { // match.yaml line #16 /* ({'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':3}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 3} - /* table_test_match.insert([{'id':0,'a':'abc'},{'id':1,'a':'ab'},{'id':2,'a':'bc'}]) */ + /* tbl.insert([{'id':0,'a':'abc'},{'id':1,'a':'ab'},{'id':2,'a':'bc'}]) */ - suite.T().Log("About to run line #16: table_test_match.Insert([]interface{}{map[interface{}]interface{}{'id': 0, 'a': 'abc', }, map[interface{}]interface{}{'id': 1, 'a': 'ab', }, map[interface{}]interface{}{'id': 2, 'a': 'bc', }})") + suite.T().Log("About to run line #16: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 0, 'a': 'abc', }, map[interface{}]interface{}{'id': 1, 'a': 'ab', }, map[interface{}]interface{}{'id': 2, 'a': 'bc', }})") - runAndAssert(suite.Suite, expected_, table_test_match.Insert([]interface{}{map[interface{}]interface{}{"id": 0, "a": "abc"}, map[interface{}]interface{}{"id": 1, "a": "ab"}, map[interface{}]interface{}{"id": 2, "a": "bc"}}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 0, "a": "abc"}, map[interface{}]interface{}{"id": 1, "a": "ab"}, map[interface{}]interface{}{"id": 2, "a": "bc"}}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -148,11 +148,11 @@ func (suite *MatchSuite) TestCases() { // match.yaml line #20 /* ([{'id':0,'a':'abc'},{'id':1,'a':'ab'},{'id':2,'a':'bc'}]) */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"id": 0, "a": "abc"}, map[interface{}]interface{}{"id": 1, "a": "ab"}, map[interface{}]interface{}{"id": 2, "a": "bc"}} - /* table_test_match.filter(lambda row:row['a'].match('b')).order_by('id') */ + /* tbl.filter(lambda row:row['a'].match('b')).order_by('id') */ - suite.T().Log("About to run line #20: table_test_match.Filter(func(row r.Term) interface{} { return row.AtIndex('a').Match('b')}).OrderBy('id')") + suite.T().Log("About to run line #20: tbl.Filter(func(row r.Term) interface{} { return row.AtIndex('a').Match('b')}).OrderBy('id')") - runAndAssert(suite.Suite, expected_, table_test_match.Filter(func(row r.Term) interface{} { return row.AtIndex("a").Match("b") }).OrderBy("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(func(row r.Term) interface{} { return row.AtIndex("a").Match("b") }).OrderBy("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -163,11 +163,11 @@ func (suite *MatchSuite) TestCases() { // match.yaml line #24 /* ([{'id':0,'a':'abc'},{'id':1,'a':'ab'}]) */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"id": 0, "a": "abc"}, map[interface{}]interface{}{"id": 1, "a": "ab"}} - /* table_test_match.filter(lambda row:row['a'].match('ab')).order_by('id') */ + /* tbl.filter(lambda row:row['a'].match('ab')).order_by('id') */ - suite.T().Log("About to run line #24: table_test_match.Filter(func(row r.Term) interface{} { return row.AtIndex('a').Match('ab')}).OrderBy('id')") + suite.T().Log("About to run line #24: tbl.Filter(func(row r.Term) interface{} { return row.AtIndex('a').Match('ab')}).OrderBy('id')") - runAndAssert(suite.Suite, expected_, table_test_match.Filter(func(row r.Term) interface{} { return row.AtIndex("a").Match("ab") }).OrderBy("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(func(row r.Term) interface{} { return row.AtIndex("a").Match("ab") }).OrderBy("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -178,11 +178,11 @@ func (suite *MatchSuite) TestCases() { // match.yaml line #28 /* ([{'id':1,'a':'ab'}]) */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"id": 1, "a": "ab"}} - /* table_test_match.filter(lambda row:row['a'].match('ab$')).order_by('id') */ + /* tbl.filter(lambda row:row['a'].match('ab$')).order_by('id') */ - suite.T().Log("About to run line #28: table_test_match.Filter(func(row r.Term) interface{} { return row.AtIndex('a').Match('ab$')}).OrderBy('id')") + suite.T().Log("About to run line #28: tbl.Filter(func(row r.Term) interface{} { return row.AtIndex('a').Match('ab$')}).OrderBy('id')") - runAndAssert(suite.Suite, expected_, table_test_match.Filter(func(row r.Term) interface{} { return row.AtIndex("a").Match("ab$") }).OrderBy("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(func(row r.Term) interface{} { return row.AtIndex("a").Match("ab$") }).OrderBy("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -193,11 +193,11 @@ func (suite *MatchSuite) TestCases() { // match.yaml line #32 /* ([]) */ var expected_ []interface{} = []interface{}{} - /* table_test_match.filter(lambda row:row['a'].match('^b$')).order_by('id') */ + /* tbl.filter(lambda row:row['a'].match('^b$')).order_by('id') */ - suite.T().Log("About to run line #32: table_test_match.Filter(func(row r.Term) interface{} { return row.AtIndex('a').Match('^b$')}).OrderBy('id')") + suite.T().Log("About to run line #32: tbl.Filter(func(row r.Term) interface{} { return row.AtIndex('a').Match('^b$')}).OrderBy('id')") - runAndAssert(suite.Suite, expected_, table_test_match.Filter(func(row r.Term) interface{} { return row.AtIndex("a").Match("^b$") }).OrderBy("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(func(row r.Term) interface{} { return row.AtIndex("a").Match("^b$") }).OrderBy("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_math_logic_add_test.go b/internal/integration/reql_tests/reql_math_logic_add_test.go index e17d0be6..fe53ddef 100644 --- a/internal/integration/reql_tests/reql_math_logic_add_test.go +++ b/internal/integration/reql_tests/reql_math_logic_add_test.go @@ -36,10 +36,10 @@ func (suite *MathLogicAddSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_logic_add").Exec(suite.session) - err = r.DBCreate("db_logic_add").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_logic_add").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *MathLogicAddSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_logic_add").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_math_logic_aliases_test.go b/internal/integration/reql_tests/reql_math_logic_aliases_test.go index 57c5ab5c..f99aa772 100644 --- a/internal/integration/reql_tests/reql_math_logic_aliases_test.go +++ b/internal/integration/reql_tests/reql_math_logic_aliases_test.go @@ -36,10 +36,10 @@ func (suite *MathLogicAliasesSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_logic_ali").Exec(suite.session) - err = r.DBCreate("db_logic_ali").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_logic_ali").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *MathLogicAliasesSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_logic_ali").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_math_logic_bit_test.go b/internal/integration/reql_tests/reql_math_logic_bit_test.go new file mode 100644 index 00000000..e5042250 --- /dev/null +++ b/internal/integration/reql_tests/reql_math_logic_bit_test.go @@ -0,0 +1,675 @@ +// Code generated by gen_tests.py and process_polyglot.py. +// Do not edit this file directly. +// The template for this file is located at: +// ../template.go.tpl +package reql_tests + +import ( + "testing" + "time" + + "github.com/stretchr/testify/suite" + r "gopkg.in/rethinkdb/rethinkdb-go.v6" + "gopkg.in/rethinkdb/rethinkdb-go.v6/internal/compare" +) + +// Tests bitwise operators +func TestMathLogicBitSuite(t *testing.T) { + suite.Run(t, new(MathLogicBitSuite)) +} + +type MathLogicBitSuite struct { + suite.Suite + + session *r.Session +} + +func (suite *MathLogicBitSuite) SetupTest() { + suite.T().Log("Setting up MathLogicBitSuite") + // Use imports to prevent errors + _ = time.Time{} + _ = compare.AnythingIsFine + + session, err := r.Connect(r.ConnectOpts{ + Address: url, + }) + suite.Require().NoError(err, "Error returned when connecting to server") + suite.session = session + + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) + suite.Require().NoError(err) + err = r.DB("test").Wait().Exec(suite.session) + suite.Require().NoError(err) + +} + +func (suite *MathLogicBitSuite) TearDownSuite() { + suite.T().Log("Tearing down MathLogicBitSuite") + + if suite.session != nil { + r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + + suite.session.Close() + } +} + +func (suite *MathLogicBitSuite) TestCases() { + suite.T().Log("Running MathLogicBitSuite: Tests bitwise operators") + + { + // math_logic/bit.yaml line #4 + /* 2 */ + var expected_ int = 2 + /* r.expr(3).bit_and(2) */ + + suite.T().Log("About to run line #4: r.Expr(3).BitAnd(2)") + + runAndAssert(suite.Suite, expected_, r.Expr(3).BitAnd(2), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #4") + } + + { + // math_logic/bit.yaml line #7 + /* 2 */ + var expected_ int = 2 + /* r.expr(-2).bit_and(3) */ + + suite.T().Log("About to run line #7: r.Expr(-2).BitAnd(3)") + + runAndAssert(suite.Suite, expected_, r.Expr(-2).BitAnd(3), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #7") + } + + { + // math_logic/bit.yaml line #10 + /* err('ReqlQueryLogicError', 'Integer too large: 9007199254740992') */ + var expected_ Err = err("ReqlQueryLogicError", "Integer too large: 9007199254740992") + /* r.expr(9007199254740992).bit_and(0) */ + + suite.T().Log("About to run line #10: r.Expr(9007199254740992).BitAnd(0)") + + runAndAssert(suite.Suite, expected_, r.Expr(9007199254740992).BitAnd(0), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #10") + } + + { + // math_logic/bit.yaml line #13 + /* err('ReqlQueryLogicError', 'Number not an integer (>2^53): 9007199254740994') */ + var expected_ Err = err("ReqlQueryLogicError", "Number not an integer (>2^53): 9007199254740994") + /* r.expr(9007199254740994).bit_and(0) */ + + suite.T().Log("About to run line #13: r.Expr(9007199254740994).BitAnd(0)") + + runAndAssert(suite.Suite, expected_, r.Expr(9007199254740994).BitAnd(0), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #13") + } + + { + // math_logic/bit.yaml line #16 + /* 23 */ + var expected_ int = 23 + /* r.expr(9007199254740991).bit_and(23) */ + + suite.T().Log("About to run line #16: r.Expr(9007199254740991).BitAnd(23)") + + runAndAssert(suite.Suite, expected_, r.Expr(9007199254740991).BitAnd(23), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #16") + } + + { + // math_logic/bit.yaml line #19 + /* 0 */ + var expected_ int = 0 + /* r.expr(-9007199254740992).bit_and(12345) */ + + suite.T().Log("About to run line #19: r.Expr(-9007199254740992).BitAnd(12345)") + + runAndAssert(suite.Suite, expected_, r.Expr(-9007199254740992).BitAnd(12345), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #19") + } + + { + // math_logic/bit.yaml line #22 + /* 3 */ + var expected_ int = 3 + /* r.expr(1).bit_or(2) */ + + suite.T().Log("About to run line #22: r.Expr(1).BitOr(2)") + + runAndAssert(suite.Suite, expected_, r.Expr(1).BitOr(2), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #22") + } + + { + // math_logic/bit.yaml line #25 + /* err('ReqlQueryLogicError', 'Integer too large: 9007199254740992') */ + var expected_ Err = err("ReqlQueryLogicError", "Integer too large: 9007199254740992") + /* r.expr(9007199254740992).bit_or(0) */ + + suite.T().Log("About to run line #25: r.Expr(9007199254740992).BitOr(0)") + + runAndAssert(suite.Suite, expected_, r.Expr(9007199254740992).BitOr(0), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #25") + } + + { + // math_logic/bit.yaml line #28 + /* 9007199254740991 */ + var expected_ int = 9007199254740991 + /* r.expr(9007199254740991).bit_or(0) */ + + suite.T().Log("About to run line #28: r.Expr(9007199254740991).BitOr(0)") + + runAndAssert(suite.Suite, expected_, r.Expr(9007199254740991).BitOr(0), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #28") + } + + { + // math_logic/bit.yaml line #31 + /* -1 */ + var expected_ int = -1 + /* r.expr(9007199254740991).bit_or(-1) */ + + suite.T().Log("About to run line #31: r.Expr(9007199254740991).BitOr(-1)") + + runAndAssert(suite.Suite, expected_, r.Expr(9007199254740991).BitOr(-1), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #31") + } + + { + // math_logic/bit.yaml line #34 + /* 5 */ + var expected_ int = 5 + /* r.expr(3).bit_xor(6) */ + + suite.T().Log("About to run line #34: r.Expr(3).BitXor(6)") + + runAndAssert(suite.Suite, expected_, r.Expr(3).BitXor(6), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #34") + } + + { + // math_logic/bit.yaml line #37 + /* -3 */ + var expected_ int = -3 + /* r.expr(2).bit_not() */ + + suite.T().Log("About to run line #37: r.Expr(2).BitNot()") + + runAndAssert(suite.Suite, expected_, r.Expr(2).BitNot(), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #37") + } + + { + // math_logic/bit.yaml line #40 + /* -9007199254740992 */ + var expected_ int = -9007199254740992 + /* r.expr(9007199254740991).bit_not() */ + + suite.T().Log("About to run line #40: r.Expr(9007199254740991).BitNot()") + + runAndAssert(suite.Suite, expected_, r.Expr(9007199254740991).BitNot(), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #40") + } + + { + // math_logic/bit.yaml line #43 + /* 9007199254740991 */ + var expected_ int = 9007199254740991 + /* r.expr(9007199254740991).bit_not().bit_not() */ + + suite.T().Log("About to run line #43: r.Expr(9007199254740991).BitNot().BitNot()") + + runAndAssert(suite.Suite, expected_, r.Expr(9007199254740991).BitNot().BitNot(), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #43") + } + + { + // math_logic/bit.yaml line #47 + /* err('ReqlQueryLogicError', 'Integer too large: 9007199254740992') */ + var expected_ Err = err("ReqlQueryLogicError", "Integer too large: 9007199254740992") + /* r.expr(9007199254740992).bit_sar(0) */ + + suite.T().Log("About to run line #47: r.Expr(9007199254740992).BitSar(0)") + + runAndAssert(suite.Suite, expected_, r.Expr(9007199254740992).BitSar(0), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #47") + } + + { + // math_logic/bit.yaml line #50 + /* -9007199254740992 */ + var expected_ int = -9007199254740992 + /* r.expr(-9007199254740992).bit_sar(0) */ + + suite.T().Log("About to run line #50: r.Expr(-9007199254740992).BitSar(0)") + + runAndAssert(suite.Suite, expected_, r.Expr(-9007199254740992).BitSar(0), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #50") + } + + { + // math_logic/bit.yaml line #53 + /* -4503599627370496 */ + var expected_ int = -4503599627370496 + /* r.expr(-9007199254740992).bit_sar(1) */ + + suite.T().Log("About to run line #53: r.Expr(-9007199254740992).BitSar(1)") + + runAndAssert(suite.Suite, expected_, r.Expr(-9007199254740992).BitSar(1), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #53") + } + + { + // math_logic/bit.yaml line #56 + /* -2 */ + var expected_ int = -2 + /* r.expr(-9007199254740992).bit_sar(52) */ + + suite.T().Log("About to run line #56: r.Expr(-9007199254740992).BitSar(52)") + + runAndAssert(suite.Suite, expected_, r.Expr(-9007199254740992).BitSar(52), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #56") + } + + { + // math_logic/bit.yaml line #59 + /* -1 */ + var expected_ int = -1 + /* r.expr(-9007199254740992).bit_sar(53) */ + + suite.T().Log("About to run line #59: r.Expr(-9007199254740992).BitSar(53)") + + runAndAssert(suite.Suite, expected_, r.Expr(-9007199254740992).BitSar(53), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #59") + } + + { + // math_logic/bit.yaml line #62 + /* -1 */ + var expected_ int = -1 + /* r.expr(-9007199254740992).bit_sar(54) */ + + suite.T().Log("About to run line #62: r.Expr(-9007199254740992).BitSar(54)") + + runAndAssert(suite.Suite, expected_, r.Expr(-9007199254740992).BitSar(54), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #62") + } + + { + // math_logic/bit.yaml line #65 + /* 9007199254740991 */ + var expected_ int = 9007199254740991 + /* r.expr(9007199254740991).bit_sar(0) */ + + suite.T().Log("About to run line #65: r.Expr(9007199254740991).BitSar(0)") + + runAndAssert(suite.Suite, expected_, r.Expr(9007199254740991).BitSar(0), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #65") + } + + { + // math_logic/bit.yaml line #68 + /* 4503599627370495 */ + var expected_ int = 4503599627370495 + /* r.expr(9007199254740991).bit_sar(1) */ + + suite.T().Log("About to run line #68: r.Expr(9007199254740991).BitSar(1)") + + runAndAssert(suite.Suite, expected_, r.Expr(9007199254740991).BitSar(1), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #68") + } + + { + // math_logic/bit.yaml line #71 + /* 1 */ + var expected_ int = 1 + /* r.expr(9007199254740991).bit_sar(52) */ + + suite.T().Log("About to run line #71: r.Expr(9007199254740991).BitSar(52)") + + runAndAssert(suite.Suite, expected_, r.Expr(9007199254740991).BitSar(52), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #71") + } + + { + // math_logic/bit.yaml line #74 + /* 0 */ + var expected_ int = 0 + /* r.expr(9007199254740991).bit_sar(53) */ + + suite.T().Log("About to run line #74: r.Expr(9007199254740991).BitSar(53)") + + runAndAssert(suite.Suite, expected_, r.Expr(9007199254740991).BitSar(53), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #74") + } + + { + // math_logic/bit.yaml line #78 + /* 0 */ + var expected_ int = 0 + /* r.expr(0).bit_sal(999999) */ + + suite.T().Log("About to run line #78: r.Expr(0).BitSal(999999)") + + runAndAssert(suite.Suite, expected_, r.Expr(0).BitSal(999999), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #78") + } + + { + // math_logic/bit.yaml line #81 + /* 0 */ + var expected_ int = 0 + /* r.expr(0).bit_sal(3000) */ + + suite.T().Log("About to run line #81: r.Expr(0).BitSal(3000)") + + runAndAssert(suite.Suite, expected_, r.Expr(0).BitSal(3000), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #81") + } + + { + // math_logic/bit.yaml line #84 + /* 0 */ + var expected_ int = 0 + /* r.expr(0).bit_sal(500) */ + + suite.T().Log("About to run line #84: r.Expr(0).BitSal(500)") + + runAndAssert(suite.Suite, expected_, r.Expr(0).BitSal(500), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #84") + } + + { + // math_logic/bit.yaml line #87 + /* 0 */ + var expected_ int = 0 + /* r.expr(0).bit_sal(0) */ + + suite.T().Log("About to run line #87: r.Expr(0).BitSal(0)") + + runAndAssert(suite.Suite, expected_, r.Expr(0).BitSal(0), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #87") + } + + { + // math_logic/bit.yaml line #90 + /* 1 */ + var expected_ int = 1 + /* r.expr(1).bit_sal(0) */ + + suite.T().Log("About to run line #90: r.Expr(1).BitSal(0)") + + runAndAssert(suite.Suite, expected_, r.Expr(1).BitSal(0), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #90") + } + + { + // math_logic/bit.yaml line #93 + /* 2 */ + var expected_ int = 2 + /* r.expr(1).bit_sal(1) */ + + suite.T().Log("About to run line #93: r.Expr(1).BitSal(1)") + + runAndAssert(suite.Suite, expected_, r.Expr(1).BitSal(1), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #93") + } + + { + // math_logic/bit.yaml line #96 + /* 8 */ + var expected_ int = 8 + /* r.expr(1).bit_sal(3) */ + + suite.T().Log("About to run line #96: r.Expr(1).BitSal(3)") + + runAndAssert(suite.Suite, expected_, r.Expr(1).BitSal(3), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #96") + } + + { + // math_logic/bit.yaml line #99 + /* -8 */ + var expected_ int = -8 + /* r.expr(-1).bit_sal(3) */ + + suite.T().Log("About to run line #99: r.Expr(-1).BitSal(3)") + + runAndAssert(suite.Suite, expected_, r.Expr(-1).BitSal(3), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #99") + } + + { + // math_logic/bit.yaml line #102 + /* -18014398509481984 */ + var expected_ int = -18014398509481984 + /* r.expr(-1).bit_sal(54) */ + + suite.T().Log("About to run line #102: r.Expr(-1).BitSal(54)") + + runAndAssert(suite.Suite, expected_, r.Expr(-1).BitSal(54), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #102") + } + + { + // math_logic/bit.yaml line #105 + /* 18014398509481984 */ + var expected_ int = 18014398509481984 + /* r.expr(1).bit_sal(54) */ + + suite.T().Log("About to run line #105: r.Expr(1).BitSal(54)") + + runAndAssert(suite.Suite, expected_, r.Expr(1).BitSal(54), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #105") + } + + { + // math_logic/bit.yaml line #108 + /* -18014398509481984 */ + var expected_ int = -18014398509481984 + /* r.expr(-2).bit_sal(53) */ + + suite.T().Log("About to run line #108: r.Expr(-2).BitSal(53)") + + runAndAssert(suite.Suite, expected_, r.Expr(-2).BitSal(53), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #108") + } + + { + // math_logic/bit.yaml line #111 + /* 18014398509481984 */ + var expected_ int = 18014398509481984 + /* r.expr(2).bit_sal(53) */ + + suite.T().Log("About to run line #111: r.Expr(2).BitSal(53)") + + runAndAssert(suite.Suite, expected_, r.Expr(2).BitSal(53), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #111") + } + + { + // math_logic/bit.yaml line #114 + /* err('ReqlQueryLogicError', 'Cannot bit-shift by a negative value') */ + var expected_ Err = err("ReqlQueryLogicError", "Cannot bit-shift by a negative value") + /* r.expr(5).bit_sal(-1) */ + + suite.T().Log("About to run line #114: r.Expr(5).BitSal(-1)") + + runAndAssert(suite.Suite, expected_, r.Expr(5).BitSal(-1), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #114") + } + + { + // math_logic/bit.yaml line #117 + /* err('ReqlQueryLogicError', 'Cannot bit-shift by a negative value') */ + var expected_ Err = err("ReqlQueryLogicError", "Cannot bit-shift by a negative value") + /* r.expr(5).bit_sar(-1) */ + + suite.T().Log("About to run line #117: r.Expr(5).BitSar(-1)") + + runAndAssert(suite.Suite, expected_, r.Expr(5).BitSar(-1), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #117") + } + + { + // math_logic/bit.yaml line #121 + /* err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [0]) */ + var expected_ Err = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.") + /* r.expr('a').bit_and(12) */ + + suite.T().Log("About to run line #121: r.Expr('a').BitAnd(12)") + + runAndAssert(suite.Suite, expected_, r.Expr("a").BitAnd(12), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #121") + } + + { + // math_logic/bit.yaml line #124 + /* err('ReqlQueryLogicError', 'Expected type NUMBER but found STRING.', [1]) */ + var expected_ Err = err("ReqlQueryLogicError", "Expected type NUMBER but found STRING.") + /* r.expr(12).bit_and('a') */ + + suite.T().Log("About to run line #124: r.Expr(12).BitAnd('a')") + + runAndAssert(suite.Suite, expected_, r.Expr(12).BitAnd("a"), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #124") + } + + { + // math_logic/bit.yaml line #127 + /* err('ReqlQueryLogicError', 'Number not an integer: 1.5') */ + var expected_ Err = err("ReqlQueryLogicError", "Number not an integer: 1.5") + /* r.expr(1.5).bit_and(3) */ + + suite.T().Log("About to run line #127: r.Expr(1.5).BitAnd(3)") + + runAndAssert(suite.Suite, expected_, r.Expr(1.5).BitAnd(3), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #127") + } +} diff --git a/internal/integration/reql_tests/reql_math_logic_comparison_test.go b/internal/integration/reql_tests/reql_math_logic_comparison_test.go index 59143a6a..e2e15949 100644 --- a/internal/integration/reql_tests/reql_math_logic_comparison_test.go +++ b/internal/integration/reql_tests/reql_math_logic_comparison_test.go @@ -36,10 +36,10 @@ func (suite *MathLogicComparisonSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_logic_comp").Exec(suite.session) - err = r.DBCreate("db_logic_comp").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_logic_comp").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *MathLogicComparisonSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_logic_comp").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_math_logic_div_test.go b/internal/integration/reql_tests/reql_math_logic_div_test.go index 237ae40c..b1727c4e 100644 --- a/internal/integration/reql_tests/reql_math_logic_div_test.go +++ b/internal/integration/reql_tests/reql_math_logic_div_test.go @@ -36,10 +36,10 @@ func (suite *MathLogicDivSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_logic_div").Exec(suite.session) - err = r.DBCreate("db_logic_div").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_logic_div").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *MathLogicDivSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_logic_div").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_math_logic_floor_ceil_round_test.go b/internal/integration/reql_tests/reql_math_logic_floor_ceil_round_test.go index 44fcd893..347b2619 100644 --- a/internal/integration/reql_tests/reql_math_logic_floor_ceil_round_test.go +++ b/internal/integration/reql_tests/reql_math_logic_floor_ceil_round_test.go @@ -36,10 +36,10 @@ func (suite *MathLogicFloorCeilRoundSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_logic_floor").Exec(suite.session) - err = r.DBCreate("db_logic_floor").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_logic_floor").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *MathLogicFloorCeilRoundSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_logic_floor").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_math_logic_logic_test.go b/internal/integration/reql_tests/reql_math_logic_logic_test.go index bdc981e9..cdea9727 100644 --- a/internal/integration/reql_tests/reql_math_logic_logic_test.go +++ b/internal/integration/reql_tests/reql_math_logic_logic_test.go @@ -36,10 +36,10 @@ func (suite *MathLogicLogicSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_logic2").Exec(suite.session) - err = r.DBCreate("db_logic2").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_logic2").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *MathLogicLogicSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_logic2").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -704,62 +704,62 @@ func (suite *MathLogicLogicSuite) TestCases() { } { - // math_logic/logic.yaml line #155 + // math_logic/logic.yaml line #156 /* true */ var expected_ bool = true /* r.expr(1) & True */ - suite.T().Log("About to run line #155: r.Expr(1).And(true)") + suite.T().Log("About to run line #156: r.Expr(1).And(true)") runAndAssert(suite.Suite, expected_, r.Expr(1).And(true), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #155") + suite.T().Log("Finished running line #156") } { - // math_logic/logic.yaml line #159 + // math_logic/logic.yaml line #160 /* ("str") */ var expected_ string = "str" /* r.expr(False) | 'str' */ - suite.T().Log("About to run line #159: r.Expr(false).Or('str')") + suite.T().Log("About to run line #160: r.Expr(false).Or('str')") runAndAssert(suite.Suite, expected_, r.Expr(false).Or("str"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #159") + suite.T().Log("Finished running line #160") } { - // math_logic/logic.yaml line #163 + // math_logic/logic.yaml line #164 /* false */ var expected_ bool = false /* ~r.expr(1) */ - suite.T().Log("About to run line #163: r.Expr(1).Not()") + suite.T().Log("About to run line #164: r.Expr(1).Not()") runAndAssert(suite.Suite, expected_, r.Expr(1).Not(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #163") + suite.T().Log("Finished running line #164") } { - // math_logic/logic.yaml line #167 + // math_logic/logic.yaml line #168 /* true */ var expected_ bool = true /* ~r.expr(null) */ - suite.T().Log("About to run line #167: r.Expr(nil).Not()") + suite.T().Log("About to run line #168: r.Expr(nil).Not()") runAndAssert(suite.Suite, expected_, r.Expr(nil).Not(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #167") + suite.T().Log("Finished running line #168") } } diff --git a/internal/integration/reql_tests/reql_math_logic_math_test.go b/internal/integration/reql_tests/reql_math_logic_math_test.go index dbd99205..f2e2319f 100644 --- a/internal/integration/reql_tests/reql_math_logic_math_test.go +++ b/internal/integration/reql_tests/reql_math_logic_math_test.go @@ -36,10 +36,10 @@ func (suite *MathLogicMathSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_logic_math").Exec(suite.session) - err = r.DBCreate("db_logic_math").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_logic_math").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *MathLogicMathSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_logic_math").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_math_logic_mod_test.go b/internal/integration/reql_tests/reql_math_logic_mod_test.go index 8a2d4e7f..6b245795 100644 --- a/internal/integration/reql_tests/reql_math_logic_mod_test.go +++ b/internal/integration/reql_tests/reql_math_logic_mod_test.go @@ -36,10 +36,10 @@ func (suite *MathLogicModSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_logic_mod").Exec(suite.session) - err = r.DBCreate("db_logic_mod").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_logic_mod").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *MathLogicModSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_logic_mod").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_math_logic_mul_test.go b/internal/integration/reql_tests/reql_math_logic_mul_test.go index c679def4..1ddb74d8 100644 --- a/internal/integration/reql_tests/reql_math_logic_mul_test.go +++ b/internal/integration/reql_tests/reql_math_logic_mul_test.go @@ -36,10 +36,10 @@ func (suite *MathLogicMulSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_logic_mul").Exec(suite.session) - err = r.DBCreate("db_logic_mul").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_logic_mul").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *MathLogicMulSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_logic_mul").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_math_logic_sub_test.go b/internal/integration/reql_tests/reql_math_logic_sub_test.go index 535f382c..4d5ad59f 100644 --- a/internal/integration/reql_tests/reql_math_logic_sub_test.go +++ b/internal/integration/reql_tests/reql_math_logic_sub_test.go @@ -36,10 +36,10 @@ func (suite *MathLogicSubSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_logic_sub").Exec(suite.session) - err = r.DBCreate("db_logic_sub").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_logic_sub").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *MathLogicSubSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_logic_sub").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_meta_composite_test.go b/internal/integration/reql_tests/reql_meta_composite_test.go deleted file mode 100644 index 9a0a0a7d..00000000 --- a/internal/integration/reql_tests/reql_meta_composite_test.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by gen_tests.py and process_polyglot.py. -// Do not edit this file directly. -// The template for this file is located at: -// ../template.go.tpl -package reql_tests - -import ( - "testing" - "time" - - "github.com/stretchr/testify/suite" - r "gopkg.in/rethinkdb/rethinkdb-go.v6" - "gopkg.in/rethinkdb/rethinkdb-go.v6/internal/compare" -) - -// Tests meta operations in composite queries -func TestMetaCompositeSuite(t *testing.T) { - suite.Run(t, new(MetaCompositeSuite)) -} - -type MetaCompositeSuite struct { - suite.Suite - - session *r.Session -} - -func (suite *MetaCompositeSuite) SetupTest() { - suite.T().Log("Setting up MetaCompositeSuite") - // Use imports to prevent errors - _ = time.Time{} - _ = compare.AnythingIsFine - - session, err := r.Connect(r.ConnectOpts{ - Address: url, - }) - suite.Require().NoError(err, "Error returned when connecting to server") - suite.session = session - - r.DBDrop("db_composite").Exec(suite.session) - err = r.DBCreate("db_composite").Exec(suite.session) - suite.Require().NoError(err) - err = r.DB("db_composite").Wait().Exec(suite.session) - suite.Require().NoError(err) - -} - -func (suite *MetaCompositeSuite) TearDownSuite() { - suite.T().Log("Tearing down MetaCompositeSuite") - - if suite.session != nil { - r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_composite").Exec(suite.session) - - suite.session.Close() - } -} - -func (suite *MetaCompositeSuite) TestCases() { - suite.T().Log("Running MetaCompositeSuite: Tests meta operations in composite queries") - - { - // meta/composite.py.yaml line #4 - /* ({'dbs_created':3,'config_changes':arrlen(3)}) */ - var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"dbs_created": 3, "config_changes": arrlen(3)} - /* r.expr([1,2,3]).for_each(r.db_create('db_' + r.row.coerce_to('string'))) */ - - suite.T().Log("About to run line #4: r.Expr([]interface{}{1, 2, 3}).ForEach(r.DBCreate(r.Add('db_', r.Row.CoerceTo('string'))))") - - runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(r.DBCreate(r.Add("db_", r.Row.CoerceTo("string")))), suite.session, r.RunOpts{ - GeometryFormat: "raw", - GroupFormat: "map", - }) - suite.T().Log("Finished running line #4") - } - - { - // meta/composite.py.yaml line #8 - /* partial({'tables_created':9}) */ - var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"tables_created": 9}) - /* r.db_list().set_difference(["rethinkdb", "test"]).for_each(lambda db_name: - r.expr([1,2,3]).for_each(lambda i: - r.db(db_name).table_create('tbl_' + i.coerce_to('string')))) */ - - suite.T().Log("About to run line #8: r.DBList().SetDifference([]interface{}{'rethinkdb', 'test'}).ForEach(func(db_name r.Term) interface{} { return r.Expr([]interface{}{1, 2, 3}).ForEach(func(i r.Term) interface{} { return r.DB(db_name).TableCreate(r.Add('tbl_', i.CoerceTo('string')))})})") - - runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach( - func(i r.Term) interface{} { - return r.Expr([]interface{}{1, 2, 3}).ForEach(func(j r.Term) interface{} { - return r.DB(r.Add("db_", i.CoerceTo("string"))).TableCreate(r.Add("tbl_", j.CoerceTo("string"))) - }) - }), suite.session, r.RunOpts{ - GeometryFormat: "raw", - GroupFormat: "map", - }) - suite.T().Log("Finished running line #8") - } - - { - // meta/composite.py.yaml line #13 - /* partial({'dbs_dropped':3,'tables_dropped':9}) */ - var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"dbs_dropped": 3, "tables_dropped": 9}) - /* r.db_list().set_difference(["rethinkdb", "test"]).for_each(r.db_drop(r.row)) */ - - suite.T().Log("About to run line #13: r.DBList().SetDifference([]interface{}{'rethinkdb', 'test'}).ForEach(r.DBDrop(r.Row))") - - runAndAssert(suite.Suite, expected_, r.Expr([]interface{}{1, 2, 3}).ForEach(r.DBDrop(r.Add("db_", r.Row.CoerceTo("string")))), suite.session, r.RunOpts{ - GeometryFormat: "raw", - GroupFormat: "map", - }) - suite.T().Log("Finished running line #13") - } -} diff --git a/internal/integration/reql_tests/reql_meta_dbs_test.go b/internal/integration/reql_tests/reql_meta_dbs_test.go index de845668..f4d509c8 100644 --- a/internal/integration/reql_tests/reql_meta_dbs_test.go +++ b/internal/integration/reql_tests/reql_meta_dbs_test.go @@ -36,10 +36,10 @@ func (suite *MetaDbsSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_dbs").Exec(suite.session) - err = r.DBCreate("db_dbs").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_dbs").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *MetaDbsSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_dbs").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -58,21 +58,6 @@ func (suite *MetaDbsSuite) TearDownSuite() { func (suite *MetaDbsSuite) TestCases() { suite.T().Log("Running MetaDbsSuite: Tests meta queries for databases") - { - // meta/dbs.yaml line #6 - /* bag(['rethinkdb', 'test']) */ - var expected_ compare.Expected = compare.PartialMatch([]interface{}{"rethinkdb", "db_dbs"}) - /* r.db_list() */ - - suite.T().Log("About to run line #6: r.DBList()") - - runAndAssert(suite.Suite, expected_, r.DBList(), suite.session, r.RunOpts{ - GeometryFormat: "raw", - GroupFormat: "map", - }) - suite.T().Log("Finished running line #6") - } - { // meta/dbs.yaml line #11 /* partial({'dbs_created':1}) */ @@ -103,21 +88,6 @@ func (suite *MetaDbsSuite) TestCases() { suite.T().Log("Finished running line #13") } - { - // meta/dbs.yaml line #18 - /* bag(['rethinkdb', 'a', 'b', 'test']) */ - var expected_ compare.Expected = compare.PartialMatch([]interface{}{"rethinkdb", "a", "b", "db_dbs"}) - /* r.db_list() */ - - suite.T().Log("About to run line #18: r.DBList()") - - runAndAssert(suite.Suite, expected_, r.DBList(), suite.session, r.RunOpts{ - GeometryFormat: "raw", - GroupFormat: "map", - }) - suite.T().Log("Finished running line #18") - } - { // meta/dbs.yaml line #23 /* {'name':'a','id':uuid()} */ @@ -148,21 +118,6 @@ func (suite *MetaDbsSuite) TestCases() { suite.T().Log("Finished running line #28") } - { - // meta/dbs.yaml line #31 - /* bag(['rethinkdb', 'a', 'test']) */ - var expected_ compare.Expected = compare.PartialMatch([]interface{}{"rethinkdb", "a", "db_dbs"}) - /* r.db_list() */ - - suite.T().Log("About to run line #31: r.DBList()") - - runAndAssert(suite.Suite, expected_, r.DBList(), suite.session, r.RunOpts{ - GeometryFormat: "raw", - GroupFormat: "map", - }) - suite.T().Log("Finished running line #31") - } - { // meta/dbs.yaml line #34 /* partial({'dbs_dropped':1}) */ @@ -178,21 +133,6 @@ func (suite *MetaDbsSuite) TestCases() { suite.T().Log("Finished running line #34") } - { - // meta/dbs.yaml line #37 - /* bag(['rethinkdb', 'test']) */ - var expected_ compare.Expected = compare.PartialMatch([]interface{}{"rethinkdb", "db_dbs"}) - /* r.db_list() */ - - suite.T().Log("About to run line #37: r.DBList()") - - runAndAssert(suite.Suite, expected_, r.DBList(), suite.session, r.RunOpts{ - GeometryFormat: "raw", - GroupFormat: "map", - }) - suite.T().Log("Finished running line #37") - } - { // meta/dbs.yaml line #41 /* partial({'dbs_created':1}) */ diff --git a/internal/integration/reql_tests/reql_meta_table_test.go b/internal/integration/reql_tests/reql_meta_table_test.go index 88545998..3f201c43 100644 --- a/internal/integration/reql_tests/reql_meta_table_test.go +++ b/internal/integration/reql_tests/reql_meta_table_test.go @@ -36,10 +36,10 @@ func (suite *MetaTableSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_mtable").Exec(suite.session) - err = r.DBCreate("db_mtable").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_mtable").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *MetaTableSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_mtable").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -62,7 +62,7 @@ func (suite *MetaTableSuite) TestCases() { // db = r.db('test') suite.T().Log("Possibly executing: var db r.Term = r.DB('test')") - db := r.DB("db_mtable") + db := r.DB("test") _ = db // Prevent any noused variable errors { @@ -82,8 +82,8 @@ func (suite *MetaTableSuite) TestCases() { { // meta/table.yaml line #9 - /* ({'type':'DB','name':'rethinkdb','id':null}) */ - var expected_ = compare.PartialMatch(map[interface{}]interface{}{"type": "DB", "name": "rethinkdb"}) + /* ({'type':'DB','name':'rethinkdb','id':uuid()}) */ + var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"type": "DB", "name": "rethinkdb", "id": compare.IsUUID()} /* r.db('rethinkdb').info() */ suite.T().Log("About to run line #9: r.DB('rethinkdb').Info()") @@ -97,10 +97,10 @@ func (suite *MetaTableSuite) TestCases() { { // meta/table.yaml line #12 - /* partial({'db':{'type':'DB','name':'rethinkdb','id':null}, - 'type':'TABLE','id':null,'name':'stats', + /* partial({'db':{'type':'DB','name':'rethinkdb','id':uuid()}, + 'type':'TABLE','id':uuid(),'name':'stats', 'indexes':[],'primary_key':'id'}) */ - var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"db": map[interface{}]interface{}{"type": "DB", "name": "rethinkdb"}, "type": "TABLE", "name": "stats", "indexes": []interface{}{}, "primary_key": "id"}) + var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"db": map[interface{}]interface{}{"type": "DB", "name": "rethinkdb", "id": compare.IsUUID()}, "type": "TABLE", "id": compare.IsUUID(), "name": "stats", "indexes": []interface{}{}, "primary_key": "id"}) /* r.db('rethinkdb').table('stats').info() */ suite.T().Log("About to run line #12: r.DB('rethinkdb').Table('stats').Info()") @@ -550,7 +550,7 @@ func (suite *MetaTableSuite) TestCases() { { // meta/table.yaml line #135 /* err('ReqlOpFailedError', 'Table `test.foo` already exists.', [0]) */ - var expected_ Err = err("ReqlOpFailedError", "Table `db_mtable.foo` already exists.") + var expected_ Err = err("ReqlOpFailedError", "Table `test.foo` already exists.") /* db.table_create('foo') */ suite.T().Log("About to run line #135: db.TableCreate('foo')") @@ -580,7 +580,7 @@ func (suite *MetaTableSuite) TestCases() { { // meta/table.yaml line #141 /* err('ReqlOpFailedError', 'Table `test.foo` does not exist.', [0]) */ - var expected_ Err = err("ReqlOpFailedError", "Table `db_mtable.foo` does not exist.") + var expected_ Err = err("ReqlOpFailedError", "Table `test.foo` does not exist.") /* db.table_drop('foo') */ suite.T().Log("About to run line #141: db.TableDrop('foo')") @@ -1157,12 +1157,12 @@ func (suite *MetaTableSuite) TestCases() { { // meta/table.yaml line #324 /* {'db':'test','name':'testA'} */ - var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"db": "db_mtable", "name": "testA"} + var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"db": "test", "name": "testA"} /* r.table('testA').config().pluck('db','name') */ suite.T().Log("About to run line #324: r.Table('testA').Config().Pluck('db', 'name')") - runAndAssert(suite.Suite, expected_, db.Table("testA").Config().Pluck("db", "name"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Table("testA").Config().Pluck("db", "name"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1207,7 +1207,7 @@ func (suite *MetaTableSuite) TestCases() { suite.T().Log("About to run line #333: r.DB('rethinkdb').Table('table_config').Filter(map[interface{}]interface{}{'name': 'testA', }).Nth(0).Eq(r.Table('testA').Config())") - runAndAssert(suite.Suite, expected_, r.DB("rethinkdb").Table("table_config").Filter(map[interface{}]interface{}{"name": "testA"}).Nth(0).Eq(db.Table("testA").Config()), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB("rethinkdb").Table("table_config").Filter(map[interface{}]interface{}{"name": "testA"}).Nth(0).Eq(r.Table("testA").Config()), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1222,7 +1222,7 @@ func (suite *MetaTableSuite) TestCases() { suite.T().Log("About to run line #336: r.DB('rethinkdb').Table('table_status').Filter(map[interface{}]interface{}{'name': 'testA', }).Nth(0).Eq(r.Table('testA').Status())") - runAndAssert(suite.Suite, expected_, r.DB("rethinkdb").Table("table_status").Filter(map[interface{}]interface{}{"name": "testA"}).Nth(0).Eq(db.Table("testA").Status()), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB("rethinkdb").Table("table_status").Filter(map[interface{}]interface{}{"name": "testA"}).Nth(0).Eq(r.Table("testA").Status()), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1252,7 +1252,7 @@ func (suite *MetaTableSuite) TestCases() { suite.T().Log("About to run line #344: r.Table('testA').OptArgs(r.TableOpts{IdentifierFormat: 'uuid', }).Count()") - runAndAssert(suite.Suite, expected_, db.Table("testA").OptArgs(r.TableOpts{IdentifierFormat: "uuid"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Table("testA").OptArgs(r.TableOpts{IdentifierFormat: "uuid"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_mutation_atomic_get_set_test.go b/internal/integration/reql_tests/reql_mutation_atomic_get_set_test.go index 1ff77ff4..b9b051fd 100644 --- a/internal/integration/reql_tests/reql_mutation_atomic_get_set_test.go +++ b/internal/integration/reql_tests/reql_mutation_atomic_get_set_test.go @@ -36,16 +36,16 @@ func (suite *MutationAtomicGetSetSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_mut_atom").Exec(suite.session) - err = r.DBCreate("db_mut_atom").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_mut_atom").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_mut_atom").TableDrop("table_test_mutation_atom").Exec(suite.session) - err = r.DB("db_mut_atom").TableCreate("table_test_mutation_atom").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_mut_atom").Table("table_test_mutation_atom").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -54,8 +54,8 @@ func (suite *MutationAtomicGetSetSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_mut_atom").TableDrop("table_test_mutation_atom").Exec(suite.session) - r.DBDrop("db_mut_atom").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -64,18 +64,18 @@ func (suite *MutationAtomicGetSetSuite) TearDownSuite() { func (suite *MutationAtomicGetSetSuite) TestCases() { suite.T().Log("Running MutationAtomicGetSetSuite: Tests replacement of selections") - table_test_mutation_atom := r.DB("db_mut_atom").Table("table_test_mutation_atom") - _ = table_test_mutation_atom // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors { // mutation/atomic_get_set.yaml line #12 /* ({'changes':[{'old_val':null,'new_val':{'id':0}}]}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"changes": []interface{}{map[interface{}]interface{}{"old_val": nil, "new_val": map[interface{}]interface{}{"id": 0}}}} - /* table_test_mutation_atom.insert({'id':0}, return_changes=True).pluck('changes', 'first_error') */ + /* tbl.insert({'id':0}, return_changes=True).pluck('changes', 'first_error') */ - suite.T().Log("About to run line #12: table_test_mutation_atom.Insert(map[interface{}]interface{}{'id': 0, }).OptArgs(r.InsertOpts{ReturnChanges: true, }).Pluck('changes', 'first_error')") + suite.T().Log("About to run line #12: tbl.Insert(map[interface{}]interface{}{'id': 0, }).OptArgs(r.InsertOpts{ReturnChanges: true, }).Pluck('changes', 'first_error')") - runAndAssert(suite.Suite, expected_, table_test_mutation_atom.Insert(map[interface{}]interface{}{"id": 0}).OptArgs(r.InsertOpts{ReturnChanges: true}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 0}).OptArgs(r.InsertOpts{ReturnChanges: true}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -86,11 +86,11 @@ func (suite *MutationAtomicGetSetSuite) TestCases() { // mutation/atomic_get_set.yaml line #16 /* ({'changes':[], 'first_error':"Duplicate primary key `id`:\n{\n\t\"id\":\t0\n}\n{\n\t\"id\":\t0\n}"}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"changes": []interface{}{}, "first_error": "Duplicate primary key `id`:\n{\n\t\"id\":\t0\n}\n{\n\t\"id\":\t0\n}"} - /* table_test_mutation_atom.insert({'id':0}, return_changes=True).pluck('changes', 'first_error') */ + /* tbl.insert({'id':0}, return_changes=True).pluck('changes', 'first_error') */ - suite.T().Log("About to run line #16: table_test_mutation_atom.Insert(map[interface{}]interface{}{'id': 0, }).OptArgs(r.InsertOpts{ReturnChanges: true, }).Pluck('changes', 'first_error')") + suite.T().Log("About to run line #16: tbl.Insert(map[interface{}]interface{}{'id': 0, }).OptArgs(r.InsertOpts{ReturnChanges: true, }).Pluck('changes', 'first_error')") - runAndAssert(suite.Suite, expected_, table_test_mutation_atom.Insert(map[interface{}]interface{}{"id": 0}).OptArgs(r.InsertOpts{ReturnChanges: true}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 0}).OptArgs(r.InsertOpts{ReturnChanges: true}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -101,11 +101,11 @@ func (suite *MutationAtomicGetSetSuite) TestCases() { // mutation/atomic_get_set.yaml line #20 /* ({'first_error':"Duplicate primary key `id`:\n{\n\t\"id\":\t0\n}\n{\n\t\"id\":\t0\n}",'changes':[{'old_val':{'id':0},'new_val':{'id':0},'error':"Duplicate primary key `id`:\n{\n\t\"id\":\t0\n}\n{\n\t\"id\":\t0\n}"}]}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"first_error": "Duplicate primary key `id`:\n{\n\t\"id\":\t0\n}\n{\n\t\"id\":\t0\n}", "changes": []interface{}{map[interface{}]interface{}{"old_val": map[interface{}]interface{}{"id": 0}, "new_val": map[interface{}]interface{}{"id": 0}, "error": "Duplicate primary key `id`:\n{\n\t\"id\":\t0\n}\n{\n\t\"id\":\t0\n}"}}} - /* table_test_mutation_atom.insert({'id':0}, return_changes='always').pluck('changes', 'first_error') */ + /* tbl.insert({'id':0}, return_changes='always').pluck('changes', 'first_error') */ - suite.T().Log("About to run line #20: table_test_mutation_atom.Insert(map[interface{}]interface{}{'id': 0, }).OptArgs(r.InsertOpts{ReturnChanges: 'always', }).Pluck('changes', 'first_error')") + suite.T().Log("About to run line #20: tbl.Insert(map[interface{}]interface{}{'id': 0, }).OptArgs(r.InsertOpts{ReturnChanges: 'always', }).Pluck('changes', 'first_error')") - runAndAssert(suite.Suite, expected_, table_test_mutation_atom.Insert(map[interface{}]interface{}{"id": 0}).OptArgs(r.InsertOpts{ReturnChanges: "always"}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 0}).OptArgs(r.InsertOpts{ReturnChanges: "always"}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -116,11 +116,11 @@ func (suite *MutationAtomicGetSetSuite) TestCases() { // mutation/atomic_get_set.yaml line #24 /* ({'changes':[{'new_val':{'id':1},'old_val':null}], 'errors':0, 'deleted':0, 'unchanged':0, 'skipped':0, 'replaced':0, 'inserted':1}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"changes": []interface{}{map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"id": 1}, "old_val": nil}}, "errors": 0, "deleted": 0, "unchanged": 0, "skipped": 0, "replaced": 0, "inserted": 1} - /* table_test_mutation_atom.insert([{'id':1}], return_changes=True) */ + /* tbl.insert([{'id':1}], return_changes=True) */ - suite.T().Log("About to run line #24: table_test_mutation_atom.Insert([]interface{}{map[interface{}]interface{}{'id': 1, }}).OptArgs(r.InsertOpts{ReturnChanges: true, })") + suite.T().Log("About to run line #24: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 1, }}).OptArgs(r.InsertOpts{ReturnChanges: true, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_atom.Insert([]interface{}{map[interface{}]interface{}{"id": 1}}).OptArgs(r.InsertOpts{ReturnChanges: true}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 1}}).OptArgs(r.InsertOpts{ReturnChanges: true}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -131,11 +131,11 @@ func (suite *MutationAtomicGetSetSuite) TestCases() { // mutation/atomic_get_set.yaml line #28 /* ({'changes':[],'first_error':"Duplicate primary key `id`:\n{\n\t\"id\":\t0\n}\n{\n\t\"id\":\t0\n}"}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"changes": []interface{}{}, "first_error": "Duplicate primary key `id`:\n{\n\t\"id\":\t0\n}\n{\n\t\"id\":\t0\n}"} - /* table_test_mutation_atom.insert([{'id':0}], return_changes=True).pluck('changes', 'first_error') */ + /* tbl.insert([{'id':0}], return_changes=True).pluck('changes', 'first_error') */ - suite.T().Log("About to run line #28: table_test_mutation_atom.Insert([]interface{}{map[interface{}]interface{}{'id': 0, }}).OptArgs(r.InsertOpts{ReturnChanges: true, }).Pluck('changes', 'first_error')") + suite.T().Log("About to run line #28: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 0, }}).OptArgs(r.InsertOpts{ReturnChanges: true, }).Pluck('changes', 'first_error')") - runAndAssert(suite.Suite, expected_, table_test_mutation_atom.Insert([]interface{}{map[interface{}]interface{}{"id": 0}}).OptArgs(r.InsertOpts{ReturnChanges: true}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 0}}).OptArgs(r.InsertOpts{ReturnChanges: true}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -146,11 +146,11 @@ func (suite *MutationAtomicGetSetSuite) TestCases() { // mutation/atomic_get_set.yaml line #33 /* ({'changes':[{'old_val':{'id':0},'new_val':{'id':0,'x':1}}]}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"changes": []interface{}{map[interface{}]interface{}{"old_val": map[interface{}]interface{}{"id": 0}, "new_val": map[interface{}]interface{}{"id": 0, "x": 1}}}} - /* table_test_mutation_atom.get(0).update({'x':1}, return_changes=True).pluck('changes', 'first_error') */ + /* tbl.get(0).update({'x':1}, return_changes=True).pluck('changes', 'first_error') */ - suite.T().Log("About to run line #33: table_test_mutation_atom.Get(0).Update(map[interface{}]interface{}{'x': 1, }).OptArgs(r.UpdateOpts{ReturnChanges: true, }).Pluck('changes', 'first_error')") + suite.T().Log("About to run line #33: tbl.Get(0).Update(map[interface{}]interface{}{'x': 1, }).OptArgs(r.UpdateOpts{ReturnChanges: true, }).Pluck('changes', 'first_error')") - runAndAssert(suite.Suite, expected_, table_test_mutation_atom.Get(0).Update(map[interface{}]interface{}{"x": 1}).OptArgs(r.UpdateOpts{ReturnChanges: true}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(0).Update(map[interface{}]interface{}{"x": 1}).OptArgs(r.UpdateOpts{ReturnChanges: true}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -161,11 +161,11 @@ func (suite *MutationAtomicGetSetSuite) TestCases() { // mutation/atomic_get_set.yaml line #37 /* ({'changes':[],'first_error':'a'}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"changes": []interface{}{}, "first_error": "a"} - /* table_test_mutation_atom.get(0).update({'x':r.error("a")}, return_changes=True).pluck('changes', 'first_error') */ + /* tbl.get(0).update({'x':r.error("a")}, return_changes=True).pluck('changes', 'first_error') */ - suite.T().Log("About to run line #37: table_test_mutation_atom.Get(0).Update(map[interface{}]interface{}{'x': r.Error('a'), }).OptArgs(r.UpdateOpts{ReturnChanges: true, }).Pluck('changes', 'first_error')") + suite.T().Log("About to run line #37: tbl.Get(0).Update(map[interface{}]interface{}{'x': r.Error('a'), }).OptArgs(r.UpdateOpts{ReturnChanges: true, }).Pluck('changes', 'first_error')") - runAndAssert(suite.Suite, expected_, table_test_mutation_atom.Get(0).Update(map[interface{}]interface{}{"x": r.Error("a")}).OptArgs(r.UpdateOpts{ReturnChanges: true}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(0).Update(map[interface{}]interface{}{"x": r.Error("a")}).OptArgs(r.UpdateOpts{ReturnChanges: true}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -176,11 +176,11 @@ func (suite *MutationAtomicGetSetSuite) TestCases() { // mutation/atomic_get_set.yaml line #41 /* ({'changes':[{'old_val':{'id':0, 'x':1},'new_val':{'id':0, 'x':3}}, {'old_val':{'id':1},'new_val':{'id':1, 'x':3}}]}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"changes": []interface{}{map[interface{}]interface{}{"old_val": map[interface{}]interface{}{"id": 0, "x": 1}, "new_val": map[interface{}]interface{}{"id": 0, "x": 3}}, map[interface{}]interface{}{"old_val": map[interface{}]interface{}{"id": 1}, "new_val": map[interface{}]interface{}{"id": 1, "x": 3}}}} - /* table_test_mutation_atom.update({'x':3}, return_changes=True).pluck('changes', 'first_error').do(lambda d:d.merge({'changes':d['changes'].order_by(lambda a:a['old_val']['id'])})) */ + /* tbl.update({'x':3}, return_changes=True).pluck('changes', 'first_error').do(lambda d:d.merge({'changes':d['changes'].order_by(lambda a:a['old_val']['id'])})) */ - suite.T().Log("About to run line #41: table_test_mutation_atom.Update(map[interface{}]interface{}{'x': 3, }).OptArgs(r.UpdateOpts{ReturnChanges: true, }).Pluck('changes', 'first_error').Do(func(d r.Term) interface{} { return d.Merge(map[interface{}]interface{}{'changes': d.AtIndex('changes').OrderBy(func(a r.Term) interface{} { return a.AtIndex('old_val').AtIndex('id')}), })})") + suite.T().Log("About to run line #41: tbl.Update(map[interface{}]interface{}{'x': 3, }).OptArgs(r.UpdateOpts{ReturnChanges: true, }).Pluck('changes', 'first_error').Do(func(d r.Term) interface{} { return d.Merge(map[interface{}]interface{}{'changes': d.AtIndex('changes').OrderBy(func(a r.Term) interface{} { return a.AtIndex('old_val').AtIndex('id')}), })})") - runAndAssert(suite.Suite, expected_, table_test_mutation_atom.Update(map[interface{}]interface{}{"x": 3}).OptArgs(r.UpdateOpts{ReturnChanges: true}).Pluck("changes", "first_error").Do(func(d r.Term) interface{} { + runAndAssert(suite.Suite, expected_, tbl.Update(map[interface{}]interface{}{"x": 3}).OptArgs(r.UpdateOpts{ReturnChanges: true}).Pluck("changes", "first_error").Do(func(d r.Term) interface{} { return d.Merge(map[interface{}]interface{}{"changes": d.AtIndex("changes").OrderBy(func(a r.Term) interface{} { return a.AtIndex("old_val").AtIndex("id") })}) }), suite.session, r.RunOpts{ GeometryFormat: "raw", @@ -193,11 +193,11 @@ func (suite *MutationAtomicGetSetSuite) TestCases() { // mutation/atomic_get_set.yaml line #46 /* ({'changes':[{'old_val':{'id':0,'x':3},'new_val':{'id':0,'x':2}}]}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"changes": []interface{}{map[interface{}]interface{}{"old_val": map[interface{}]interface{}{"id": 0, "x": 3}, "new_val": map[interface{}]interface{}{"id": 0, "x": 2}}}} - /* table_test_mutation_atom.get(0).replace({'id':0,'x':2}, return_changes=True).pluck('changes', 'first_error') */ + /* tbl.get(0).replace({'id':0,'x':2}, return_changes=True).pluck('changes', 'first_error') */ - suite.T().Log("About to run line #46: table_test_mutation_atom.Get(0).Replace(map[interface{}]interface{}{'id': 0, 'x': 2, }).OptArgs(r.ReplaceOpts{ReturnChanges: true, }).Pluck('changes', 'first_error')") + suite.T().Log("About to run line #46: tbl.Get(0).Replace(map[interface{}]interface{}{'id': 0, 'x': 2, }).OptArgs(r.ReplaceOpts{ReturnChanges: true, }).Pluck('changes', 'first_error')") - runAndAssert(suite.Suite, expected_, table_test_mutation_atom.Get(0).Replace(map[interface{}]interface{}{"id": 0, "x": 2}).OptArgs(r.ReplaceOpts{ReturnChanges: true}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(0).Replace(map[interface{}]interface{}{"id": 0, "x": 2}).OptArgs(r.ReplaceOpts{ReturnChanges: true}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -208,11 +208,11 @@ func (suite *MutationAtomicGetSetSuite) TestCases() { // mutation/atomic_get_set.yaml line #50 /* ({'changes':[],'first_error':'a'}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"changes": []interface{}{}, "first_error": "a"} - /* table_test_mutation_atom.get(0).replace(lambda y:{'x':r.error('a')}, return_changes=True).pluck('changes', 'first_error') */ + /* tbl.get(0).replace(lambda y:{'x':r.error('a')}, return_changes=True).pluck('changes', 'first_error') */ - suite.T().Log("About to run line #50: table_test_mutation_atom.Get(0).Replace(func(y r.Term) interface{} { return map[interface{}]interface{}{'x': r.Error('a'), }}).OptArgs(r.ReplaceOpts{ReturnChanges: true, }).Pluck('changes', 'first_error')") + suite.T().Log("About to run line #50: tbl.Get(0).Replace(func(y r.Term) interface{} { return map[interface{}]interface{}{'x': r.Error('a'), }}).OptArgs(r.ReplaceOpts{ReturnChanges: true, }).Pluck('changes', 'first_error')") - runAndAssert(suite.Suite, expected_, table_test_mutation_atom.Get(0).Replace(func(y r.Term) interface{} { return map[interface{}]interface{}{"x": r.Error("a")} }).OptArgs(r.ReplaceOpts{ReturnChanges: true}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(0).Replace(func(y r.Term) interface{} { return map[interface{}]interface{}{"x": r.Error("a")} }).OptArgs(r.ReplaceOpts{ReturnChanges: true}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -223,11 +223,11 @@ func (suite *MutationAtomicGetSetSuite) TestCases() { // mutation/atomic_get_set.yaml line #54 /* ({'first_error':'a','changes':[{'old_val':{'id':0,'x':2},'new_val':{'id':0,'x':2},'error':'a'}]}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"first_error": "a", "changes": []interface{}{map[interface{}]interface{}{"old_val": map[interface{}]interface{}{"id": 0, "x": 2}, "new_val": map[interface{}]interface{}{"id": 0, "x": 2}, "error": "a"}}} - /* table_test_mutation_atom.get(0).replace(lambda y:{'x':r.error('a')}, return_changes='always').pluck('changes', 'first_error') */ + /* tbl.get(0).replace(lambda y:{'x':r.error('a')}, return_changes='always').pluck('changes', 'first_error') */ - suite.T().Log("About to run line #54: table_test_mutation_atom.Get(0).Replace(func(y r.Term) interface{} { return map[interface{}]interface{}{'x': r.Error('a'), }}).OptArgs(r.ReplaceOpts{ReturnChanges: 'always', }).Pluck('changes', 'first_error')") + suite.T().Log("About to run line #54: tbl.Get(0).Replace(func(y r.Term) interface{} { return map[interface{}]interface{}{'x': r.Error('a'), }}).OptArgs(r.ReplaceOpts{ReturnChanges: 'always', }).Pluck('changes', 'first_error')") - runAndAssert(suite.Suite, expected_, table_test_mutation_atom.Get(0).Replace(func(y r.Term) interface{} { return map[interface{}]interface{}{"x": r.Error("a")} }).OptArgs(r.ReplaceOpts{ReturnChanges: "always"}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(0).Replace(func(y r.Term) interface{} { return map[interface{}]interface{}{"x": r.Error("a")} }).OptArgs(r.ReplaceOpts{ReturnChanges: "always"}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -238,11 +238,11 @@ func (suite *MutationAtomicGetSetSuite) TestCases() { // mutation/atomic_get_set.yaml line #58 /* ({'changes':[{'new_val':{'id':0},'old_val':{'id':0, 'x':2}}, {'new_val':{'id':1},'old_val':{'id':1,'x':3}}]}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"changes": []interface{}{map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"id": 0}, "old_val": map[interface{}]interface{}{"id": 0, "x": 2}}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"id": 1}, "old_val": map[interface{}]interface{}{"id": 1, "x": 3}}}} - /* table_test_mutation_atom.replace(lambda y:y.without('x'), return_changes=True).pluck('changes', 'first_error').do(lambda d:d.merge({'changes':d['changes'].order_by(lambda a:a['old_val']['id'])})) */ + /* tbl.replace(lambda y:y.without('x'), return_changes=True).pluck('changes', 'first_error').do(lambda d:d.merge({'changes':d['changes'].order_by(lambda a:a['old_val']['id'])})) */ - suite.T().Log("About to run line #58: table_test_mutation_atom.Replace(func(y r.Term) interface{} { return y.Without('x')}).OptArgs(r.ReplaceOpts{ReturnChanges: true, }).Pluck('changes', 'first_error').Do(func(d r.Term) interface{} { return d.Merge(map[interface{}]interface{}{'changes': d.AtIndex('changes').OrderBy(func(a r.Term) interface{} { return a.AtIndex('old_val').AtIndex('id')}), })})") + suite.T().Log("About to run line #58: tbl.Replace(func(y r.Term) interface{} { return y.Without('x')}).OptArgs(r.ReplaceOpts{ReturnChanges: true, }).Pluck('changes', 'first_error').Do(func(d r.Term) interface{} { return d.Merge(map[interface{}]interface{}{'changes': d.AtIndex('changes').OrderBy(func(a r.Term) interface{} { return a.AtIndex('old_val').AtIndex('id')}), })})") - runAndAssert(suite.Suite, expected_, table_test_mutation_atom.Replace(func(y r.Term) interface{} { return y.Without("x") }).OptArgs(r.ReplaceOpts{ReturnChanges: true}).Pluck("changes", "first_error").Do(func(d r.Term) interface{} { + runAndAssert(suite.Suite, expected_, tbl.Replace(func(y r.Term) interface{} { return y.Without("x") }).OptArgs(r.ReplaceOpts{ReturnChanges: true}).Pluck("changes", "first_error").Do(func(d r.Term) interface{} { return d.Merge(map[interface{}]interface{}{"changes": d.AtIndex("changes").OrderBy(func(a r.Term) interface{} { return a.AtIndex("old_val").AtIndex("id") })}) }), suite.session, r.RunOpts{ GeometryFormat: "raw", @@ -255,11 +255,11 @@ func (suite *MutationAtomicGetSetSuite) TestCases() { // mutation/atomic_get_set.yaml line #62 /* ({'first_error':"Inserted object must have primary key `id`:\n{\n\t\"x\":\t1\n}", 'changes':[{'new_val':{'id':0},'old_val':{'id':0}, 'error':"Inserted object must have primary key `id`:\n{\n\t\"x\":\t1\n}"}, {'new_val':{'id':1},'old_val':{'id':1},'error':"Inserted object must have primary key `id`:\n{\n\t\"x\":\t1\n}"}]}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"first_error": "Inserted object must have primary key `id`:\n{\n\t\"x\":\t1\n}", "changes": []interface{}{map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"id": 0}, "old_val": map[interface{}]interface{}{"id": 0}, "error": "Inserted object must have primary key `id`:\n{\n\t\"x\":\t1\n}"}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"id": 1}, "old_val": map[interface{}]interface{}{"id": 1}, "error": "Inserted object must have primary key `id`:\n{\n\t\"x\":\t1\n}"}}} - /* table_test_mutation_atom.replace({'x':1}, return_changes='always').pluck('changes', 'first_error').do(lambda d:d.merge({'changes':d['changes'].order_by(lambda a:a['old_val']['id'])})) */ + /* tbl.replace({'x':1}, return_changes='always').pluck('changes', 'first_error').do(lambda d:d.merge({'changes':d['changes'].order_by(lambda a:a['old_val']['id'])})) */ - suite.T().Log("About to run line #62: table_test_mutation_atom.Replace(map[interface{}]interface{}{'x': 1, }).OptArgs(r.ReplaceOpts{ReturnChanges: 'always', }).Pluck('changes', 'first_error').Do(func(d r.Term) interface{} { return d.Merge(map[interface{}]interface{}{'changes': d.AtIndex('changes').OrderBy(func(a r.Term) interface{} { return a.AtIndex('old_val').AtIndex('id')}), })})") + suite.T().Log("About to run line #62: tbl.Replace(map[interface{}]interface{}{'x': 1, }).OptArgs(r.ReplaceOpts{ReturnChanges: 'always', }).Pluck('changes', 'first_error').Do(func(d r.Term) interface{} { return d.Merge(map[interface{}]interface{}{'changes': d.AtIndex('changes').OrderBy(func(a r.Term) interface{} { return a.AtIndex('old_val').AtIndex('id')}), })})") - runAndAssert(suite.Suite, expected_, table_test_mutation_atom.Replace(map[interface{}]interface{}{"x": 1}).OptArgs(r.ReplaceOpts{ReturnChanges: "always"}).Pluck("changes", "first_error").Do(func(d r.Term) interface{} { + runAndAssert(suite.Suite, expected_, tbl.Replace(map[interface{}]interface{}{"x": 1}).OptArgs(r.ReplaceOpts{ReturnChanges: "always"}).Pluck("changes", "first_error").Do(func(d r.Term) interface{} { return d.Merge(map[interface{}]interface{}{"changes": d.AtIndex("changes").OrderBy(func(a r.Term) interface{} { return a.AtIndex("old_val").AtIndex("id") })}) }), suite.session, r.RunOpts{ GeometryFormat: "raw", @@ -272,11 +272,11 @@ func (suite *MutationAtomicGetSetSuite) TestCases() { // mutation/atomic_get_set.yaml line #86 /* ({'changes':[{'old_val':{'id':0},'new_val':null}]}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"changes": []interface{}{map[interface{}]interface{}{"old_val": map[interface{}]interface{}{"id": 0}, "new_val": nil}}} - /* table_test_mutation_atom.get(0).delete(return_changes=True).pluck('changes', 'first_error') */ + /* tbl.get(0).delete(return_changes=True).pluck('changes', 'first_error') */ - suite.T().Log("About to run line #86: table_test_mutation_atom.Get(0).Delete().OptArgs(r.DeleteOpts{ReturnChanges: true, }).Pluck('changes', 'first_error')") + suite.T().Log("About to run line #86: tbl.Get(0).Delete().OptArgs(r.DeleteOpts{ReturnChanges: true, }).Pluck('changes', 'first_error')") - runAndAssert(suite.Suite, expected_, table_test_mutation_atom.Get(0).Delete().OptArgs(r.DeleteOpts{ReturnChanges: true}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(0).Delete().OptArgs(r.DeleteOpts{ReturnChanges: true}).Pluck("changes", "first_error"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -287,11 +287,11 @@ func (suite *MutationAtomicGetSetSuite) TestCases() { // mutation/atomic_get_set.yaml line #90 /* ({'deleted':1,'errors':0,'inserted':0,'replaced':0,'skipped':0,'unchanged':0,'changes':[{'new_val':null, 'old_val':{'id':1}}]}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 1, "errors": 0, "inserted": 0, "replaced": 0, "skipped": 0, "unchanged": 0, "changes": []interface{}{map[interface{}]interface{}{"new_val": nil, "old_val": map[interface{}]interface{}{"id": 1}}}} - /* table_test_mutation_atom.delete(return_changes=True) */ + /* tbl.delete(return_changes=True) */ - suite.T().Log("About to run line #90: table_test_mutation_atom.Delete().OptArgs(r.DeleteOpts{ReturnChanges: true, })") + suite.T().Log("About to run line #90: tbl.Delete().OptArgs(r.DeleteOpts{ReturnChanges: true, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_atom.Delete().OptArgs(r.DeleteOpts{ReturnChanges: true}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Delete().OptArgs(r.DeleteOpts{ReturnChanges: true}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_mutation_delete_test.go b/internal/integration/reql_tests/reql_mutation_delete_test.go index 94989ac0..51f8a1b0 100644 --- a/internal/integration/reql_tests/reql_mutation_delete_test.go +++ b/internal/integration/reql_tests/reql_mutation_delete_test.go @@ -36,16 +36,16 @@ func (suite *MutationDeleteSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_mut_del").Exec(suite.session) - err = r.DBCreate("db_mut_del").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_mut_del").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_mut_del").TableDrop("table_test_mutation_delete").Exec(suite.session) - err = r.DB("db_mut_del").TableCreate("table_test_mutation_delete").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_mut_del").Table("table_test_mutation_delete").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -54,8 +54,8 @@ func (suite *MutationDeleteSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_mut_del").TableDrop("table_test_mutation_delete").Exec(suite.session) - r.DBDrop("db_mut_del").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -64,18 +64,18 @@ func (suite *MutationDeleteSuite) TearDownSuite() { func (suite *MutationDeleteSuite) TestCases() { suite.T().Log("Running MutationDeleteSuite: Tests deletes of selections") - table_test_mutation_delete := r.DB("db_mut_del").Table("table_test_mutation_delete") - _ = table_test_mutation_delete // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors { // mutation/delete.yaml line #7 /* ({'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':100}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 100} - /* table_test_mutation_delete.insert([{'id':i} for i in xrange(100)]) */ + /* tbl.insert([{'id':i} for i in xrange(100)]) */ - suite.T().Log("About to run line #7: table_test_mutation_delete.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 0; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': i, })\n }\n return res\n}()))") + suite.T().Log("About to run line #7: tbl.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 0; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': i, })\n }\n return res\n}()))") - runAndAssert(suite.Suite, expected_, table_test_mutation_delete.Insert((func() []interface{} { + runAndAssert(suite.Suite, expected_, tbl.Insert((func() []interface{} { res := []interface{}{} for iterator_ := 0; iterator_ < 100; iterator_++ { i := iterator_ @@ -93,11 +93,11 @@ func (suite *MutationDeleteSuite) TestCases() { // mutation/delete.yaml line #19 /* 100 */ var expected_ int = 100 - /* table_test_mutation_delete.count() */ + /* tbl.count() */ - suite.T().Log("About to run line #19: table_test_mutation_delete.Count()") + suite.T().Log("About to run line #19: tbl.Count()") - runAndAssert(suite.Suite, expected_, table_test_mutation_delete.Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -108,11 +108,11 @@ func (suite *MutationDeleteSuite) TestCases() { // mutation/delete.yaml line #24 /* ({'deleted':1,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 1, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 0} - /* table_test_mutation_delete.get(12).delete() */ + /* tbl.get(12).delete() */ - suite.T().Log("About to run line #24: table_test_mutation_delete.Get(12).Delete()") + suite.T().Log("About to run line #24: tbl.Get(12).Delete()") - runAndAssert(suite.Suite, expected_, table_test_mutation_delete.Get(12).Delete(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(12).Delete(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -123,11 +123,11 @@ func (suite *MutationDeleteSuite) TestCases() { // mutation/delete.yaml line #31 /* err('ReqlQueryLogicError', 'Durability option `wrong` unrecognized (options are "hard" and "soft").', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Durability option `wrong` unrecognized (options are \"hard\" and \"soft\").") - /* table_test_mutation_delete.skip(50).delete(durability='wrong') */ + /* tbl.skip(50).delete(durability='wrong') */ - suite.T().Log("About to run line #31: table_test_mutation_delete.Skip(50).Delete().OptArgs(r.DeleteOpts{Durability: 'wrong', })") + suite.T().Log("About to run line #31: tbl.Skip(50).Delete().OptArgs(r.DeleteOpts{Durability: 'wrong', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_delete.Skip(50).Delete().OptArgs(r.DeleteOpts{Durability: "wrong"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Skip(50).Delete().OptArgs(r.DeleteOpts{Durability: "wrong"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -138,11 +138,11 @@ func (suite *MutationDeleteSuite) TestCases() { // mutation/delete.yaml line #38 /* ({'deleted':49,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 49, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 0} - /* table_test_mutation_delete.skip(50).delete(durability='soft') */ + /* tbl.skip(50).delete(durability='soft') */ - suite.T().Log("About to run line #38: table_test_mutation_delete.Skip(50).Delete().OptArgs(r.DeleteOpts{Durability: 'soft', })") + suite.T().Log("About to run line #38: tbl.Skip(50).Delete().OptArgs(r.DeleteOpts{Durability: 'soft', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_delete.Skip(50).Delete().OptArgs(r.DeleteOpts{Durability: "soft"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Skip(50).Delete().OptArgs(r.DeleteOpts{Durability: "soft"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -153,11 +153,11 @@ func (suite *MutationDeleteSuite) TestCases() { // mutation/delete.yaml line #45 /* ({'deleted':50,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 50, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 0} - /* table_test_mutation_delete.delete(durability='hard') */ + /* tbl.delete(durability='hard') */ - suite.T().Log("About to run line #45: table_test_mutation_delete.Delete().OptArgs(r.DeleteOpts{Durability: 'hard', })") + suite.T().Log("About to run line #45: tbl.Delete().OptArgs(r.DeleteOpts{Durability: 'hard', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_delete.Delete().OptArgs(r.DeleteOpts{Durability: "hard"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Delete().OptArgs(r.DeleteOpts{Durability: "hard"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_mutation_insert_test.go b/internal/integration/reql_tests/reql_mutation_insert_test.go index 4229a206..86246316 100644 --- a/internal/integration/reql_tests/reql_mutation_insert_test.go +++ b/internal/integration/reql_tests/reql_mutation_insert_test.go @@ -36,16 +36,16 @@ func (suite *MutationInsertSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_mut_ins").Exec(suite.session) - err = r.DBCreate("db_mut_ins").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_mut_ins").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_mut_ins").TableDrop("table_test_mutation_insert").Exec(suite.session) - err = r.DB("db_mut_ins").TableCreate("table_test_mutation_insert").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_mut_ins").Table("table_test_mutation_insert").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -54,8 +54,8 @@ func (suite *MutationInsertSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_mut_ins").TableDrop("table_test_mutation_insert").Exec(suite.session) - r.DBDrop("db_mut_ins").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -64,18 +64,18 @@ func (suite *MutationInsertSuite) TearDownSuite() { func (suite *MutationInsertSuite) TestCases() { suite.T().Log("Running MutationInsertSuite: Tests insertion into tables") - table_test_mutation_insert := r.DB("db_mut_ins").Table("table_test_mutation_insert") - _ = table_test_mutation_insert // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors { // mutation/insert.yaml line #6 /* partial({'tables_created':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"tables_created": 1}) - /* r.db('test').table_create('table_test2_mutation') */ + /* r.db('test').table_create('test2') */ - suite.T().Log("About to run line #6: r.DB('test').TableCreate('table_test2_mutation')") + suite.T().Log("About to run line #6: r.DB('test').TableCreate('test2')") - runAndAssert(suite.Suite, expected_, r.DB("db_mut_ins").TableCreate("table_test2_mutation"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB("test").TableCreate("test2"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -83,21 +83,21 @@ func (suite *MutationInsertSuite) TestCases() { } // mutation/insert.yaml line #9 - // table_test_mutation_insert2 = r.db('test').table('table_test2_mutation') - suite.T().Log("Possibly executing: var table_test_mutation_insert2 r.Term = r.DB('test').Table('table_test2_mutation')") + // tbl2 = r.db('test').table('test2') + suite.T().Log("Possibly executing: var tbl2 r.Term = r.DB('test').Table('test2')") - table_test_mutation_insert2 := r.DB("db_mut_ins").Table("table_test2_mutation") - _ = table_test_mutation_insert2 // Prevent any noused variable errors + tbl2 := r.DB("test").Table("test2") + _ = tbl2 // Prevent any noused variable errors { // mutation/insert.yaml line #12 /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1} - /* table_test_mutation_insert.insert({'id':0,'a':0}) */ + /* tbl.insert({'id':0,'a':0}) */ - suite.T().Log("About to run line #12: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 0, 'a': 0, })") + suite.T().Log("About to run line #12: tbl.Insert(map[interface{}]interface{}{'id': 0, 'a': 0, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 0, "a": 0}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 0, "a": 0}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -108,11 +108,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #14 /* 1 */ var expected_ int = 1 - /* table_test_mutation_insert.count() */ + /* tbl.count() */ - suite.T().Log("About to run line #14: table_test_mutation_insert.Count()") + suite.T().Log("About to run line #14: tbl.Count()") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -123,11 +123,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #18 /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1} - /* table_test_mutation_insert.insert({'id':1, 'a':1}, durability='hard') */ + /* tbl.insert({'id':1, 'a':1}, durability='hard') */ - suite.T().Log("About to run line #18: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 1, 'a': 1, }).OptArgs(r.InsertOpts{Durability: 'hard', })") + suite.T().Log("About to run line #18: tbl.Insert(map[interface{}]interface{}{'id': 1, 'a': 1, }).OptArgs(r.InsertOpts{Durability: 'hard', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 1, "a": 1}).OptArgs(r.InsertOpts{Durability: "hard"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 1, "a": 1}).OptArgs(r.InsertOpts{Durability: "hard"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -138,11 +138,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #22 /* 2 */ var expected_ int = 2 - /* table_test_mutation_insert.count() */ + /* tbl.count() */ - suite.T().Log("About to run line #22: table_test_mutation_insert.Count()") + suite.T().Log("About to run line #22: tbl.Count()") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -153,11 +153,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #26 /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1} - /* table_test_mutation_insert.insert({'id':2, 'a':2}, durability='soft') */ + /* tbl.insert({'id':2, 'a':2}, durability='soft') */ - suite.T().Log("About to run line #26: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 2, 'a': 2, }).OptArgs(r.InsertOpts{Durability: 'soft', })") + suite.T().Log("About to run line #26: tbl.Insert(map[interface{}]interface{}{'id': 2, 'a': 2, }).OptArgs(r.InsertOpts{Durability: 'soft', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 2, "a": 2}).OptArgs(r.InsertOpts{Durability: "soft"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 2, "a": 2}).OptArgs(r.InsertOpts{Durability: "soft"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -168,11 +168,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #30 /* 3 */ var expected_ int = 3 - /* table_test_mutation_insert.count() */ + /* tbl.count() */ - suite.T().Log("About to run line #30: table_test_mutation_insert.Count()") + suite.T().Log("About to run line #30: tbl.Count()") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -183,11 +183,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #34 /* err('ReqlQueryLogicError', 'Durability option `wrong` unrecognized (options are "hard" and "soft").', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Durability option `wrong` unrecognized (options are \"hard\" and \"soft\").") - /* table_test_mutation_insert.insert({'id':3, 'a':3}, durability='wrong') */ + /* tbl.insert({'id':3, 'a':3}, durability='wrong') */ - suite.T().Log("About to run line #34: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 3, 'a': 3, }).OptArgs(r.InsertOpts{Durability: 'wrong', })") + suite.T().Log("About to run line #34: tbl.Insert(map[interface{}]interface{}{'id': 3, 'a': 3, }).OptArgs(r.InsertOpts{Durability: 'wrong', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 3, "a": 3}).OptArgs(r.InsertOpts{Durability: "wrong"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 3, "a": 3}).OptArgs(r.InsertOpts{Durability: "wrong"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -198,11 +198,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #38 /* 3 */ var expected_ int = 3 - /* table_test_mutation_insert.count() */ + /* tbl.count() */ - suite.T().Log("About to run line #38: table_test_mutation_insert.Count()") + suite.T().Log("About to run line #38: tbl.Count()") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -213,11 +213,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #42 /* {'deleted':1,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 1, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 0} - /* table_test_mutation_insert.get(2).delete() */ + /* tbl.get(2).delete() */ - suite.T().Log("About to run line #42: table_test_mutation_insert.Get(2).Delete()") + suite.T().Log("About to run line #42: tbl.Get(2).Delete()") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Get(2).Delete(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(2).Delete(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -228,11 +228,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #46 /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':2} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 2} - /* table_test_mutation_insert.insert([{'id':2,'a':2}, {'id':3,'a':3}]) */ + /* tbl.insert([{'id':2,'a':2}, {'id':3,'a':3}]) */ - suite.T().Log("About to run line #46: table_test_mutation_insert.Insert([]interface{}{map[interface{}]interface{}{'id': 2, 'a': 2, }, map[interface{}]interface{}{'id': 3, 'a': 3, }})") + suite.T().Log("About to run line #46: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 2, 'a': 2, }, map[interface{}]interface{}{'id': 3, 'a': 3, }})") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert([]interface{}{map[interface{}]interface{}{"id": 2, "a": 2}, map[interface{}]interface{}{"id": 3, "a": 3}}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 2, "a": 2}, map[interface{}]interface{}{"id": 3, "a": 3}}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -243,11 +243,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #50 /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':4} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 4} - /* table_test_mutation_insert2.insert(table_test_mutation_insert) */ + /* tbl2.insert(tbl) */ - suite.T().Log("About to run line #50: table_test_mutation_insert2.Insert(table_test_mutation_insert)") + suite.T().Log("About to run line #50: tbl2.Insert(tbl)") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert2.Insert(table_test_mutation_insert), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.Insert(tbl), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -258,11 +258,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #54 /* {'first_error':"Duplicate primary key `id`:\n{\n\t\"a\":\t2,\n\t\"id\":\t2\n}\n{\n\t\"b\":\t20,\n\t\"id\":\t2\n}",'deleted':0,'replaced':0,'unchanged':0,'errors':1,'skipped':0,'inserted':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"first_error": "Duplicate primary key `id`:\n{\n\t\"a\":\t2,\n\t\"id\":\t2\n}\n{\n\t\"b\":\t20,\n\t\"id\":\t2\n}", "deleted": 0, "replaced": 0, "unchanged": 0, "errors": 1, "skipped": 0, "inserted": 0} - /* table_test_mutation_insert.insert({'id':2,'b':20}) */ + /* tbl.insert({'id':2,'b':20}) */ - suite.T().Log("About to run line #54: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 2, 'b': 20, })") + suite.T().Log("About to run line #54: tbl.Insert(map[interface{}]interface{}{'id': 2, 'b': 20, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 2, "b": 20}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 2, "b": 20}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -273,11 +273,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #58 /* {'first_error':"Duplicate primary key `id`:\n{\n\t\"a\":\t2,\n\t\"id\":\t2\n}\n{\n\t\"b\":\t20,\n\t\"id\":\t2\n}",'deleted':0,'replaced':0,'unchanged':0,'errors':1,'skipped':0,'inserted':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"first_error": "Duplicate primary key `id`:\n{\n\t\"a\":\t2,\n\t\"id\":\t2\n}\n{\n\t\"b\":\t20,\n\t\"id\":\t2\n}", "deleted": 0, "replaced": 0, "unchanged": 0, "errors": 1, "skipped": 0, "inserted": 0} - /* table_test_mutation_insert.insert({'id':2,'b':20}, conflict='error') */ + /* tbl.insert({'id':2,'b':20}, conflict='error') */ - suite.T().Log("About to run line #58: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 2, 'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'error', })") + suite.T().Log("About to run line #58: tbl.Insert(map[interface{}]interface{}{'id': 2, 'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'error', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 2, "b": 20}).OptArgs(r.InsertOpts{Conflict: "error"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 2, "b": 20}).OptArgs(r.InsertOpts{Conflict: "error"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -288,11 +288,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #64 /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1} - /* table_test_mutation_insert.insert({'id':15,'b':20}, conflict='error') */ + /* tbl.insert({'id':15,'b':20}, conflict='error') */ - suite.T().Log("About to run line #64: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 15, 'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'error', })") + suite.T().Log("About to run line #64: tbl.Insert(map[interface{}]interface{}{'id': 15, 'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'error', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 15, "b": 20}).OptArgs(r.InsertOpts{Conflict: "error"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 15, "b": 20}).OptArgs(r.InsertOpts{Conflict: "error"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -303,11 +303,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #69 /* {'id':15,'b':20} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 15, "b": 20} - /* table_test_mutation_insert.get(15) */ + /* tbl.get(15) */ - suite.T().Log("About to run line #69: table_test_mutation_insert.Get(15)") + suite.T().Log("About to run line #69: tbl.Get(15)") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Get(15), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(15), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -318,11 +318,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #73 /* {'deleted':0,'replaced':1,'unchanged':0,'errors':0,'skipped':0,'inserted':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 1, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 0} - /* table_test_mutation_insert.insert({'id':2,'b':20}, conflict='replace') */ + /* tbl.insert({'id':2,'b':20}, conflict='replace') */ - suite.T().Log("About to run line #73: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 2, 'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'replace', })") + suite.T().Log("About to run line #73: tbl.Insert(map[interface{}]interface{}{'id': 2, 'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'replace', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 2, "b": 20}).OptArgs(r.InsertOpts{Conflict: "replace"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 2, "b": 20}).OptArgs(r.InsertOpts{Conflict: "replace"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -333,11 +333,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #78 /* {'id':2,'b':20} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 2, "b": 20} - /* table_test_mutation_insert.get(2) */ + /* tbl.get(2) */ - suite.T().Log("About to run line #78: table_test_mutation_insert.Get(2)") + suite.T().Log("About to run line #78: tbl.Get(2)") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Get(2), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(2), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -348,11 +348,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #82 /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1} - /* table_test_mutation_insert.insert({'id':20,'b':20}, conflict='replace') */ + /* tbl.insert({'id':20,'b':20}, conflict='replace') */ - suite.T().Log("About to run line #82: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 20, 'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'replace', })") + suite.T().Log("About to run line #82: tbl.Insert(map[interface{}]interface{}{'id': 20, 'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'replace', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 20, "b": 20}).OptArgs(r.InsertOpts{Conflict: "replace"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 20, "b": 20}).OptArgs(r.InsertOpts{Conflict: "replace"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -363,11 +363,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #87 /* {'id':20,'b':20} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 20, "b": 20} - /* table_test_mutation_insert.get(20) */ + /* tbl.get(20) */ - suite.T().Log("About to run line #87: table_test_mutation_insert.Get(20)") + suite.T().Log("About to run line #87: tbl.Get(20)") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Get(20), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(20), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -378,11 +378,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #91 /* {'deleted':0,'replaced':1,'unchanged':0,'errors':0,'skipped':0,'inserted':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 1, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 0} - /* table_test_mutation_insert.insert({'id':2,'c':30}, conflict='update') */ + /* tbl.insert({'id':2,'c':30}, conflict='update') */ - suite.T().Log("About to run line #91: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 2, 'c': 30, }).OptArgs(r.InsertOpts{Conflict: 'update', })") + suite.T().Log("About to run line #91: tbl.Insert(map[interface{}]interface{}{'id': 2, 'c': 30, }).OptArgs(r.InsertOpts{Conflict: 'update', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 2, "c": 30}).OptArgs(r.InsertOpts{Conflict: "update"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 2, "c": 30}).OptArgs(r.InsertOpts{Conflict: "update"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -393,11 +393,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #96 /* {'id':2, 'b':20, 'c':30} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 2, "b": 20, "c": 30} - /* table_test_mutation_insert.get(2) */ + /* tbl.get(2) */ - suite.T().Log("About to run line #96: table_test_mutation_insert.Get(2)") + suite.T().Log("About to run line #96: tbl.Get(2)") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Get(2), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(2), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -408,11 +408,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #100 /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1} - /* table_test_mutation_insert.insert({'id':30,'b':20}, conflict='update') */ + /* tbl.insert({'id':30,'b':20}, conflict='update') */ - suite.T().Log("About to run line #100: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 30, 'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'update', })") + suite.T().Log("About to run line #100: tbl.Insert(map[interface{}]interface{}{'id': 30, 'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'update', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 30, "b": 20}).OptArgs(r.InsertOpts{Conflict: "update"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 30, "b": 20}).OptArgs(r.InsertOpts{Conflict: "update"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -423,11 +423,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #105 /* {'id':30,'b':20} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 30, "b": 20} - /* table_test_mutation_insert.get(30) */ + /* tbl.get(30) */ - suite.T().Log("About to run line #105: table_test_mutation_insert.Get(30)") + suite.T().Log("About to run line #105: tbl.Get(30)") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Get(30), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(30), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -438,11 +438,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #109 /* err('ReqlQueryLogicError', 'Conflict option `wrong` unrecognized (options are "error", "replace" and "update").', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Conflict option `wrong` unrecognized (options are \"error\", \"replace\" and \"update\").") - /* table_test_mutation_insert.insert({'id':3, 'a':3}, conflict='wrong') */ + /* tbl.insert({'id':3, 'a':3}, conflict='wrong') */ - suite.T().Log("About to run line #109: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 3, 'a': 3, }).OptArgs(r.InsertOpts{Conflict: 'wrong', })") + suite.T().Log("About to run line #109: tbl.Insert(map[interface{}]interface{}{'id': 3, 'a': 3, }).OptArgs(r.InsertOpts{Conflict: 'wrong', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 3, "a": 3}).OptArgs(r.InsertOpts{Conflict: "wrong"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 3, "a": 3}).OptArgs(r.InsertOpts{Conflict: "wrong"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -450,21 +450,21 @@ func (suite *MutationInsertSuite) TestCases() { } // mutation/insert.yaml line #120 - // table_test_mutation_insertpkey = r.db('test').table('testpkey_mutation_insert') - suite.T().Log("Possibly executing: var table_test_mutation_insertpkey r.Term = r.DB('test').Table('testpkey_mutation_insert')") + // tblpkey = r.db('test').table('testpkey') + suite.T().Log("Possibly executing: var tblpkey r.Term = r.DB('test').Table('testpkey')") - table_test_mutation_insertpkey := r.DB("db_mut_ins").Table("testpkey_mutation_insert") - _ = table_test_mutation_insertpkey // Prevent any noused variable errors + tblpkey := r.DB("test").Table("testpkey") + _ = tblpkey // Prevent any noused variable errors { // mutation/insert.yaml line #115 /* partial({'tables_created':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"tables_created": 1}) - /* r.db('test').table_create('testpkey_mutation_insert', primary_key='foo') */ + /* r.db('test').table_create('testpkey', primary_key='foo') */ - suite.T().Log("About to run line #115: r.DB('test').TableCreate('testpkey_mutation_insert').OptArgs(r.TableCreateOpts{PrimaryKey: 'foo', })") + suite.T().Log("About to run line #115: r.DB('test').TableCreate('testpkey').OptArgs(r.TableCreateOpts{PrimaryKey: 'foo', })") - runAndAssert(suite.Suite, expected_, r.DB("db_mut_ins").TableCreate("testpkey_mutation_insert").OptArgs(r.TableCreateOpts{PrimaryKey: "foo"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB("test").TableCreate("testpkey").OptArgs(r.TableCreateOpts{PrimaryKey: "foo"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -475,11 +475,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #122 /* {'deleted':0,'replaced':0,'generated_keys':arrlen(1,uuid()),'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "generated_keys": arrlen(1, compare.IsUUID()), "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1} - /* table_test_mutation_insertpkey.insert({}) */ + /* tblpkey.insert({}) */ - suite.T().Log("About to run line #122: table_test_mutation_insertpkey.Insert(map[interface{}]interface{}{})") + suite.T().Log("About to run line #122: tblpkey.Insert(map[interface{}]interface{}{})") - runAndAssert(suite.Suite, expected_, table_test_mutation_insertpkey.Insert(map[interface{}]interface{}{}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tblpkey.Insert(map[interface{}]interface{}{}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -490,11 +490,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #125 /* [{'foo':uuid()}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"foo": compare.IsUUID()}} - /* table_test_mutation_insertpkey */ + /* tblpkey */ - suite.T().Log("About to run line #125: table_test_mutation_insertpkey") + suite.T().Log("About to run line #125: tblpkey") - runAndAssert(suite.Suite, expected_, table_test_mutation_insertpkey, suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tblpkey, suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -505,11 +505,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #129 /* {'deleted':0,'replaced':0,'generated_keys':arrlen(1,uuid()),'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "generated_keys": arrlen(1, compare.IsUUID()), "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1} - /* table_test_mutation_insertpkey.insert({'b':20}, conflict='replace') */ + /* tblpkey.insert({'b':20}, conflict='replace') */ - suite.T().Log("About to run line #129: table_test_mutation_insertpkey.Insert(map[interface{}]interface{}{'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'replace', })") + suite.T().Log("About to run line #129: tblpkey.Insert(map[interface{}]interface{}{'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'replace', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insertpkey.Insert(map[interface{}]interface{}{"b": 20}).OptArgs(r.InsertOpts{Conflict: "replace"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tblpkey.Insert(map[interface{}]interface{}{"b": 20}).OptArgs(r.InsertOpts{Conflict: "replace"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -520,11 +520,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #135 /* {'deleted':0,'replaced':0,'generated_keys':arrlen(1,uuid()),'unchanged':0,'errors':0,'skipped':0,'inserted':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "generated_keys": arrlen(1, compare.IsUUID()), "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 1} - /* table_test_mutation_insertpkey.insert({'b':20}, conflict='update') */ + /* tblpkey.insert({'b':20}, conflict='update') */ - suite.T().Log("About to run line #135: table_test_mutation_insertpkey.Insert(map[interface{}]interface{}{'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'update', })") + suite.T().Log("About to run line #135: tblpkey.Insert(map[interface{}]interface{}{'b': 20, }).OptArgs(r.InsertOpts{Conflict: 'update', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insertpkey.Insert(map[interface{}]interface{}{"b": 20}).OptArgs(r.InsertOpts{Conflict: "update"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tblpkey.Insert(map[interface{}]interface{}{"b": 20}).OptArgs(r.InsertOpts{Conflict: "update"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -535,11 +535,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #140 /* partial({'tables_dropped':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"tables_dropped": 1}) - /* r.db('test').table_drop('testpkey_mutation_insert') */ + /* r.db('test').table_drop('testpkey') */ - suite.T().Log("About to run line #140: r.DB('test').TableDrop('testpkey_mutation_insert')") + suite.T().Log("About to run line #140: r.DB('test').TableDrop('testpkey')") - runAndAssert(suite.Suite, expected_, r.DB("db_mut_ins").TableDrop("testpkey_mutation_insert"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB("test").TableDrop("testpkey"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -550,12 +550,12 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #144 /* {'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':7} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 7} - /* table_test_mutation_insert.for_each(lambda row: table_test_mutation_insert2.insert(row.merge({'id':row['id'] + 100 })) ) */ + /* tbl.for_each(lambda row: tbl2.insert(row.merge({'id':row['id'] + 100 })) ) */ - suite.T().Log("About to run line #144: table_test_mutation_insert.ForEach(func(row r.Term) interface{} { return table_test_mutation_insert2.Insert(row.Merge(map[interface{}]interface{}{'id': row.AtIndex('id').Add(100), }))})") + suite.T().Log("About to run line #144: tbl.ForEach(func(row r.Term) interface{} { return tbl2.Insert(row.Merge(map[interface{}]interface{}{'id': row.AtIndex('id').Add(100), }))})") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.ForEach(func(row r.Term) interface{} { - return table_test_mutation_insert2.Insert(row.Merge(map[interface{}]interface{}{"id": row.AtIndex("id").Add(100)})) + runAndAssert(suite.Suite, expected_, tbl.ForEach(func(row r.Term) interface{} { + return tbl2.Insert(row.Merge(map[interface{}]interface{}{"id": row.AtIndex("id").Add(100)})) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", @@ -567,11 +567,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #150 /* partial({'errors':1,'first_error':'`r.minval` and `r.maxval` cannot be written to disk.'}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 1, "first_error": "`r.minval` and `r.maxval` cannot be written to disk."}) - /* table_test_mutation_insert.insert({'value':r.minval}) */ + /* tbl.insert({'value':r.minval}) */ - suite.T().Log("About to run line #150: table_test_mutation_insert.Insert(map[interface{}]interface{}{'value': r.MinVal, })") + suite.T().Log("About to run line #150: tbl.Insert(map[interface{}]interface{}{'value': r.MinVal, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"value": r.MinVal}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"value": r.MinVal}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -582,11 +582,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #154 /* partial({'errors':1,'first_error':'`r.minval` and `r.maxval` cannot be written to disk.'}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"errors": 1, "first_error": "`r.minval` and `r.maxval` cannot be written to disk."}) - /* table_test_mutation_insert.insert({'value':r.maxval}) */ + /* tbl.insert({'value':r.maxval}) */ - suite.T().Log("About to run line #154: table_test_mutation_insert.Insert(map[interface{}]interface{}{'value': r.MaxVal, })") + suite.T().Log("About to run line #154: tbl.Insert(map[interface{}]interface{}{'value': r.MaxVal, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"value": r.MaxVal}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"value": r.MaxVal}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -597,11 +597,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #159 /* {'changes': [{'new_val': {'id': 666}, 'old_val': None},{'error': 'Duplicate primary key `id`:\n{\n\t"id":\t666\n}\n{\n\t"id":\t666\n}','new_val': {'id': 666},'old_val': {'id': 666}}],'deleted': 0,'errors': 1,'first_error': 'Duplicate primary key `id`:\n{\n\t"id":\t666\n}\n{\n\t"id":\t666\n}','inserted': 1,'replaced': 0,'skipped': 0,'unchanged': 0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"changes": []interface{}{map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"id": 666}, "old_val": nil}, map[interface{}]interface{}{"error": "Duplicate primary key `id`:\n{\n\t\"id\":\t666\n}\n{\n\t\"id\":\t666\n}", "new_val": map[interface{}]interface{}{"id": 666}, "old_val": map[interface{}]interface{}{"id": 666}}}, "deleted": 0, "errors": 1, "first_error": "Duplicate primary key `id`:\n{\n\t\"id\":\t666\n}\n{\n\t\"id\":\t666\n}", "inserted": 1, "replaced": 0, "skipped": 0, "unchanged": 0} - /* table_test_mutation_insert.insert([{'id':666}, {'id':666}], return_changes="always") */ + /* tbl.insert([{'id':666}, {'id':666}], return_changes="always") */ - suite.T().Log("About to run line #159: table_test_mutation_insert.Insert([]interface{}{map[interface{}]interface{}{'id': 666, }, map[interface{}]interface{}{'id': 666, }}).OptArgs(r.InsertOpts{ReturnChanges: 'always', })") + suite.T().Log("About to run line #159: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 666, }, map[interface{}]interface{}{'id': 666, }}).OptArgs(r.InsertOpts{ReturnChanges: 'always', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert([]interface{}{map[interface{}]interface{}{"id": 666}, map[interface{}]interface{}{"id": 666}}).OptArgs(r.InsertOpts{ReturnChanges: "always"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 666}, map[interface{}]interface{}{"id": 666}}).OptArgs(r.InsertOpts{ReturnChanges: "always"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -619,11 +619,11 @@ func (suite *MutationInsertSuite) TestCases() { } return res }())}) - /* table_test_mutation_insert.insert([{'id':100+i, 'ordered-num':i} for i in range(1,100)], return_changes="always") */ + /* tbl.insert([{'id':100+i, 'ordered-num':i} for i in range(1,100)], return_changes="always") */ - suite.T().Log("About to run line #163: table_test_mutation_insert.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 1; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': r.Add(100, i), 'ordered-num': i, })\n }\n return res\n}())).OptArgs(r.InsertOpts{ReturnChanges: 'always', })") + suite.T().Log("About to run line #163: tbl.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 1; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': r.Add(100, i), 'ordered-num': i, })\n }\n return res\n}())).OptArgs(r.InsertOpts{ReturnChanges: 'always', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert((func() []interface{} { + runAndAssert(suite.Suite, expected_, tbl.Insert((func() []interface{} { res := []interface{}{} for iterator_ := 1; iterator_ < 100; iterator_++ { i := iterator_ @@ -648,11 +648,11 @@ func (suite *MutationInsertSuite) TestCases() { } return res }())}) - /* table_test_mutation_insert.insert([{'id':[1, "blah", 200+i], 'ordered-num':i} for i in range(1,100)], return_changes="always") */ + /* tbl.insert([{'id':[1, "blah", 200+i], 'ordered-num':i} for i in range(1,100)], return_changes="always") */ - suite.T().Log("About to run line #167: table_test_mutation_insert.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 1; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': []interface{}{1, 'blah', r.Add(200, i)}, 'ordered-num': i, })\n }\n return res\n}())).OptArgs(r.InsertOpts{ReturnChanges: 'always', })") + suite.T().Log("About to run line #167: tbl.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 1; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': []interface{}{1, 'blah', r.Add(200, i)}, 'ordered-num': i, })\n }\n return res\n}())).OptArgs(r.InsertOpts{ReturnChanges: 'always', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert((func() []interface{} { + runAndAssert(suite.Suite, expected_, tbl.Insert((func() []interface{} { res := []interface{}{} for iterator_ := 1; iterator_ < 100; iterator_++ { i := iterator_ @@ -677,11 +677,11 @@ func (suite *MutationInsertSuite) TestCases() { } return res }())}) - /* table_test_mutation_insert.insert([{'id':[1, "blah", 300+i], 'ordered-num':i} for i in range(1,100)], return_changes=true) */ + /* tbl.insert([{'id':[1, "blah", 300+i], 'ordered-num':i} for i in range(1,100)], return_changes=true) */ - suite.T().Log("About to run line #171: table_test_mutation_insert.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 1; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': []interface{}{1, 'blah', r.Add(300, i)}, 'ordered-num': i, })\n }\n return res\n}())).OptArgs(r.InsertOpts{ReturnChanges: true, })") + suite.T().Log("About to run line #171: tbl.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 1; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': []interface{}{1, 'blah', r.Add(300, i)}, 'ordered-num': i, })\n }\n return res\n}())).OptArgs(r.InsertOpts{ReturnChanges: true, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert((func() []interface{} { + runAndAssert(suite.Suite, expected_, tbl.Insert((func() []interface{} { res := []interface{}{} for iterator_ := 1; iterator_ < 100; iterator_++ { i := iterator_ @@ -706,11 +706,11 @@ func (suite *MutationInsertSuite) TestCases() { } return res }())}) - /* table_test_mutation_insert.insert([{'id':100 + i, 'ordered-num':i} for i in range(1,100)], return_changes="always") */ + /* tbl.insert([{'id':100 + i, 'ordered-num':i} for i in range(1,100)], return_changes="always") */ - suite.T().Log("About to run line #175: table_test_mutation_insert.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 1; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': r.Add(100, i), 'ordered-num': i, })\n }\n return res\n}())).OptArgs(r.InsertOpts{ReturnChanges: 'always', })") + suite.T().Log("About to run line #175: tbl.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 1; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': r.Add(100, i), 'ordered-num': i, })\n }\n return res\n}())).OptArgs(r.InsertOpts{ReturnChanges: 'always', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert((func() []interface{} { + runAndAssert(suite.Suite, expected_, tbl.Insert((func() []interface{} { res := []interface{}{} for iterator_ := 1; iterator_ < 100; iterator_++ { i := iterator_ @@ -728,11 +728,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #179 /* {'changes': [{'error': 'Duplicate primary key `id`:\n{\n\t"id":\t123,\n\t"ordered-num":\t23\n}\n{\n\t"id":\t123\n}', 'new_val': {'id': 123, 'ordered-num': 23}, 'old_val': {'id': 123, 'ordered-num': 23}}, {'error': 'Primary key too long (max 127 characters): "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"', 'new_val': None, 'old_val': None}, {'new_val': {'id': 321}, 'old_val': None}], 'deleted': 0, 'errors': 2, 'first_error': 'Primary key too long (max 127 characters): "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"', 'inserted': 1, 'replaced': 0, 'skipped': 0, 'unchanged': 0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"changes": []interface{}{map[interface{}]interface{}{"error": "Duplicate primary key `id`:\n{\n\t\"id\":\t123,\n\t\"ordered-num\":\t23\n}\n{\n\t\"id\":\t123\n}", "new_val": map[interface{}]interface{}{"id": 123, "ordered-num": 23}, "old_val": map[interface{}]interface{}{"id": 123, "ordered-num": 23}}, map[interface{}]interface{}{"error": "Primary key too long (max 127 characters): \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"", "new_val": nil, "old_val": nil}, map[interface{}]interface{}{"new_val": map[interface{}]interface{}{"id": 321}, "old_val": nil}}, "deleted": 0, "errors": 2, "first_error": "Primary key too long (max 127 characters): \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"", "inserted": 1, "replaced": 0, "skipped": 0, "unchanged": 0} - /* table_test_mutation_insert.insert([{'id':123}, {'id':'a'*500}, {'id':321}], return_changes="always") */ + /* tbl.insert([{'id':123}, {'id':'a'*500}, {'id':321}], return_changes="always") */ - suite.T().Log("About to run line #179: table_test_mutation_insert.Insert([]interface{}{map[interface{}]interface{}{'id': 123, }, map[interface{}]interface{}{'id': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', }, map[interface{}]interface{}{'id': 321, }}).OptArgs(r.InsertOpts{ReturnChanges: 'always', })") + suite.T().Log("About to run line #179: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 123, }, map[interface{}]interface{}{'id': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', }, map[interface{}]interface{}{'id': 321, }}).OptArgs(r.InsertOpts{ReturnChanges: 'always', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert([]interface{}{map[interface{}]interface{}{"id": 123}, map[interface{}]interface{}{"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}, map[interface{}]interface{}{"id": 321}}).OptArgs(r.InsertOpts{ReturnChanges: "always"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 123}, map[interface{}]interface{}{"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}, map[interface{}]interface{}{"id": 321}}).OptArgs(r.InsertOpts{ReturnChanges: "always"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -743,11 +743,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #183 /* partial({'changes':[]}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"changes": []interface{}{}}) - /* table_test_mutation_insert.insert([{'id':100 + i, 'ordered-num':i} for i in range(1,100)], return_changes=true) */ + /* tbl.insert([{'id':100 + i, 'ordered-num':i} for i in range(1,100)], return_changes=true) */ - suite.T().Log("About to run line #183: table_test_mutation_insert.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 1; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': r.Add(100, i), 'ordered-num': i, })\n }\n return res\n}())).OptArgs(r.InsertOpts{ReturnChanges: true, })") + suite.T().Log("About to run line #183: tbl.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 1; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': r.Add(100, i), 'ordered-num': i, })\n }\n return res\n}())).OptArgs(r.InsertOpts{ReturnChanges: true, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert((func() []interface{} { + runAndAssert(suite.Suite, expected_, tbl.Insert((func() []interface{} { res := []interface{}{} for iterator_ := 1; iterator_ < 100; iterator_++ { i := iterator_ @@ -765,11 +765,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #186 /* partial({'changes': [{'old_val': None, 'new_val': None, 'error': '`r.minval` and `r.maxval` cannot be written to disk.'}]}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"changes": []interface{}{map[interface{}]interface{}{"old_val": nil, "new_val": nil, "error": "`r.minval` and `r.maxval` cannot be written to disk."}}}) - /* table_test_mutation_insert.insert({'a':r.minval}, return_changes="always") */ + /* tbl.insert({'a':r.minval}, return_changes="always") */ - suite.T().Log("About to run line #186: table_test_mutation_insert.Insert(map[interface{}]interface{}{'a': r.MinVal, }).OptArgs(r.InsertOpts{ReturnChanges: 'always', })") + suite.T().Log("About to run line #186: tbl.Insert(map[interface{}]interface{}{'a': r.MinVal, }).OptArgs(r.InsertOpts{ReturnChanges: 'always', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"a": r.MinVal}).OptArgs(r.InsertOpts{ReturnChanges: "always"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"a": r.MinVal}).OptArgs(r.InsertOpts{ReturnChanges: "always"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -780,11 +780,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #192 /* partial({'inserted':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"inserted": 1}) - /* table_test_mutation_insert.insert({'id':42, 'foo':1, 'bar':1}) */ + /* tbl.insert({'id':42, 'foo':1, 'bar':1}) */ - suite.T().Log("About to run line #192: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 42, 'foo': 1, 'bar': 1, })") + suite.T().Log("About to run line #192: tbl.Insert(map[interface{}]interface{}{'id': 42, 'foo': 1, 'bar': 1, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 42, "foo": 1, "bar": 1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 42, "foo": 1, "bar": 1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -795,11 +795,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #194 /* partial({'replaced':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"replaced": 1}) - /* table_test_mutation_insert.insert({'id':42, 'foo':5, 'bar':5}, conflict=lambda id, old_row, new_row: old_row.merge(new_row.pluck("bar"))) */ + /* tbl.insert({'id':42, 'foo':5, 'bar':5}, conflict=lambda id, old_row, new_row: old_row.merge(new_row.pluck("bar"))) */ - suite.T().Log("About to run line #194: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 42, 'foo': 5, 'bar': 5, }).OptArgs(r.InsertOpts{Conflict: func(id r.Term, old_row r.Term, new_row r.Term) interface{} { return old_row.Merge(new_row.Pluck('bar'))}, })") + suite.T().Log("About to run line #194: tbl.Insert(map[interface{}]interface{}{'id': 42, 'foo': 5, 'bar': 5, }).OptArgs(r.InsertOpts{Conflict: func(id r.Term, old_row r.Term, new_row r.Term) interface{} { return old_row.Merge(new_row.Pluck('bar'))}, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 42, "foo": 5, "bar": 5}).OptArgs(r.InsertOpts{Conflict: func(id r.Term, old_row r.Term, new_row r.Term) interface{} { + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 42, "foo": 5, "bar": 5}).OptArgs(r.InsertOpts{Conflict: func(id r.Term, old_row r.Term, new_row r.Term) interface{} { return old_row.Merge(new_row.Pluck("bar")) }}), suite.session, r.RunOpts{ GeometryFormat: "raw", @@ -812,11 +812,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #196 /* {'id':42, 'foo':1, 'bar':5} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 42, "foo": 1, "bar": 5} - /* table_test_mutation_insert.get(42) */ + /* tbl.get(42) */ - suite.T().Log("About to run line #196: table_test_mutation_insert.Get(42)") + suite.T().Log("About to run line #196: tbl.Get(42)") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Get(42), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(42), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -827,11 +827,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #214 /* partial({'first_error': 'Inserted value must be an OBJECT (got NUMBER):\n2'}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"first_error": "Inserted value must be an OBJECT (got NUMBER):\n2"}) - /* table_test_mutation_insert.insert({'id':42, 'foo':1, 'bar':1}, conflict=lambda a,b,c: 2) */ + /* tbl.insert({'id':42, 'foo':1, 'bar':1}, conflict=lambda a,b,c: 2) */ - suite.T().Log("About to run line #214: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 42, 'foo': 1, 'bar': 1, }).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} { return 2}, })") + suite.T().Log("About to run line #214: tbl.Insert(map[interface{}]interface{}{'id': 42, 'foo': 1, 'bar': 1, }).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} { return 2}, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 42, "foo": 1, "bar": 1}).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} { return 2 }}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 42, "foo": 1, "bar": 1}).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} { return 2 }}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -842,11 +842,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #218 /* err("ReqlQueryLogicError", "The conflict function passed to `insert` should expect 3 arguments.") */ var expected_ Err = err("ReqlQueryLogicError", "The conflict function passed to `insert` should expect 3 arguments.") - /* table_test_mutation_insert.insert({'id':42}, conflict=lambda a,b: a) */ + /* tbl.insert({'id':42}, conflict=lambda a,b: a) */ - suite.T().Log("About to run line #218: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 42, }).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term) interface{} { return a}, })") + suite.T().Log("About to run line #218: tbl.Insert(map[interface{}]interface{}{'id': 42, }).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term) interface{} { return a}, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 42}).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term) interface{} { return a }}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 42}).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term) interface{} { return a }}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -857,11 +857,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #222 /* err("ReqlQueryLogicError", "The conflict function passed to `insert` must be deterministic.") */ var expected_ Err = err("ReqlQueryLogicError", "The conflict function passed to `insert` must be deterministic.") - /* table_test_mutation_insert.insert({'id':42}, conflict=lambda a,b,c: table_test_mutation_insert.get(42)) */ + /* tbl.insert({'id':42}, conflict=lambda a,b,c: tbl.get(42)) */ - suite.T().Log("About to run line #222: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 42, }).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} { return table_test_mutation_insert.Get(42)}, })") + suite.T().Log("About to run line #222: tbl.Insert(map[interface{}]interface{}{'id': 42, }).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} { return tbl.Get(42)}, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 42}).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} { return table_test_mutation_insert.Get(42) }}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 42}).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} { return tbl.Get(42) }}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -872,11 +872,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #225 /* partial({'replaced': 1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"replaced": 1}) - /* table_test_mutation_insert.insert({'id':42}, conflict=lambda a,b,c: {'id':42, 'num':'424'}) */ + /* tbl.insert({'id':42}, conflict=lambda a,b,c: {'id':42, 'num':'424'}) */ - suite.T().Log("About to run line #225: table_test_mutation_insert.Insert(map[interface{}]interface{}{'id': 42, }).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} { return map[interface{}]interface{}{'id': 42, 'num': '424', }}, })") + suite.T().Log("About to run line #225: tbl.Insert(map[interface{}]interface{}{'id': 42, }).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} { return map[interface{}]interface{}{'id': 42, 'num': '424', }}, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Insert(map[interface{}]interface{}{"id": 42}).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} { + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 42}).OptArgs(r.InsertOpts{Conflict: func(a r.Term, b r.Term, c r.Term) interface{} { return map[interface{}]interface{}{"id": 42, "num": "424"} }}), suite.session, r.RunOpts{ GeometryFormat: "raw", @@ -889,11 +889,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #227 /* {'id':42, 'num':'424'} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 42, "num": "424"} - /* table_test_mutation_insert.get(42) */ + /* tbl.get(42) */ - suite.T().Log("About to run line #227: table_test_mutation_insert.Get(42)") + suite.T().Log("About to run line #227: tbl.Get(42)") - runAndAssert(suite.Suite, expected_, table_test_mutation_insert.Get(42), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(42), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -934,11 +934,11 @@ func (suite *MutationInsertSuite) TestCases() { // mutation/insert.yaml line #238 /* partial({'tables_dropped':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"tables_dropped": 1}) - /* r.db('test').table_drop('table_test2_mutation') */ + /* r.db('test').table_drop('test2') */ - suite.T().Log("About to run line #238: r.DB('test').TableDrop('table_test2_mutation')") + suite.T().Log("About to run line #238: r.DB('test').TableDrop('test2')") - runAndAssert(suite.Suite, expected_, r.DB("db_mut_ins").TableDrop("table_test2_mutation"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB("test").TableDrop("test2"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_mutation_replace_test.go b/internal/integration/reql_tests/reql_mutation_replace_test.go index ddabeb13..0a28cf2c 100644 --- a/internal/integration/reql_tests/reql_mutation_replace_test.go +++ b/internal/integration/reql_tests/reql_mutation_replace_test.go @@ -36,16 +36,16 @@ func (suite *MutationReplaceSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_mut_rep").Exec(suite.session) - err = r.DBCreate("db_mut_rep").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_mut_rep").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_mut_rep").TableDrop("table_test_mutation_replace").Exec(suite.session) - err = r.DB("db_mut_rep").TableCreate("table_test_mutation_replace").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_mut_rep").Table("table_test_mutation_replace").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -54,8 +54,8 @@ func (suite *MutationReplaceSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_mut_rep").TableDrop("table_test_mutation_replace").Exec(suite.session) - r.DBDrop("db_mut_rep").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -64,18 +64,18 @@ func (suite *MutationReplaceSuite) TearDownSuite() { func (suite *MutationReplaceSuite) TestCases() { suite.T().Log("Running MutationReplaceSuite: Tests replacement of selections") - table_test_mutation_replace := r.DB("db_mut_rep").Table("table_test_mutation_replace") - _ = table_test_mutation_replace // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors { // mutation/replace.yaml line #7 /* ({'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':100}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 100} - /* table_test_mutation_replace.insert([{'id':i} for i in xrange(100)]) */ + /* tbl.insert([{'id':i} for i in xrange(100)]) */ - suite.T().Log("About to run line #7: table_test_mutation_replace.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 0; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': i, })\n }\n return res\n}()))") + suite.T().Log("About to run line #7: tbl.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 0; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': i, })\n }\n return res\n}()))") - runAndAssert(suite.Suite, expected_, table_test_mutation_replace.Insert((func() []interface{} { + runAndAssert(suite.Suite, expected_, tbl.Insert((func() []interface{} { res := []interface{}{} for iterator_ := 0; iterator_ < 100; iterator_++ { i := iterator_ @@ -93,11 +93,11 @@ func (suite *MutationReplaceSuite) TestCases() { // mutation/replace.yaml line #19 /* 100 */ var expected_ int = 100 - /* table_test_mutation_replace.count() */ + /* tbl.count() */ - suite.T().Log("About to run line #19: table_test_mutation_replace.Count()") + suite.T().Log("About to run line #19: tbl.Count()") - runAndAssert(suite.Suite, expected_, table_test_mutation_replace.Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -108,11 +108,11 @@ func (suite *MutationReplaceSuite) TestCases() { // mutation/replace.yaml line #24 /* ({'deleted':0.0,'replaced':0.0,'unchanged':1,'errors':0.0,'skipped':0.0,'inserted':0.0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 1, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_replace.get(12).replace(lambda row:{'id':row['id']}) */ + /* tbl.get(12).replace(lambda row:{'id':row['id']}) */ - suite.T().Log("About to run line #24: table_test_mutation_replace.Get(12).Replace(func(row r.Term) interface{} { return map[interface{}]interface{}{'id': row.AtIndex('id'), }})") + suite.T().Log("About to run line #24: tbl.Get(12).Replace(func(row r.Term) interface{} { return map[interface{}]interface{}{'id': row.AtIndex('id'), }})") - runAndAssert(suite.Suite, expected_, table_test_mutation_replace.Get(12).Replace(func(row r.Term) interface{} { return map[interface{}]interface{}{"id": row.AtIndex("id")} }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(12).Replace(func(row r.Term) interface{} { return map[interface{}]interface{}{"id": row.AtIndex("id")} }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -123,11 +123,11 @@ func (suite *MutationReplaceSuite) TestCases() { // mutation/replace.yaml line #31 /* ({'deleted':0.0,'replaced':1,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':0.0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 1, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_replace.get(12).replace(lambda row:{'id':row['id'], 'a':row['id']}) */ + /* tbl.get(12).replace(lambda row:{'id':row['id'], 'a':row['id']}) */ - suite.T().Log("About to run line #31: table_test_mutation_replace.Get(12).Replace(func(row r.Term) interface{} { return map[interface{}]interface{}{'id': row.AtIndex('id'), 'a': row.AtIndex('id'), }})") + suite.T().Log("About to run line #31: tbl.Get(12).Replace(func(row r.Term) interface{} { return map[interface{}]interface{}{'id': row.AtIndex('id'), 'a': row.AtIndex('id'), }})") - runAndAssert(suite.Suite, expected_, table_test_mutation_replace.Get(12).Replace(func(row r.Term) interface{} { + runAndAssert(suite.Suite, expected_, tbl.Get(12).Replace(func(row r.Term) interface{} { return map[interface{}]interface{}{"id": row.AtIndex("id"), "a": row.AtIndex("id")} }), suite.session, r.RunOpts{ GeometryFormat: "raw", @@ -140,11 +140,11 @@ func (suite *MutationReplaceSuite) TestCases() { // mutation/replace.yaml line #36 /* ({'deleted':1,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':0.0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 1, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_replace.get(13).replace(lambda row:null) */ + /* tbl.get(13).replace(lambda row:null) */ - suite.T().Log("About to run line #36: table_test_mutation_replace.Get(13).Replace(func(row r.Term) interface{} { return nil})") + suite.T().Log("About to run line #36: tbl.Get(13).Replace(func(row r.Term) interface{} { return nil})") - runAndAssert(suite.Suite, expected_, table_test_mutation_replace.Get(13).Replace(func(row r.Term) interface{} { return nil }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(13).Replace(func(row r.Term) interface{} { return nil }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -155,11 +155,11 @@ func (suite *MutationReplaceSuite) TestCases() { // mutation/replace.yaml line #43 /* ({'first_error':'Inserted object must have primary key `id`:\n{\n\t\"a\":\t1\n}','deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':10,'skipped':0.0,'inserted':0.0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"first_error": "Inserted object must have primary key `id`:\n{\n\t\"a\":\t1\n}", "deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 10, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_replace.between(10, 20, right_bound='closed').replace(lambda row:{'a':1}) */ + /* tbl.between(10, 20, right_bound='closed').replace(lambda row:{'a':1}) */ - suite.T().Log("About to run line #43: table_test_mutation_replace.Between(10, 20).OptArgs(r.BetweenOpts{RightBound: 'closed', }).Replace(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': 1, }})") + suite.T().Log("About to run line #43: tbl.Between(10, 20).OptArgs(r.BetweenOpts{RightBound: 'closed', }).Replace(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': 1, }})") - runAndAssert(suite.Suite, expected_, table_test_mutation_replace.Between(10, 20).OptArgs(r.BetweenOpts{RightBound: "closed"}).Replace(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": 1} }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(10, 20).OptArgs(r.BetweenOpts{RightBound: "closed"}).Replace(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": 1} }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -170,11 +170,11 @@ func (suite *MutationReplaceSuite) TestCases() { // mutation/replace.yaml line #47 /* ({'deleted':0.0,'replaced':8,'unchanged':1,'errors':0.0,'skipped':0.0,'inserted':0.0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 8, "unchanged": 1, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_replace.filter(lambda row:(row['id'] >= 10) & (row['id'] < 20)).replace(lambda row:{'id':row['id'], 'a':row['id']}) */ + /* tbl.filter(lambda row:(row['id'] >= 10) & (row['id'] < 20)).replace(lambda row:{'id':row['id'], 'a':row['id']}) */ - suite.T().Log("About to run line #47: table_test_mutation_replace.Filter(func(row r.Term) interface{} { return row.AtIndex('id').Ge(10).And(row.AtIndex('id').Lt(20))}).Replace(func(row r.Term) interface{} { return map[interface{}]interface{}{'id': row.AtIndex('id'), 'a': row.AtIndex('id'), }})") + suite.T().Log("About to run line #47: tbl.Filter(func(row r.Term) interface{} { return row.AtIndex('id').Ge(10).And(row.AtIndex('id').Lt(20))}).Replace(func(row r.Term) interface{} { return map[interface{}]interface{}{'id': row.AtIndex('id'), 'a': row.AtIndex('id'), }})") - runAndAssert(suite.Suite, expected_, table_test_mutation_replace.Filter(func(row r.Term) interface{} { return row.AtIndex("id").Ge(10).And(row.AtIndex("id").Lt(20)) }).Replace(func(row r.Term) interface{} { + runAndAssert(suite.Suite, expected_, tbl.Filter(func(row r.Term) interface{} { return row.AtIndex("id").Ge(10).And(row.AtIndex("id").Lt(20)) }).Replace(func(row r.Term) interface{} { return map[interface{}]interface{}{"id": row.AtIndex("id"), "a": row.AtIndex("id")} }), suite.session, r.RunOpts{ GeometryFormat: "raw", @@ -187,11 +187,11 @@ func (suite *MutationReplaceSuite) TestCases() { // mutation/replace.yaml line #56 /* ({'first_error':"Primary key `id` cannot be changed (`{\n\t\"id\":\t1\n}` -> `{\n\t\"a\":\t1,\n\t\"id\":\t2\n}`).",'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':1,'skipped':0.0,'inserted':0.0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"first_error": "Primary key `id` cannot be changed (`{\n\t\"id\":\t1\n}` -> `{\n\t\"a\":\t1,\n\t\"id\":\t2\n}`).", "deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 1, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_replace.get(1).replace({'id':2,'a':1}) */ + /* tbl.get(1).replace({'id':2,'a':1}) */ - suite.T().Log("About to run line #56: table_test_mutation_replace.Get(1).Replace(map[interface{}]interface{}{'id': 2, 'a': 1, })") + suite.T().Log("About to run line #56: tbl.Get(1).Replace(map[interface{}]interface{}{'id': 2, 'a': 1, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_replace.Get(1).Replace(map[interface{}]interface{}{"id": 2, "a": 1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Replace(map[interface{}]interface{}{"id": 2, "a": 1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -202,11 +202,11 @@ func (suite *MutationReplaceSuite) TestCases() { // mutation/replace.yaml line #61 /* ({'first_error':"Inserted object must have primary key `id`:\n{\n\t\"a\":\t1\n}",'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':1,'skipped':0.0,'inserted':0.0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"first_error": "Inserted object must have primary key `id`:\n{\n\t\"a\":\t1\n}", "deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 1, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_replace.get(1).replace({'a':1}) */ + /* tbl.get(1).replace({'a':1}) */ - suite.T().Log("About to run line #61: table_test_mutation_replace.Get(1).Replace(map[interface{}]interface{}{'a': 1, })") + suite.T().Log("About to run line #61: tbl.Get(1).Replace(map[interface{}]interface{}{'a': 1, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_replace.Get(1).Replace(map[interface{}]interface{}{"a": 1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Replace(map[interface{}]interface{}{"a": 1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -217,11 +217,11 @@ func (suite *MutationReplaceSuite) TestCases() { // mutation/replace.yaml line #65 /* ({'deleted':0.0,'replaced':1,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':0.0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 1, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_replace.get(1).replace({'id':r.row['id'],'a':'b'}) */ + /* tbl.get(1).replace({'id':r.row['id'],'a':'b'}) */ - suite.T().Log("About to run line #65: table_test_mutation_replace.Get(1).Replace(map[interface{}]interface{}{'id': r.Row.AtIndex('id'), 'a': 'b', })") + suite.T().Log("About to run line #65: tbl.Get(1).Replace(map[interface{}]interface{}{'id': r.Row.AtIndex('id'), 'a': 'b', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_replace.Get(1).Replace(map[interface{}]interface{}{"id": r.Row.AtIndex("id"), "a": "b"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Replace(map[interface{}]interface{}{"id": r.Row.AtIndex("id"), "a": "b"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -232,11 +232,11 @@ func (suite *MutationReplaceSuite) TestCases() { // mutation/replace.yaml line #70 /* ({'deleted':0.0,'replaced':0.0,'unchanged':1,'errors':0.0,'skipped':0.0,'inserted':0.0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 1, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_replace.get(1).replace(r.row.merge({'a':'b'})) */ + /* tbl.get(1).replace(r.row.merge({'a':'b'})) */ - suite.T().Log("About to run line #70: table_test_mutation_replace.Get(1).Replace(r.Row.Merge(map[interface{}]interface{}{'a': 'b', }))") + suite.T().Log("About to run line #70: tbl.Get(1).Replace(r.Row.Merge(map[interface{}]interface{}{'a': 'b', }))") - runAndAssert(suite.Suite, expected_, table_test_mutation_replace.Get(1).Replace(r.Row.Merge(map[interface{}]interface{}{"a": "b"})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Replace(r.Row.Merge(map[interface{}]interface{}{"a": "b"})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -247,11 +247,11 @@ func (suite *MutationReplaceSuite) TestCases() { // mutation/replace.yaml line #75 /* err('ReqlQueryLogicError', 'Could not prove argument deterministic. Maybe you want to use the non_atomic flag?', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Could not prove argument deterministic. Maybe you want to use the non_atomic flag?") - /* table_test_mutation_replace.get(1).replace(r.row.merge({'c':r.js('5')})) */ + /* tbl.get(1).replace(r.row.merge({'c':r.js('5')})) */ - suite.T().Log("About to run line #75: table_test_mutation_replace.Get(1).Replace(r.Row.Merge(map[interface{}]interface{}{'c': r.JS('5'), }))") + suite.T().Log("About to run line #75: tbl.Get(1).Replace(r.Row.Merge(map[interface{}]interface{}{'c': r.JS('5'), }))") - runAndAssert(suite.Suite, expected_, table_test_mutation_replace.Get(1).Replace(r.Row.Merge(map[interface{}]interface{}{"c": r.JS("5")})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Replace(r.Row.Merge(map[interface{}]interface{}{"c": r.JS("5")})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -262,11 +262,11 @@ func (suite *MutationReplaceSuite) TestCases() { // mutation/replace.yaml line #79 /* err('ReqlQueryLogicError', 'Could not prove argument deterministic. Maybe you want to use the non_atomic flag?', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Could not prove argument deterministic. Maybe you want to use the non_atomic flag?") - /* table_test_mutation_replace.get(1).replace(r.row.merge({'c':table_test_mutation_replace.nth(0)})) */ + /* tbl.get(1).replace(r.row.merge({'c':tbl.nth(0)})) */ - suite.T().Log("About to run line #79: table_test_mutation_replace.Get(1).Replace(r.Row.Merge(map[interface{}]interface{}{'c': table_test_mutation_replace.Nth(0), }))") + suite.T().Log("About to run line #79: tbl.Get(1).Replace(r.Row.Merge(map[interface{}]interface{}{'c': tbl.Nth(0), }))") - runAndAssert(suite.Suite, expected_, table_test_mutation_replace.Get(1).Replace(r.Row.Merge(map[interface{}]interface{}{"c": table_test_mutation_replace.Nth(0)})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Replace(r.Row.Merge(map[interface{}]interface{}{"c": tbl.Nth(0)})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -277,11 +277,11 @@ func (suite *MutationReplaceSuite) TestCases() { // mutation/replace.yaml line #83 /* ({'deleted':0.0,'replaced':1,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':0.0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 1, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_replace.get(1).replace(r.row.merge({'c':r.js('5')}), non_atomic=True) */ + /* tbl.get(1).replace(r.row.merge({'c':r.js('5')}), non_atomic=True) */ - suite.T().Log("About to run line #83: table_test_mutation_replace.Get(1).Replace(r.Row.Merge(map[interface{}]interface{}{'c': r.JS('5'), })).OptArgs(r.ReplaceOpts{NonAtomic: true, })") + suite.T().Log("About to run line #83: tbl.Get(1).Replace(r.Row.Merge(map[interface{}]interface{}{'c': r.JS('5'), })).OptArgs(r.ReplaceOpts{NonAtomic: true, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_replace.Get(1).Replace(r.Row.Merge(map[interface{}]interface{}{"c": r.JS("5")})).OptArgs(r.ReplaceOpts{NonAtomic: true}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Replace(r.Row.Merge(map[interface{}]interface{}{"c": r.JS("5")})).OptArgs(r.ReplaceOpts{NonAtomic: true}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -292,11 +292,11 @@ func (suite *MutationReplaceSuite) TestCases() { // mutation/replace.yaml line #99 /* ({'deleted':99,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':0.0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 99, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_replace.replace(lambda row:null) */ + /* tbl.replace(lambda row:null) */ - suite.T().Log("About to run line #99: table_test_mutation_replace.Replace(func(row r.Term) interface{} { return nil})") + suite.T().Log("About to run line #99: tbl.Replace(func(row r.Term) interface{} { return nil})") - runAndAssert(suite.Suite, expected_, table_test_mutation_replace.Replace(func(row r.Term) interface{} { return nil }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Replace(func(row r.Term) interface{} { return nil }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -307,11 +307,11 @@ func (suite *MutationReplaceSuite) TestCases() { // mutation/replace.yaml line #104 /* 1 */ var expected_ int = 1 - /* table_test_mutation_replace.get('sdfjk').replace({'id':'sdfjk'})['inserted'] */ + /* tbl.get('sdfjk').replace({'id':'sdfjk'})['inserted'] */ - suite.T().Log("About to run line #104: table_test_mutation_replace.Get('sdfjk').Replace(map[interface{}]interface{}{'id': 'sdfjk', }).AtIndex('inserted')") + suite.T().Log("About to run line #104: tbl.Get('sdfjk').Replace(map[interface{}]interface{}{'id': 'sdfjk', }).AtIndex('inserted')") - runAndAssert(suite.Suite, expected_, table_test_mutation_replace.Get("sdfjk").Replace(map[interface{}]interface{}{"id": "sdfjk"}).AtIndex("inserted"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get("sdfjk").Replace(map[interface{}]interface{}{"id": "sdfjk"}).AtIndex("inserted"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -322,14 +322,29 @@ func (suite *MutationReplaceSuite) TestCases() { // mutation/replace.yaml line #107 /* 1 */ var expected_ int = 1 - /* table_test_mutation_replace.get('sdfjki').replace({'id':'sdfjk'})['errors'] */ + /* tbl.get('sdfjki').replace({'id':'sdfjk'})['errors'] */ - suite.T().Log("About to run line #107: table_test_mutation_replace.Get('sdfjki').Replace(map[interface{}]interface{}{'id': 'sdfjk', }).AtIndex('errors')") + suite.T().Log("About to run line #107: tbl.Get('sdfjki').Replace(map[interface{}]interface{}{'id': 'sdfjk', }).AtIndex('errors')") - runAndAssert(suite.Suite, expected_, table_test_mutation_replace.Get("sdfjki").Replace(map[interface{}]interface{}{"id": "sdfjk"}).AtIndex("errors"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get("sdfjki").Replace(map[interface{}]interface{}{"id": "sdfjk"}).AtIndex("errors"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) suite.T().Log("Finished running line #107") } + + { + // mutation/replace.yaml line #111 + /* ({'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':1,'inserted':0.0}) */ + var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 1, "inserted": 0.0} + /* tbl.get('non-existant').replace(null) */ + + suite.T().Log("About to run line #111: tbl.Get('non-existant').Replace(nil)") + + runAndAssert(suite.Suite, expected_, tbl.Get("non-existant").Replace(nil), suite.session, r.RunOpts{ + GeometryFormat: "raw", + GroupFormat: "map", + }) + suite.T().Log("Finished running line #111") + } } diff --git a/internal/integration/reql_tests/reql_mutation_sync_test.go b/internal/integration/reql_tests/reql_mutation_sync_test.go index 79e736f4..9f6a722f 100644 --- a/internal/integration/reql_tests/reql_mutation_sync_test.go +++ b/internal/integration/reql_tests/reql_mutation_sync_test.go @@ -36,10 +36,10 @@ func (suite *MutationSyncSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_mut_sync").Exec(suite.session) - err = r.DBCreate("db_mut_sync").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_mut_sync").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *MutationSyncSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_mut_sync").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -66,7 +66,7 @@ func (suite *MutationSyncSuite) TestCases() { suite.T().Log("About to run line #5: r.DB('test').TableCreate('test1')") - runAndAssert(suite.Suite, expected_, r.DB("db_mut_sync").TableCreate("test1"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB("test").TableCreate("test1"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -81,7 +81,7 @@ func (suite *MutationSyncSuite) TestCases() { suite.T().Log("About to run line #7: r.DB('test').TableCreate('test1soft')") - runAndAssert(suite.Suite, expected_, r.DB("db_mut_sync").TableCreate("test1soft"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB("test").TableCreate("test1soft"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -96,7 +96,7 @@ func (suite *MutationSyncSuite) TestCases() { suite.T().Log("About to run line #9: r.DB('test').Table('test1soft').Config().Update(map[interface{}]interface{}{'durability': 'soft', })") - runAndAssert(suite.Suite, expected_, r.DB("db_mut_sync").Table("test1soft").Config().Update(map[interface{}]interface{}{"durability": "soft"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB("test").Table("test1soft").Config().Update(map[interface{}]interface{}{"durability": "soft"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -107,14 +107,14 @@ func (suite *MutationSyncSuite) TestCases() { // tbl = r.db('test').table('test1') suite.T().Log("Possibly executing: var tbl r.Term = r.DB('test').Table('test1')") - tbl := r.DB("db_mut_sync").Table("test1") + tbl := r.DB("test").Table("test1") _ = tbl // Prevent any noused variable errors // mutation/sync.yaml line #12 // tbl_soft = r.db('test').table('test1soft') suite.T().Log("Possibly executing: var tbl_soft r.Term = r.DB('test').Table('test1soft')") - tbl_soft := r.DB("db_mut_sync").Table("test1soft") + tbl_soft := r.DB("test").Table("test1soft") _ = tbl_soft // Prevent any noused variable errors { @@ -217,7 +217,7 @@ func (suite *MutationSyncSuite) TestCases() { suite.T().Log("About to run line #48: r.DB('test').TableDrop('test1')") - runAndAssert(suite.Suite, expected_, r.DB("db_mut_sync").TableDrop("test1"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB("test").TableDrop("test1"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -232,7 +232,7 @@ func (suite *MutationSyncSuite) TestCases() { suite.T().Log("About to run line #50: r.DB('test').TableDrop('test1soft')") - runAndAssert(suite.Suite, expected_, r.DB("db_mut_sync").TableDrop("test1soft"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB("test").TableDrop("test1soft"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_mutation_update_test.go b/internal/integration/reql_tests/reql_mutation_update_test.go index 707e544a..3b036c41 100644 --- a/internal/integration/reql_tests/reql_mutation_update_test.go +++ b/internal/integration/reql_tests/reql_mutation_update_test.go @@ -36,21 +36,21 @@ func (suite *MutationUpdateSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_mut_upd").Exec(suite.session) - err = r.DBCreate("db_mut_upd").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_mut_upd").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_mut_upd").TableDrop("table_test_mutation_update").Exec(suite.session) - err = r.DB("db_mut_upd").TableCreate("table_test_mutation_update").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_mut_upd").Table("table_test_mutation_update").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_mut_upd").TableDrop("table_test_mutation_update2").Exec(suite.session) - err = r.DB("db_mut_upd").TableCreate("table_test_mutation_update2").Exec(suite.session) + r.DB("test").TableDrop("tbl2").Exec(suite.session) + err = r.DB("test").TableCreate("tbl2").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_mut_upd").Table("table_test_mutation_update2").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl2").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -59,9 +59,9 @@ func (suite *MutationUpdateSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_mut_upd").TableDrop("table_test_mutation_update").Exec(suite.session) - r.DB("db_mut_upd").TableDrop("table_test_mutation_update2").Exec(suite.session) - r.DBDrop("db_mut_upd").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DB("test").TableDrop("tbl2").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -70,20 +70,20 @@ func (suite *MutationUpdateSuite) TearDownSuite() { func (suite *MutationUpdateSuite) TestCases() { suite.T().Log("Running MutationUpdateSuite: Tests updates of selections") - table_test_mutation_update := r.DB("db_mut_upd").Table("table_test_mutation_update") - _ = table_test_mutation_update // Prevent any noused variable errors - table_test_mutation_update2 := r.DB("db_mut_upd").Table("table_test_mutation_update2") - _ = table_test_mutation_update2 // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors + tbl2 := r.DB("test").Table("tbl2") + _ = tbl2 // Prevent any noused variable errors { // mutation/update.yaml line #6 /* ({'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':100}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 100} - /* table_test_mutation_update.insert([{'id':i} for i in xrange(100)]) */ + /* tbl.insert([{'id':i} for i in xrange(100)]) */ - suite.T().Log("About to run line #6: table_test_mutation_update.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 0; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': i, })\n }\n return res\n}()))") + suite.T().Log("About to run line #6: tbl.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 0; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': i, })\n }\n return res\n}()))") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Insert((func() []interface{} { + runAndAssert(suite.Suite, expected_, tbl.Insert((func() []interface{} { res := []interface{}{} for iterator_ := 0; iterator_ < 100; iterator_++ { i := iterator_ @@ -101,11 +101,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #18 /* 100 */ var expected_ int = 100 - /* table_test_mutation_update.count() */ + /* tbl.count() */ - suite.T().Log("About to run line #18: table_test_mutation_update.Count()") + suite.T().Log("About to run line #18: tbl.Count()") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -116,11 +116,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #21 /* ({'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':100}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 100} - /* table_test_mutation_update2.insert([{'id':i, 'foo':{'bar':i}} for i in xrange(100)]) */ + /* tbl2.insert([{'id':i, 'foo':{'bar':i}} for i in xrange(100)]) */ - suite.T().Log("About to run line #21: table_test_mutation_update2.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 0; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': i, 'foo': map[interface{}]interface{}{'bar': i, }, })\n }\n return res\n}()))") + suite.T().Log("About to run line #21: tbl2.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 0; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': i, 'foo': map[interface{}]interface{}{'bar': i, }, })\n }\n return res\n}()))") - runAndAssert(suite.Suite, expected_, table_test_mutation_update2.Insert((func() []interface{} { + runAndAssert(suite.Suite, expected_, tbl2.Insert((func() []interface{} { res := []interface{}{} for iterator_ := 0; iterator_ < 100; iterator_++ { i := iterator_ @@ -138,11 +138,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #33 /* 100 */ var expected_ int = 100 - /* table_test_mutation_update2.count() */ + /* tbl2.count() */ - suite.T().Log("About to run line #33: table_test_mutation_update2.Count()") + suite.T().Log("About to run line #33: tbl2.Count()") - runAndAssert(suite.Suite, expected_, table_test_mutation_update2.Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -153,11 +153,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #37 /* {'deleted':0.0,'replaced':0.0,'unchanged':1,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 1, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update.get(12).update(lambda row:row) */ + /* tbl.get(12).update(lambda row:row) */ - suite.T().Log("About to run line #37: table_test_mutation_update.Get(12).Update(func(row r.Term) interface{} { return row})") + suite.T().Log("About to run line #37: tbl.Get(12).Update(func(row r.Term) interface{} { return row})") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Get(12).Update(func(row r.Term) interface{} { return row }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(12).Update(func(row r.Term) interface{} { return row }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -168,11 +168,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #43 /* {'deleted':0.0,'replaced':1,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 1, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update.get(12).update(lambda row:{'a':row['id'] + 1}, durability='soft') */ + /* tbl.get(12).update(lambda row:{'a':row['id'] + 1}, durability='soft') */ - suite.T().Log("About to run line #43: table_test_mutation_update.Get(12).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': row.AtIndex('id').Add(1), }}).OptArgs(r.UpdateOpts{Durability: 'soft', })") + suite.T().Log("About to run line #43: tbl.Get(12).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': row.AtIndex('id').Add(1), }}).OptArgs(r.UpdateOpts{Durability: 'soft', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Get(12).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": row.AtIndex("id").Add(1)} }).OptArgs(r.UpdateOpts{Durability: "soft"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(12).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": row.AtIndex("id").Add(1)} }).OptArgs(r.UpdateOpts{Durability: "soft"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -183,11 +183,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #48 /* {'id':12, 'a':13} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 12, "a": 13} - /* table_test_mutation_update.get(12) */ + /* tbl.get(12) */ - suite.T().Log("About to run line #48: table_test_mutation_update.Get(12)") + suite.T().Log("About to run line #48: tbl.Get(12)") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Get(12), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(12), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -198,11 +198,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #52 /* {'deleted':0.0,'replaced':1,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 1, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update.get(12).update(lambda row:{'a':row['id'] + 2}, durability='hard') */ + /* tbl.get(12).update(lambda row:{'a':row['id'] + 2}, durability='hard') */ - suite.T().Log("About to run line #52: table_test_mutation_update.Get(12).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': row.AtIndex('id').Add(2), }}).OptArgs(r.UpdateOpts{Durability: 'hard', })") + suite.T().Log("About to run line #52: tbl.Get(12).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': row.AtIndex('id').Add(2), }}).OptArgs(r.UpdateOpts{Durability: 'hard', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Get(12).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": row.AtIndex("id").Add(2)} }).OptArgs(r.UpdateOpts{Durability: "hard"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(12).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": row.AtIndex("id").Add(2)} }).OptArgs(r.UpdateOpts{Durability: "hard"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -213,11 +213,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #57 /* {'id':12, 'a':14} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 12, "a": 14} - /* table_test_mutation_update.get(12) */ + /* tbl.get(12) */ - suite.T().Log("About to run line #57: table_test_mutation_update.Get(12)") + suite.T().Log("About to run line #57: tbl.Get(12)") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Get(12), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(12), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -228,11 +228,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #61 /* err('ReqlQueryLogicError', 'Durability option `wrong` unrecognized (options are "hard" and "soft").', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Durability option `wrong` unrecognized (options are \"hard\" and \"soft\").") - /* table_test_mutation_update.get(12).update(lambda row:{'a':row['id'] + 3}, durability='wrong') */ + /* tbl.get(12).update(lambda row:{'a':row['id'] + 3}, durability='wrong') */ - suite.T().Log("About to run line #61: table_test_mutation_update.Get(12).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': row.AtIndex('id').Add(3), }}).OptArgs(r.UpdateOpts{Durability: 'wrong', })") + suite.T().Log("About to run line #61: tbl.Get(12).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': row.AtIndex('id').Add(3), }}).OptArgs(r.UpdateOpts{Durability: 'wrong', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Get(12).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": row.AtIndex("id").Add(3)} }).OptArgs(r.UpdateOpts{Durability: "wrong"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(12).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": row.AtIndex("id").Add(3)} }).OptArgs(r.UpdateOpts{Durability: "wrong"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -243,11 +243,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #66 /* {'id':12, 'a':14} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 12, "a": 14} - /* table_test_mutation_update.get(12) */ + /* tbl.get(12) */ - suite.T().Log("About to run line #66: table_test_mutation_update.Get(12)") + suite.T().Log("About to run line #66: tbl.Get(12)") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Get(12), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(12), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -258,11 +258,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #70 /* {'deleted':0.0,'replaced':1,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 1, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update.get(12).update(lambda row:{'a':row['id']}) */ + /* tbl.get(12).update(lambda row:{'a':row['id']}) */ - suite.T().Log("About to run line #70: table_test_mutation_update.Get(12).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': row.AtIndex('id'), }})") + suite.T().Log("About to run line #70: tbl.Get(12).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': row.AtIndex('id'), }})") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Get(12).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": row.AtIndex("id")} }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(12).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": row.AtIndex("id")} }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -273,11 +273,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #75 /* {'id':12, 'a':12} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 12, "a": 12} - /* table_test_mutation_update.get(12) */ + /* tbl.get(12) */ - suite.T().Log("About to run line #75: table_test_mutation_update.Get(12)") + suite.T().Log("About to run line #75: tbl.Get(12)") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Get(12), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(12), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -288,11 +288,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #79 /* {'deleted':0.0,'replaced':1,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 1, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update.get(12).update({'a':r.literal()}) */ + /* tbl.get(12).update({'a':r.literal()}) */ - suite.T().Log("About to run line #79: table_test_mutation_update.Get(12).Update(map[interface{}]interface{}{'a': r.Literal(), })") + suite.T().Log("About to run line #79: tbl.Get(12).Update(map[interface{}]interface{}{'a': r.Literal(), })") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Get(12).Update(map[interface{}]interface{}{"a": r.Literal()}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(12).Update(map[interface{}]interface{}{"a": r.Literal()}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -303,11 +303,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #84 /* {'deleted':0.0,'replaced':10,'unchanged':0,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 10, "unchanged": 0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update.between(10, 20).update(lambda row:{'a':row['id']}) */ + /* tbl.between(10, 20).update(lambda row:{'a':row['id']}) */ - suite.T().Log("About to run line #84: table_test_mutation_update.Between(10, 20).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': row.AtIndex('id'), }})") + suite.T().Log("About to run line #84: tbl.Between(10, 20).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': row.AtIndex('id'), }})") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Between(10, 20).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": row.AtIndex("id")} }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(10, 20).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": row.AtIndex("id")} }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -318,11 +318,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #89 /* {'deleted':0.0,'replaced':0.0,'unchanged':10,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 10, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update.filter(lambda row:(row['id'] >= 10) & (row['id'] < 20)).update(lambda row:{'a':row['id']}) */ + /* tbl.filter(lambda row:(row['id'] >= 10) & (row['id'] < 20)).update(lambda row:{'a':row['id']}) */ - suite.T().Log("About to run line #89: table_test_mutation_update.Filter(func(row r.Term) interface{} { return row.AtIndex('id').Ge(10).And(row.AtIndex('id').Lt(20))}).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': row.AtIndex('id'), }})") + suite.T().Log("About to run line #89: tbl.Filter(func(row r.Term) interface{} { return row.AtIndex('id').Ge(10).And(row.AtIndex('id').Lt(20))}).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': row.AtIndex('id'), }})") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Filter(func(row r.Term) interface{} { return row.AtIndex("id").Ge(10).And(row.AtIndex("id").Lt(20)) }).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": row.AtIndex("id")} }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(func(row r.Term) interface{} { return row.AtIndex("id").Ge(10).And(row.AtIndex("id").Lt(20)) }).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": row.AtIndex("id")} }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -333,11 +333,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #94 /* {'deleted':0.0,'replaced':10,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 10, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update.filter(lambda row:(row['id'] >= 10) & (row['id'] < 20)).update(lambda row:{'b':row['id']}) */ + /* tbl.filter(lambda row:(row['id'] >= 10) & (row['id'] < 20)).update(lambda row:{'b':row['id']}) */ - suite.T().Log("About to run line #94: table_test_mutation_update.Filter(func(row r.Term) interface{} { return row.AtIndex('id').Ge(10).And(row.AtIndex('id').Lt(20))}).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'b': row.AtIndex('id'), }})") + suite.T().Log("About to run line #94: tbl.Filter(func(row r.Term) interface{} { return row.AtIndex('id').Ge(10).And(row.AtIndex('id').Lt(20))}).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'b': row.AtIndex('id'), }})") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Filter(func(row r.Term) interface{} { return row.AtIndex("id").Ge(10).And(row.AtIndex("id").Lt(20)) }).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"b": row.AtIndex("id")} }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(func(row r.Term) interface{} { return row.AtIndex("id").Ge(10).And(row.AtIndex("id").Lt(20)) }).Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"b": row.AtIndex("id")} }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -348,11 +348,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #100 /* {'deleted':0.0,'replaced':10,'unchanged':0,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 10, "unchanged": 0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update.between(10, 20).update({'a':r.literal()}) */ + /* tbl.between(10, 20).update({'a':r.literal()}) */ - suite.T().Log("About to run line #100: table_test_mutation_update.Between(10, 20).Update(map[interface{}]interface{}{'a': r.Literal(), })") + suite.T().Log("About to run line #100: tbl.Between(10, 20).Update(map[interface{}]interface{}{'a': r.Literal(), })") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Between(10, 20).Update(map[interface{}]interface{}{"a": r.Literal()}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(10, 20).Update(map[interface{}]interface{}{"a": r.Literal()}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -363,11 +363,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #104 /* {'first_error':"Primary key `id` cannot be changed (`{\n\t\"id\":\t1\n}` -> `{\n\t\"d\":\t1,\n\t\"id\":\t2\n}`).",'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':1,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"first_error": "Primary key `id` cannot be changed (`{\n\t\"id\":\t1\n}` -> `{\n\t\"d\":\t1,\n\t\"id\":\t2\n}`).", "deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 1, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update.get(1).update({'id':2,'d':1}) */ + /* tbl.get(1).update({'id':2,'d':1}) */ - suite.T().Log("About to run line #104: table_test_mutation_update.Get(1).Update(map[interface{}]interface{}{'id': 2, 'd': 1, })") + suite.T().Log("About to run line #104: tbl.Get(1).Update(map[interface{}]interface{}{'id': 2, 'd': 1, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Get(1).Update(map[interface{}]interface{}{"id": 2, "d": 1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Update(map[interface{}]interface{}{"id": 2, "d": 1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -378,11 +378,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #108 /* {'deleted':0.0,'replaced':1,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 1, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update.get(1).update({'id':r.row['id'],'d':'b'}) */ + /* tbl.get(1).update({'id':r.row['id'],'d':'b'}) */ - suite.T().Log("About to run line #108: table_test_mutation_update.Get(1).Update(map[interface{}]interface{}{'id': r.Row.AtIndex('id'), 'd': 'b', })") + suite.T().Log("About to run line #108: tbl.Get(1).Update(map[interface{}]interface{}{'id': r.Row.AtIndex('id'), 'd': 'b', })") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Get(1).Update(map[interface{}]interface{}{"id": r.Row.AtIndex("id"), "d": "b"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Update(map[interface{}]interface{}{"id": r.Row.AtIndex("id"), "d": "b"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -393,11 +393,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #114 /* {'deleted':0.0,'replaced':0.0,'unchanged':1,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 1, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update.get(1).update(r.row.merge({'d':'b'})) */ + /* tbl.get(1).update(r.row.merge({'d':'b'})) */ - suite.T().Log("About to run line #114: table_test_mutation_update.Get(1).Update(r.Row.Merge(map[interface{}]interface{}{'d': 'b', }))") + suite.T().Log("About to run line #114: tbl.Get(1).Update(r.Row.Merge(map[interface{}]interface{}{'d': 'b', }))") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Get(1).Update(r.Row.Merge(map[interface{}]interface{}{"d": "b"})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Update(r.Row.Merge(map[interface{}]interface{}{"d": "b"})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -408,11 +408,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #119 /* err('ReqlQueryLogicError', 'Could not prove argument deterministic. Maybe you want to use the non_atomic flag?', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Could not prove argument deterministic. Maybe you want to use the non_atomic flag?") - /* table_test_mutation_update.get(1).update({'d':r.js('5')}) */ + /* tbl.get(1).update({'d':r.js('5')}) */ - suite.T().Log("About to run line #119: table_test_mutation_update.Get(1).Update(map[interface{}]interface{}{'d': r.JS('5'), })") + suite.T().Log("About to run line #119: tbl.Get(1).Update(map[interface{}]interface{}{'d': r.JS('5'), })") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Get(1).Update(map[interface{}]interface{}{"d": r.JS("5")}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Update(map[interface{}]interface{}{"d": r.JS("5")}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -423,11 +423,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #122 /* err('ReqlQueryLogicError', 'Could not prove argument deterministic. Maybe you want to use the non_atomic flag?', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Could not prove argument deterministic. Maybe you want to use the non_atomic flag?") - /* table_test_mutation_update.get(1).update({'d':table_test_mutation_update.nth(0)}) */ + /* tbl.get(1).update({'d':tbl.nth(0)}) */ - suite.T().Log("About to run line #122: table_test_mutation_update.Get(1).Update(map[interface{}]interface{}{'d': table_test_mutation_update.Nth(0), })") + suite.T().Log("About to run line #122: tbl.Get(1).Update(map[interface{}]interface{}{'d': tbl.Nth(0), })") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Get(1).Update(map[interface{}]interface{}{"d": table_test_mutation_update.Nth(0)}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Update(map[interface{}]interface{}{"d": tbl.Nth(0)}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -438,11 +438,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #125 /* {'deleted':0.0,'replaced':1,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 1, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update.get(1).update({'d':r.js('5')}, non_atomic=True) */ + /* tbl.get(1).update({'d':r.js('5')}, non_atomic=True) */ - suite.T().Log("About to run line #125: table_test_mutation_update.Get(1).Update(map[interface{}]interface{}{'d': r.JS('5'), }).OptArgs(r.UpdateOpts{NonAtomic: true, })") + suite.T().Log("About to run line #125: tbl.Get(1).Update(map[interface{}]interface{}{'d': r.JS('5'), }).OptArgs(r.UpdateOpts{NonAtomic: true, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Get(1).Update(map[interface{}]interface{}{"d": r.JS("5")}).OptArgs(r.UpdateOpts{NonAtomic: true}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Update(map[interface{}]interface{}{"d": r.JS("5")}).OptArgs(r.UpdateOpts{NonAtomic: true}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -453,11 +453,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #137 /* {'deleted':0.0,'replaced':100,'unchanged':0,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 100, "unchanged": 0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update.update(lambda row:{'a':row['id']}) */ + /* tbl.update(lambda row:{'a':row['id']}) */ - suite.T().Log("About to run line #137: table_test_mutation_update.Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': row.AtIndex('id'), }})") + suite.T().Log("About to run line #137: tbl.Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': row.AtIndex('id'), }})") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": row.AtIndex("id")} }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": row.AtIndex("id")} }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -468,11 +468,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #143 /* {'deleted':0.0,'replaced':100,'unchanged':0,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 100, "unchanged": 0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update.update({'a':r.literal()}) */ + /* tbl.update({'a':r.literal()}) */ - suite.T().Log("About to run line #143: table_test_mutation_update.Update(map[interface{}]interface{}{'a': r.Literal(), })") + suite.T().Log("About to run line #143: tbl.Update(map[interface{}]interface{}{'a': r.Literal(), })") - runAndAssert(suite.Suite, expected_, table_test_mutation_update.Update(map[interface{}]interface{}{"a": r.Literal()}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Update(map[interface{}]interface{}{"a": r.Literal()}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -483,11 +483,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #147 /* {'deleted':0.0,'replaced':99,'unchanged':1,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 99, "unchanged": 1, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update2.update({'foo':{'bar':2}}) */ + /* tbl2.update({'foo':{'bar':2}}) */ - suite.T().Log("About to run line #147: table_test_mutation_update2.Update(map[interface{}]interface{}{'foo': map[interface{}]interface{}{'bar': 2, }, })") + suite.T().Log("About to run line #147: tbl2.Update(map[interface{}]interface{}{'foo': map[interface{}]interface{}{'bar': 2, }, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_update2.Update(map[interface{}]interface{}{"foo": map[interface{}]interface{}{"bar": 2}}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.Update(map[interface{}]interface{}{"foo": map[interface{}]interface{}{"bar": 2}}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -498,11 +498,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #150 /* {'deleted':0.0,'replaced':0,'unchanged':100,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0, "unchanged": 100, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update2.update({'foo':r.literal({'bar':2})}) */ + /* tbl2.update({'foo':r.literal({'bar':2})}) */ - suite.T().Log("About to run line #150: table_test_mutation_update2.Update(map[interface{}]interface{}{'foo': r.Literal(map[interface{}]interface{}{'bar': 2, }), })") + suite.T().Log("About to run line #150: tbl2.Update(map[interface{}]interface{}{'foo': r.Literal(map[interface{}]interface{}{'bar': 2, }), })") - runAndAssert(suite.Suite, expected_, table_test_mutation_update2.Update(map[interface{}]interface{}{"foo": r.Literal(map[interface{}]interface{}{"bar": 2})}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.Update(map[interface{}]interface{}{"foo": r.Literal(map[interface{}]interface{}{"bar": 2})}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -513,11 +513,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #156 /* {'id':0,'foo':{'bar':2}} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 0, "foo": map[interface{}]interface{}{"bar": 2}} - /* table_test_mutation_update2.order_by('id').nth(0) */ + /* tbl2.order_by('id').nth(0) */ - suite.T().Log("About to run line #156: table_test_mutation_update2.OrderBy('id').Nth(0)") + suite.T().Log("About to run line #156: tbl2.OrderBy('id').Nth(0)") - runAndAssert(suite.Suite, expected_, table_test_mutation_update2.OrderBy("id").Nth(0), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.OrderBy("id").Nth(0), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -528,11 +528,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #159 /* {'deleted':0.0,'replaced':100,'unchanged':0,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 100, "unchanged": 0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update2.update({'foo':{'buzz':2}}) */ + /* tbl2.update({'foo':{'buzz':2}}) */ - suite.T().Log("About to run line #159: table_test_mutation_update2.Update(map[interface{}]interface{}{'foo': map[interface{}]interface{}{'buzz': 2, }, })") + suite.T().Log("About to run line #159: tbl2.Update(map[interface{}]interface{}{'foo': map[interface{}]interface{}{'buzz': 2, }, })") - runAndAssert(suite.Suite, expected_, table_test_mutation_update2.Update(map[interface{}]interface{}{"foo": map[interface{}]interface{}{"buzz": 2}}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.Update(map[interface{}]interface{}{"foo": map[interface{}]interface{}{"buzz": 2}}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -543,11 +543,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #162 /* {'id':0,'foo':{'bar':2,'buzz':2}} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 0, "foo": map[interface{}]interface{}{"bar": 2, "buzz": 2}} - /* table_test_mutation_update2.order_by('id').nth(0) */ + /* tbl2.order_by('id').nth(0) */ - suite.T().Log("About to run line #162: table_test_mutation_update2.OrderBy('id').Nth(0)") + suite.T().Log("About to run line #162: tbl2.OrderBy('id').Nth(0)") - runAndAssert(suite.Suite, expected_, table_test_mutation_update2.OrderBy("id").Nth(0), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.OrderBy("id").Nth(0), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -558,11 +558,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #165 /* {'deleted':0.0,'replaced':100,'unchanged':0,'errors':0.0,'skipped':0.0,'inserted':0.0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 100, "unchanged": 0, "errors": 0.0, "skipped": 0.0, "inserted": 0.0} - /* table_test_mutation_update2.update({'foo':r.literal(1)}) */ + /* tbl2.update({'foo':r.literal(1)}) */ - suite.T().Log("About to run line #165: table_test_mutation_update2.Update(map[interface{}]interface{}{'foo': r.Literal(1), })") + suite.T().Log("About to run line #165: tbl2.Update(map[interface{}]interface{}{'foo': r.Literal(1), })") - runAndAssert(suite.Suite, expected_, table_test_mutation_update2.Update(map[interface{}]interface{}{"foo": r.Literal(1)}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.Update(map[interface{}]interface{}{"foo": r.Literal(1)}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -573,11 +573,11 @@ func (suite *MutationUpdateSuite) TestCases() { // mutation/update.yaml line #168 /* {'id':0,'foo':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 0, "foo": 1} - /* table_test_mutation_update2.order_by('id').nth(0) */ + /* tbl2.order_by('id').nth(0) */ - suite.T().Log("About to run line #168: table_test_mutation_update2.OrderBy('id').Nth(0)") + suite.T().Log("About to run line #168: tbl2.OrderBy('id').Nth(0)") - runAndAssert(suite.Suite, expected_, table_test_mutation_update2.OrderBy("id").Nth(0), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.OrderBy("id").Nth(0), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_polymorphism_test.go b/internal/integration/reql_tests/reql_polymorphism_test.go index 213516a0..2387563c 100644 --- a/internal/integration/reql_tests/reql_polymorphism_test.go +++ b/internal/integration/reql_tests/reql_polymorphism_test.go @@ -36,16 +36,16 @@ func (suite *PolymorphismSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_poly").Exec(suite.session) - err = r.DBCreate("db_poly").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_poly").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_poly").TableDrop("table_test_poly").Exec(suite.session) - err = r.DB("db_poly").TableCreate("table_test_poly").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_poly").Table("table_test_poly").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -54,8 +54,8 @@ func (suite *PolymorphismSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_poly").TableDrop("table_test_poly").Exec(suite.session) - r.DBDrop("db_poly").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -64,8 +64,8 @@ func (suite *PolymorphismSuite) TearDownSuite() { func (suite *PolymorphismSuite) TestCases() { suite.T().Log("Running PolymorphismSuite: Tests that manipulation data in tables") - table_test_poly := r.DB("db_poly").Table("table_test_poly") - _ = table_test_poly // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors // polymorphism.yaml line #5 // obj = r.expr({'id':0,'a':0}) @@ -78,11 +78,11 @@ func (suite *PolymorphismSuite) TestCases() { // polymorphism.yaml line #7 /* ({'deleted':0,'replaced':0,'unchanged':0,'errors':0,'skipped':0,'inserted':3}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "replaced": 0, "unchanged": 0, "errors": 0, "skipped": 0, "inserted": 3} - /* table_test_poly.insert([{'id':i, 'a':i} for i in xrange(3)]) */ + /* tbl.insert([{'id':i, 'a':i} for i in xrange(3)]) */ - suite.T().Log("About to run line #7: table_test_poly.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 0; iterator_ < 3; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': i, 'a': i, })\n }\n return res\n}()))") + suite.T().Log("About to run line #7: tbl.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 0; iterator_ < 3; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': i, 'a': i, })\n }\n return res\n}()))") - runAndAssert(suite.Suite, expected_, table_test_poly.Insert((func() []interface{} { + runAndAssert(suite.Suite, expected_, tbl.Insert((func() []interface{} { res := []interface{}{} for iterator_ := 0; iterator_ < 3; iterator_++ { i := iterator_ @@ -100,11 +100,11 @@ func (suite *PolymorphismSuite) TestCases() { // polymorphism.yaml line #21 /* ({'id':0,'c':1,'a':0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 0, "c": 1, "a": 0} - /* table_test_poly.merge({'c':1}).nth(0) */ + /* tbl.merge({'c':1}).nth(0) */ - suite.T().Log("About to run line #21: table_test_poly.Merge(map[interface{}]interface{}{'c': 1, }).Nth(0)") + suite.T().Log("About to run line #21: tbl.Merge(map[interface{}]interface{}{'c': 1, }).Nth(0)") - runAndAssert(suite.Suite, expected_, table_test_poly.Merge(map[interface{}]interface{}{"c": 1}).Nth(0), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Merge(map[interface{}]interface{}{"c": 1}).Nth(0), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -130,11 +130,11 @@ func (suite *PolymorphismSuite) TestCases() { // polymorphism.yaml line #26 /* ({'id':0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 0} - /* table_test_poly.without('a').nth(0) */ + /* tbl.without('a').nth(0) */ - suite.T().Log("About to run line #26: table_test_poly.Without('a').Nth(0)") + suite.T().Log("About to run line #26: tbl.Without('a').Nth(0)") - runAndAssert(suite.Suite, expected_, table_test_poly.Without("a").Nth(0), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Without("a").Nth(0), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -160,11 +160,11 @@ func (suite *PolymorphismSuite) TestCases() { // polymorphism.yaml line #31 /* ({'a':0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"a": 0} - /* table_test_poly.pluck('a').nth(0) */ + /* tbl.pluck('a').nth(0) */ - suite.T().Log("About to run line #31: table_test_poly.Pluck('a').Nth(0)") + suite.T().Log("About to run line #31: tbl.Pluck('a').Nth(0)") - runAndAssert(suite.Suite, expected_, table_test_poly.Pluck("a").Nth(0), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Pluck("a").Nth(0), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_random_test.go b/internal/integration/reql_tests/reql_random_test.go index d6f4e4d6..aaf2bb13 100644 --- a/internal/integration/reql_tests/reql_random_test.go +++ b/internal/integration/reql_tests/reql_random_test.go @@ -36,10 +36,10 @@ func (suite *RandomSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_rand").Exec(suite.session) - err = r.DBCreate("db_rand").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_rand").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *RandomSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_rand").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_range_test.go b/internal/integration/reql_tests/reql_range_test.go index fe1fc874..6528f1ca 100644 --- a/internal/integration/reql_tests/reql_range_test.go +++ b/internal/integration/reql_tests/reql_range_test.go @@ -36,10 +36,10 @@ func (suite *RangeSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_range").Exec(suite.session) - err = r.DBCreate("db_range").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_range").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *RangeSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_range").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_selection_test.go b/internal/integration/reql_tests/reql_selection_test.go index eab05435..6bb2449a 100644 --- a/internal/integration/reql_tests/reql_selection_test.go +++ b/internal/integration/reql_tests/reql_selection_test.go @@ -36,26 +36,26 @@ func (suite *SelectionSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_sele").Exec(suite.session) - err = r.DBCreate("db_sele").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_sele").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_sele").TableDrop("table_test_selection").Exec(suite.session) - err = r.DB("db_sele").TableCreate("table_test_selection").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_sele").Table("table_test_selection").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_sele").TableDrop("table_test_selection2").Exec(suite.session) - err = r.DB("db_sele").TableCreate("table_test_selection2").Exec(suite.session) + r.DB("test").TableDrop("tbl2").Exec(suite.session) + err = r.DB("test").TableCreate("tbl2").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_sele").Table("table_test_selection2").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl2").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_sele").TableDrop("table_test_selection3").Exec(suite.session) - err = r.DB("db_sele").TableCreate("table_test_selection3").Exec(suite.session) + r.DB("test").TableDrop("tbl3").Exec(suite.session) + err = r.DB("test").TableCreate("tbl3").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_sele").Table("table_test_selection3").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl3").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -64,10 +64,10 @@ func (suite *SelectionSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_sele").TableDrop("table_test_selection").Exec(suite.session) - r.DB("db_sele").TableDrop("table_test_selection2").Exec(suite.session) - r.DB("db_sele").TableDrop("table_test_selection3").Exec(suite.session) - r.DBDrop("db_sele").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DB("test").TableDrop("tbl2").Exec(suite.session) + r.DB("test").TableDrop("tbl3").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -76,29 +76,29 @@ func (suite *SelectionSuite) TearDownSuite() { func (suite *SelectionSuite) TestCases() { suite.T().Log("Running SelectionSuite: Tests that manipulation data in tables") - table_test_selection := r.DB("db_sele").Table("table_test_selection") - _ = table_test_selection // Prevent any noused variable errors - table_test_selection2 := r.DB("db_sele").Table("table_test_selection2") - _ = table_test_selection2 // Prevent any noused variable errors - table_test_selection3 := r.DB("db_sele").Table("table_test_selection3") - _ = table_test_selection3 // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors + tbl2 := r.DB("test").Table("tbl2") + _ = tbl2 // Prevent any noused variable errors + tbl3 := r.DB("test").Table("tbl3") + _ = tbl3 // Prevent any noused variable errors { // selection.yaml line #6 /* ({'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':100}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 100} - /* table_test_selection.insert([{'id':i, 'a':i%4} for i in xrange(100)]) */ + /* tbl.insert([{'id':i, 'a':i%4} for i in xrange(100)]) */ - suite.T().Log("About to run line #6: table_test_selection.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 0; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': i, 'a': r.Mod(i, 4), })\n }\n return res\n}()))") + suite.T().Log("About to run line #6: tbl.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 0; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': i, 'a': r.Mod(i, 4), })\n }\n return res\n}()))") - runAndAssert(suite.Suite, expected_, table_test_selection.Insert(func() []interface{} { + runAndAssert(suite.Suite, expected_, tbl.Insert((func() []interface{} { res := []interface{}{} for iterator_ := 0; iterator_ < 100; iterator_++ { i := iterator_ res = append(res, map[interface{}]interface{}{"id": i, "a": r.Mod(i, 4)}) } return res - }()), suite.session, r.RunOpts{ + }())), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -109,11 +109,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #18 /* ({'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':100}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 100} - /* table_test_selection2.insert([{'id':i, 'b':i%4} for i in xrange(100)]) */ + /* tbl2.insert([{'id':i, 'b':i%4} for i in xrange(100)]) */ - suite.T().Log("About to run line #18: table_test_selection2.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 0; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': i, 'b': r.Mod(i, 4), })\n }\n return res\n}()))") + suite.T().Log("About to run line #18: tbl2.Insert((func() []interface{} {\n res := []interface{}{}\n for iterator_ := 0; iterator_ < 100; iterator_++ {\n i := iterator_\n res = append(res, map[interface{}]interface{}{'id': i, 'b': r.Mod(i, 4), })\n }\n return res\n}()))") - runAndAssert(suite.Suite, expected_, table_test_selection2.Insert((func() []interface{} { + runAndAssert(suite.Suite, expected_, tbl2.Insert((func() []interface{} { res := []interface{}{} for iterator_ := 0; iterator_ < 100; iterator_++ { i := iterator_ @@ -131,11 +131,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #31 /* 'TABLE' */ var expected_ string = "TABLE" - /* table_test_selection.type_of() */ + /* tbl.type_of() */ - suite.T().Log("About to run line #31: table_test_selection.TypeOf()") + suite.T().Log("About to run line #31: tbl.TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_selection.TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -160,12 +160,12 @@ func (suite *SelectionSuite) TestCases() { { // selection.yaml line #39 /* err("ReqlOpFailedError", 'Table `test.missing` does not exist.', [0]) */ - var expected_ Err = err("ReqlOpFailedError", "Table `db_sele.missing` does not exist.") + var expected_ Err = err("ReqlOpFailedError", "Table `test.missing` does not exist.") /* r.db('test').table('missing') */ suite.T().Log("About to run line #39: r.DB('test').Table('missing')") - runAndAssert(suite.Suite, expected_, r.DB("db_sele").Table("missing"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB("test").Table("missing"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -176,11 +176,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #43 /* ({"errors":1,"inserted":0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"errors": 1, "inserted": 0} - /* table_test_selection.insert({"id":"\x00"}).pluck("errors","inserted") */ + /* tbl.insert({"id":"\x00"}).pluck("errors","inserted") */ - suite.T().Log("About to run line #43: table_test_selection.Insert(map[interface{}]interface{}{'id': '\\u0000', }).Pluck('errors', 'inserted')") + suite.T().Log("About to run line #43: tbl.Insert(map[interface{}]interface{}{'id': '\\u0000', }).Pluck('errors', 'inserted')") - runAndAssert(suite.Suite, expected_, table_test_selection.Insert(map[interface{}]interface{}{"id": "\u0000"}).Pluck("errors", "inserted"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": "\u0000"}).Pluck("errors", "inserted"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -191,11 +191,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #46 /* ({"errors":1,"inserted":0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"errors": 1, "inserted": 0} - /* table_test_selection.insert({"id":["embedded",["null\x00"]]}).pluck("errors","inserted") */ + /* tbl.insert({"id":["embedded",["null\x00"]]}).pluck("errors","inserted") */ - suite.T().Log("About to run line #46: table_test_selection.Insert(map[interface{}]interface{}{'id': []interface{}{'embedded', []interface{}{'null\\u0000'}}, }).Pluck('errors', 'inserted')") + suite.T().Log("About to run line #46: tbl.Insert(map[interface{}]interface{}{'id': []interface{}{'embedded', []interface{}{'null\\u0000'}}, }).Pluck('errors', 'inserted')") - runAndAssert(suite.Suite, expected_, table_test_selection.Insert(map[interface{}]interface{}{"id": []interface{}{"embedded", []interface{}{"null\u0000"}}}).Pluck("errors", "inserted"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": []interface{}{"embedded", []interface{}{"null\u0000"}}}).Pluck("errors", "inserted"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -206,11 +206,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #51 /* ({'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':1}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 1} - /* table_test_selection3.insert({'id':u'Здравствуй','value':u'Земля!'}) */ + /* tbl3.insert({'id':u'Здравствуй','value':u'Земля!'}) */ - suite.T().Log("About to run line #51: table_test_selection3.Insert(map[interface{}]interface{}{'id': 'Здравствуй', 'value': 'Земля!', })") + suite.T().Log("About to run line #51: tbl3.Insert(map[interface{}]interface{}{'id': 'Здравствуй', 'value': 'Земля!', })") - runAndAssert(suite.Suite, expected_, table_test_selection3.Insert(map[interface{}]interface{}{"id": "Здравствуй", "value": "Земля!"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl3.Insert(map[interface{}]interface{}{"id": "Здравствуй", "value": "Земля!"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -221,11 +221,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #60 /* {u'id':u'Здравствуй',u'value':u'Земля!'} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": "Здравствуй", "value": "Земля!"} - /* table_test_selection3.get('Здравствуй') */ + /* tbl3.get('Здравствуй') */ - suite.T().Log("About to run line #60: table_test_selection3.Get('Здравствуй')") + suite.T().Log("About to run line #60: tbl3.Get('Здравствуй')") - runAndAssert(suite.Suite, expected_, table_test_selection3.Get("Здравствуй"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl3.Get("Здравствуй"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -236,11 +236,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #73 /* [{u'id':u'Здравствуй',u'value':u'Земля!'}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"id": "Здравствуй", "value": "Земля!"}} - /* table_test_selection3.filter({'value':'Земля!'}) */ + /* tbl3.filter({'value':'Земля!'}) */ - suite.T().Log("About to run line #73: table_test_selection3.Filter(map[interface{}]interface{}{'value': 'Земля!', })") + suite.T().Log("About to run line #73: tbl3.Filter(map[interface{}]interface{}{'value': 'Земля!', })") - runAndAssert(suite.Suite, expected_, table_test_selection3.Filter(map[interface{}]interface{}{"value": "Земля!"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl3.Filter(map[interface{}]interface{}{"value": "Земля!"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -249,7 +249,7 @@ func (suite *SelectionSuite) TestCases() { { // selection.yaml line #86 - /* err("ReqlQueryLogicError", 'Database name `%` invalid (Use A-Za-z0-9_ only).', [0]) */ + /* err("ReqlQueryLogicError", 'Database name `%` invalid (Use A-Z, a-z, 0-9, _ and - only).', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Database name `%` invalid (Use A-Z, a-z, 0-9, _ and - only).") /* r.db('%') */ @@ -264,13 +264,13 @@ func (suite *SelectionSuite) TestCases() { { // selection.yaml line #89 - /* err("ReqlQueryLogicError", 'Table name `%` invalid (Use A-Za-z0-9_ only).', [0]) */ + /* err("ReqlQueryLogicError", 'Table name `%` invalid (Use A-Z, a-z, 0-9, _ and - only).', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Table name `%` invalid (Use A-Z, a-z, 0-9, _ and - only).") /* r.db('test').table('%') */ suite.T().Log("About to run line #89: r.DB('test').Table('%')") - runAndAssert(suite.Suite, expected_, r.DB("db_sele").Table("%"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB("test").Table("%"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -281,11 +281,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #93 /* 100 */ var expected_ int = 100 - /* table_test_selection.count() */ + /* tbl.count() */ - suite.T().Log("About to run line #93: table_test_selection.Count()") + suite.T().Log("About to run line #93: tbl.Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -293,28 +293,28 @@ func (suite *SelectionSuite) TestCases() { } // selection.yaml line #97 - // table_test_selection2Name = table_test_selection2.info().get_field('name') - suite.T().Log("Possibly executing: var table_test_selection2Name r.Term = table_test_selection2.Info().Field('name')") + // tbl2Name = tbl2.info().get_field('name') + suite.T().Log("Possibly executing: var tbl2Name r.Term = tbl2.Info().Field('name')") - table_test_selection2Name := table_test_selection2.Info().Field("name") - _ = table_test_selection2Name // Prevent any noused variable errors + tbl2Name := tbl2.Info().Field("name") + _ = tbl2Name // Prevent any noused variable errors // selection.yaml line #98 - // table_test_selection2DbName = table_test_selection2.info().get_field('db').get_field('name') - suite.T().Log("Possibly executing: var table_test_selection2DbName r.Term = table_test_selection2.Info().Field('db').Field('name')") + // tbl2DbName = tbl2.info().get_field('db').get_field('name') + suite.T().Log("Possibly executing: var tbl2DbName r.Term = tbl2.Info().Field('db').Field('name')") - table_test_selection2DbName := table_test_selection2.Info().Field("db").Field("name") - _ = table_test_selection2DbName // Prevent any noused variable errors + tbl2DbName := tbl2.Info().Field("db").Field("name") + _ = tbl2DbName // Prevent any noused variable errors { // selection.yaml line #101 /* 100 */ var expected_ int = 100 - /* r.db(table_test_selection2DbName).table(table_test_selection2Name, read_mode='outdated').count() */ + /* r.db(tbl2DbName).table(tbl2Name, read_mode='outdated').count() */ - suite.T().Log("About to run line #101: r.DB(table_test_selection2DbName).Table(table_test_selection2Name).OptArgs(r.TableOpts{ReadMode: 'outdated', }).Count()") + suite.T().Log("About to run line #101: r.DB(tbl2DbName).Table(tbl2Name).OptArgs(r.TableOpts{ReadMode: 'outdated', }).Count()") - runAndAssert(suite.Suite, expected_, r.DB(table_test_selection2DbName).Table(table_test_selection2Name).OptArgs(r.TableOpts{ReadMode: "outdated"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB(tbl2DbName).Table(tbl2Name).OptArgs(r.TableOpts{ReadMode: "outdated"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -325,11 +325,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #102 /* 100 */ var expected_ int = 100 - /* r.db(table_test_selection2DbName).table(table_test_selection2Name, read_mode='single').count() */ + /* r.db(tbl2DbName).table(tbl2Name, read_mode='single').count() */ - suite.T().Log("About to run line #102: r.DB(table_test_selection2DbName).Table(table_test_selection2Name).OptArgs(r.TableOpts{ReadMode: 'single', }).Count()") + suite.T().Log("About to run line #102: r.DB(tbl2DbName).Table(tbl2Name).OptArgs(r.TableOpts{ReadMode: 'single', }).Count()") - runAndAssert(suite.Suite, expected_, r.DB(table_test_selection2DbName).Table(table_test_selection2Name).OptArgs(r.TableOpts{ReadMode: "single"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB(tbl2DbName).Table(tbl2Name).OptArgs(r.TableOpts{ReadMode: "single"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -340,11 +340,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #103 /* 100 */ var expected_ int = 100 - /* r.db(table_test_selection2DbName).table(table_test_selection2Name, read_mode='majority').count() */ + /* r.db(tbl2DbName).table(tbl2Name, read_mode='majority').count() */ - suite.T().Log("About to run line #103: r.DB(table_test_selection2DbName).Table(table_test_selection2Name).OptArgs(r.TableOpts{ReadMode: 'majority', }).Count()") + suite.T().Log("About to run line #103: r.DB(tbl2DbName).Table(tbl2Name).OptArgs(r.TableOpts{ReadMode: 'majority', }).Count()") - runAndAssert(suite.Suite, expected_, r.DB(table_test_selection2DbName).Table(table_test_selection2Name).OptArgs(r.TableOpts{ReadMode: "majority"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB(tbl2DbName).Table(tbl2Name).OptArgs(r.TableOpts{ReadMode: "majority"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -355,11 +355,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #120 /* err("ReqlQueryLogicError", 'Expected type STRING but found BOOL.') */ var expected_ Err = err("ReqlQueryLogicError", "Expected type STRING but found BOOL.") - /* r.db(table_test_selection2DbName).table(table_test_selection2Name, read_mode=true).count() */ + /* r.db(tbl2DbName).table(tbl2Name, read_mode=true).count() */ - suite.T().Log("About to run line #120: r.DB(table_test_selection2DbName).Table(table_test_selection2Name).OptArgs(r.TableOpts{ReadMode: true, }).Count()") + suite.T().Log("About to run line #120: r.DB(tbl2DbName).Table(tbl2Name).OptArgs(r.TableOpts{ReadMode: true, }).Count()") - runAndAssert(suite.Suite, expected_, r.DB(table_test_selection2DbName).Table(table_test_selection2Name).OptArgs(r.TableOpts{ReadMode: true}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB(tbl2DbName).Table(tbl2Name).OptArgs(r.TableOpts{ReadMode: true}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -370,11 +370,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #125 /* err("ReqlQueryLogicError", 'Read mode `fake` unrecognized (options are "majority", "single", and "outdated").') */ var expected_ Err = err("ReqlQueryLogicError", "Read mode `fake` unrecognized (options are \"majority\", \"single\", and \"outdated\").") - /* r.db(table_test_selection2DbName).table(table_test_selection2Name, read_mode='fake').count() */ + /* r.db(tbl2DbName).table(tbl2Name, read_mode='fake').count() */ - suite.T().Log("About to run line #125: r.DB(table_test_selection2DbName).Table(table_test_selection2Name).OptArgs(r.TableOpts{ReadMode: 'fake', }).Count()") + suite.T().Log("About to run line #125: r.DB(tbl2DbName).Table(tbl2Name).OptArgs(r.TableOpts{ReadMode: 'fake', }).Count()") - runAndAssert(suite.Suite, expected_, r.DB(table_test_selection2DbName).Table(table_test_selection2Name).OptArgs(r.TableOpts{ReadMode: "fake"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB(tbl2DbName).Table(tbl2Name).OptArgs(r.TableOpts{ReadMode: "fake"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -385,11 +385,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #130 /* 2 */ var expected_ int = 2 - /* table_test_selection.get(20).count() */ + /* tbl.get(20).count() */ - suite.T().Log("About to run line #130: table_test_selection.Get(20).Count()") + suite.T().Log("About to run line #130: tbl.Get(20).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Get(20).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(20).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -400,11 +400,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #134 /* {'id':20,'a':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"id": 20, "a": 0} - /* table_test_selection.get(20) */ + /* tbl.get(20) */ - suite.T().Log("About to run line #134: table_test_selection.Get(20)") + suite.T().Log("About to run line #134: tbl.Get(20)") - runAndAssert(suite.Suite, expected_, table_test_selection.Get(20), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(20), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -415,11 +415,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #138 /* null */ var expected_ interface{} = nil - /* table_test_selection.get(2000) */ + /* tbl.get(2000) */ - suite.T().Log("About to run line #138: table_test_selection.Get(2000)") + suite.T().Log("About to run line #138: tbl.Get(2000)") - runAndAssert(suite.Suite, expected_, table_test_selection.Get(2000), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(2000), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -427,21 +427,21 @@ func (suite *SelectionSuite) TestCases() { } // selection.yaml line #153 - // table_test_selectionpkey = r.db('test').table('testpkey_selection') - suite.T().Log("Possibly executing: var table_test_selectionpkey r.Term = r.DB('test').Table('testpkey_selection')") + // tblpkey = r.db('test').table('testpkey') + suite.T().Log("Possibly executing: var tblpkey r.Term = r.DB('test').Table('testpkey')") - table_test_selectionpkey := r.DB("db_sele").Table("testpkey_selection") - _ = table_test_selectionpkey // Prevent any noused variable errors + tblpkey := r.DB("test").Table("testpkey") + _ = tblpkey // Prevent any noused variable errors { // selection.yaml line #149 /* partial({'tables_created':1}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"tables_created": 1}) - /* r.db('test').table_create('testpkey_selection', primary_key='foo') */ + /* r.db('test').table_create('testpkey', primary_key='foo') */ - suite.T().Log("About to run line #149: r.DB('test').TableCreate('testpkey_selection').OptArgs(r.TableCreateOpts{PrimaryKey: 'foo', })") + suite.T().Log("About to run line #149: r.DB('test').TableCreate('testpkey').OptArgs(r.TableCreateOpts{PrimaryKey: 'foo', })") - runAndAssert(suite.Suite, expected_, r.DB("db_sele").TableCreate("testpkey_selection").OptArgs(r.TableCreateOpts{PrimaryKey: "foo"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.DB("test").TableCreate("testpkey").OptArgs(r.TableCreateOpts{PrimaryKey: "foo"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -452,11 +452,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #155 /* {'deleted':0.0,'replaced':0.0,'unchanged':0.0,'errors':0.0,'skipped':0.0,'inserted':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0.0, "replaced": 0.0, "unchanged": 0.0, "errors": 0.0, "skipped": 0.0, "inserted": 1} - /* table_test_selectionpkey.insert({'foo':10,'a':10}) */ + /* tblpkey.insert({'foo':10,'a':10}) */ - suite.T().Log("About to run line #155: table_test_selectionpkey.Insert(map[interface{}]interface{}{'foo': 10, 'a': 10, })") + suite.T().Log("About to run line #155: tblpkey.Insert(map[interface{}]interface{}{'foo': 10, 'a': 10, })") - runAndAssert(suite.Suite, expected_, table_test_selectionpkey.Insert(map[interface{}]interface{}{"foo": 10, "a": 10}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tblpkey.Insert(map[interface{}]interface{}{"foo": 10, "a": 10}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -467,11 +467,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #159 /* {'foo':10,'a':10} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"foo": 10, "a": 10} - /* table_test_selectionpkey.get(10) */ + /* tblpkey.get(10) */ - suite.T().Log("About to run line #159: table_test_selectionpkey.Get(10)") + suite.T().Log("About to run line #159: tblpkey.Get(10)") - runAndAssert(suite.Suite, expected_, table_test_selectionpkey.Get(10), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tblpkey.Get(10), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -482,11 +482,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #163 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_selection.get_all() */ + /* tbl.get_all() */ - suite.T().Log("About to run line #163: table_test_selection.GetAll()") + suite.T().Log("About to run line #163: tbl.GetAll()") - runAndAssert(suite.Suite, expected_, table_test_selection.GetAll(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -497,11 +497,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #165 /* [{"id":20,"a":0}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"id": 20, "a": 0}} - /* table_test_selection.get_all(20) */ + /* tbl.get_all(20) */ - suite.T().Log("About to run line #165: table_test_selection.GetAll(20)") + suite.T().Log("About to run line #165: tbl.GetAll(20)") - runAndAssert(suite.Suite, expected_, table_test_selection.GetAll(20), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(20), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -512,11 +512,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #167 /* "SELECTION" */ var expected_ string = "SELECTION" - /* table_test_selection.get_all().type_of() */ + /* tbl.get_all().type_of() */ - suite.T().Log("About to run line #167: table_test_selection.GetAll().TypeOf()") + suite.T().Log("About to run line #167: tbl.GetAll().TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_selection.GetAll().TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll().TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -527,11 +527,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #169 /* "SELECTION" */ var expected_ string = "SELECTION" - /* table_test_selection.get_all(20).type_of() */ + /* tbl.get_all(20).type_of() */ - suite.T().Log("About to run line #169: table_test_selection.GetAll(20).TypeOf()") + suite.T().Log("About to run line #169: tbl.GetAll(20).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_selection.GetAll(20).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(20).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -542,11 +542,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #173 /* 'TABLE_SLICE' */ var expected_ string = "TABLE_SLICE" - /* table_test_selection.between(2, 1).type_of() */ + /* tbl.between(2, 1).type_of() */ - suite.T().Log("About to run line #173: table_test_selection.Between(2, 1).TypeOf()") + suite.T().Log("About to run line #173: tbl.Between(2, 1).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(2, 1).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(2, 1).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -557,11 +557,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #175 /* 'TABLE_SLICE' */ var expected_ string = "TABLE_SLICE" - /* table_test_selection.between(1, 2).type_of() */ + /* tbl.between(1, 2).type_of() */ - suite.T().Log("About to run line #175: table_test_selection.Between(1, 2).TypeOf()") + suite.T().Log("About to run line #175: tbl.Between(1, 2).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(1, 2).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(1, 2).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -572,11 +572,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #177 /* 'TABLE_SLICE' */ var expected_ string = "TABLE_SLICE" - /* table_test_selection.between(1, 2, index='id').type_of() */ + /* tbl.between(1, 2, index='id').type_of() */ - suite.T().Log("About to run line #177: table_test_selection.Between(1, 2).OptArgs(r.BetweenOpts{Index: 'id', }).TypeOf()") + suite.T().Log("About to run line #177: tbl.Between(1, 2).OptArgs(r.BetweenOpts{Index: 'id', }).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(1, 2).OptArgs(r.BetweenOpts{Index: "id"}).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(1, 2).OptArgs(r.BetweenOpts{Index: "id"}).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -587,11 +587,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #181 /* 'TABLE_SLICE' */ var expected_ string = "TABLE_SLICE" - /* table_test_selection.between(1, 1, right_bound='closed').type_of() */ + /* tbl.between(1, 1, right_bound='closed').type_of() */ - suite.T().Log("About to run line #181: table_test_selection.Between(1, 1).OptArgs(r.BetweenOpts{RightBound: 'closed', }).TypeOf()") + suite.T().Log("About to run line #181: tbl.Between(1, 1).OptArgs(r.BetweenOpts{RightBound: 'closed', }).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(1, 1).OptArgs(r.BetweenOpts{RightBound: "closed"}).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(1, 1).OptArgs(r.BetweenOpts{RightBound: "closed"}).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -602,11 +602,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #185 /* 'TABLE_SLICE' */ var expected_ string = "TABLE_SLICE" - /* table_test_selection.between(2, 1).type_of() */ + /* tbl.between(2, 1).type_of() */ - suite.T().Log("About to run line #185: table_test_selection.Between(2, 1).TypeOf()") + suite.T().Log("About to run line #185: tbl.Between(2, 1).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(2, 1).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(2, 1).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -617,11 +617,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #187 /* 'TABLE_SLICE' */ var expected_ string = "TABLE_SLICE" - /* table_test_selection.between(2, 1, index='id').type_of() */ + /* tbl.between(2, 1, index='id').type_of() */ - suite.T().Log("About to run line #187: table_test_selection.Between(2, 1).OptArgs(r.BetweenOpts{Index: 'id', }).TypeOf()") + suite.T().Log("About to run line #187: tbl.Between(2, 1).OptArgs(r.BetweenOpts{Index: 'id', }).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(2, 1).OptArgs(r.BetweenOpts{Index: "id"}).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(2, 1).OptArgs(r.BetweenOpts{Index: "id"}).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -632,11 +632,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #192 /* 0 */ var expected_ int = 0 - /* table_test_selection.between(21, 20).count() */ + /* tbl.between(21, 20).count() */ - suite.T().Log("About to run line #192: table_test_selection.Between(21, 20).Count()") + suite.T().Log("About to run line #192: tbl.Between(21, 20).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(21, 20).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(21, 20).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -647,11 +647,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #194 /* 9 */ var expected_ int = 9 - /* table_test_selection.between(20, 29).count() */ + /* tbl.between(20, 29).count() */ - suite.T().Log("About to run line #194: table_test_selection.Between(20, 29).Count()") + suite.T().Log("About to run line #194: tbl.Between(20, 29).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(20, 29).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(20, 29).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -662,11 +662,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #196 /* 9 */ var expected_ int = 9 - /* table_test_selection.between(-10, 9).count() */ + /* tbl.between(-10, 9).count() */ - suite.T().Log("About to run line #196: table_test_selection.Between(-10, 9).Count()") + suite.T().Log("About to run line #196: tbl.Between(-10, 9).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(-10, 9).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-10, 9).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -677,11 +677,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #198 /* 20 */ var expected_ int = 20 - /* table_test_selection.between(80, 2000).count() */ + /* tbl.between(80, 2000).count() */ - suite.T().Log("About to run line #198: table_test_selection.Between(80, 2000).Count()") + suite.T().Log("About to run line #198: tbl.Between(80, 2000).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(80, 2000).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(80, 2000).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -692,11 +692,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #200 /* 100 */ var expected_ int = 100 - /* table_test_selection.between(-2000, 2000).count() */ + /* tbl.between(-2000, 2000).count() */ - suite.T().Log("About to run line #200: table_test_selection.Between(-2000, 2000).Count()") + suite.T().Log("About to run line #200: tbl.Between(-2000, 2000).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(-2000, 2000).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-2000, 2000).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -707,11 +707,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #205 /* 10 */ var expected_ int = 10 - /* table_test_selection.between(20, 29, right_bound='closed').count() */ + /* tbl.between(20, 29, right_bound='closed').count() */ - suite.T().Log("About to run line #205: table_test_selection.Between(20, 29).OptArgs(r.BetweenOpts{RightBound: 'closed', }).Count()") + suite.T().Log("About to run line #205: tbl.Between(20, 29).OptArgs(r.BetweenOpts{RightBound: 'closed', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(20, 29).OptArgs(r.BetweenOpts{RightBound: "closed"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(20, 29).OptArgs(r.BetweenOpts{RightBound: "closed"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -722,11 +722,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #209 /* 10 */ var expected_ int = 10 - /* table_test_selection.between(-10, 9, right_bound='closed').count() */ + /* tbl.between(-10, 9, right_bound='closed').count() */ - suite.T().Log("About to run line #209: table_test_selection.Between(-10, 9).OptArgs(r.BetweenOpts{RightBound: 'closed', }).Count()") + suite.T().Log("About to run line #209: tbl.Between(-10, 9).OptArgs(r.BetweenOpts{RightBound: 'closed', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(-10, 9).OptArgs(r.BetweenOpts{RightBound: "closed"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-10, 9).OptArgs(r.BetweenOpts{RightBound: "closed"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -737,11 +737,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #213 /* 20 */ var expected_ int = 20 - /* table_test_selection.between(80, 2000, right_bound='closed').count() */ + /* tbl.between(80, 2000, right_bound='closed').count() */ - suite.T().Log("About to run line #213: table_test_selection.Between(80, 2000).OptArgs(r.BetweenOpts{RightBound: 'closed', }).Count()") + suite.T().Log("About to run line #213: tbl.Between(80, 2000).OptArgs(r.BetweenOpts{RightBound: 'closed', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(80, 2000).OptArgs(r.BetweenOpts{RightBound: "closed"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(80, 2000).OptArgs(r.BetweenOpts{RightBound: "closed"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -752,11 +752,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #217 /* 100 */ var expected_ int = 100 - /* table_test_selection.between(-2000, 2000, right_bound='closed').count() */ + /* tbl.between(-2000, 2000, right_bound='closed').count() */ - suite.T().Log("About to run line #217: table_test_selection.Between(-2000, 2000).OptArgs(r.BetweenOpts{RightBound: 'closed', }).Count()") + suite.T().Log("About to run line #217: tbl.Between(-2000, 2000).OptArgs(r.BetweenOpts{RightBound: 'closed', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(-2000, 2000).OptArgs(r.BetweenOpts{RightBound: "closed"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-2000, 2000).OptArgs(r.BetweenOpts{RightBound: "closed"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -767,11 +767,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #223 /* 8 */ var expected_ int = 8 - /* table_test_selection.between(20, 29, left_bound='open').count() */ + /* tbl.between(20, 29, left_bound='open').count() */ - suite.T().Log("About to run line #223: table_test_selection.Between(20, 29).OptArgs(r.BetweenOpts{LeftBound: 'open', }).Count()") + suite.T().Log("About to run line #223: tbl.Between(20, 29).OptArgs(r.BetweenOpts{LeftBound: 'open', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(20, 29).OptArgs(r.BetweenOpts{LeftBound: "open"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(20, 29).OptArgs(r.BetweenOpts{LeftBound: "open"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -782,11 +782,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #227 /* 9 */ var expected_ int = 9 - /* table_test_selection.between(-10, 9, left_bound='open').count() */ + /* tbl.between(-10, 9, left_bound='open').count() */ - suite.T().Log("About to run line #227: table_test_selection.Between(-10, 9).OptArgs(r.BetweenOpts{LeftBound: 'open', }).Count()") + suite.T().Log("About to run line #227: tbl.Between(-10, 9).OptArgs(r.BetweenOpts{LeftBound: 'open', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(-10, 9).OptArgs(r.BetweenOpts{LeftBound: "open"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-10, 9).OptArgs(r.BetweenOpts{LeftBound: "open"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -797,11 +797,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #231 /* 19 */ var expected_ int = 19 - /* table_test_selection.between(80, 2000, left_bound='open').count() */ + /* tbl.between(80, 2000, left_bound='open').count() */ - suite.T().Log("About to run line #231: table_test_selection.Between(80, 2000).OptArgs(r.BetweenOpts{LeftBound: 'open', }).Count()") + suite.T().Log("About to run line #231: tbl.Between(80, 2000).OptArgs(r.BetweenOpts{LeftBound: 'open', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(80, 2000).OptArgs(r.BetweenOpts{LeftBound: "open"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(80, 2000).OptArgs(r.BetweenOpts{LeftBound: "open"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -812,11 +812,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #235 /* 100 */ var expected_ int = 100 - /* table_test_selection.between(-2000, 2000, left_bound='open').count() */ + /* tbl.between(-2000, 2000, left_bound='open').count() */ - suite.T().Log("About to run line #235: table_test_selection.Between(-2000, 2000).OptArgs(r.BetweenOpts{LeftBound: 'open', }).Count()") + suite.T().Log("About to run line #235: tbl.Between(-2000, 2000).OptArgs(r.BetweenOpts{LeftBound: 'open', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(-2000, 2000).OptArgs(r.BetweenOpts{LeftBound: "open"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-2000, 2000).OptArgs(r.BetweenOpts{LeftBound: "open"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -842,11 +842,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #244 /* 2 */ var expected_ int = 2 - /* table_test_selection.between(r.minval, 2).count() */ + /* tbl.between(r.minval, 2).count() */ - suite.T().Log("About to run line #244: table_test_selection.Between(r.MinVal, 2).Count()") + suite.T().Log("About to run line #244: tbl.Between(r.MinVal, 2).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(r.MinVal, 2).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, 2).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -857,11 +857,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #247 /* 3 */ var expected_ int = 3 - /* table_test_selection.between(r.minval, 2, right_bound='closed').count() */ + /* tbl.between(r.minval, 2, right_bound='closed').count() */ - suite.T().Log("About to run line #247: table_test_selection.Between(r.MinVal, 2).OptArgs(r.BetweenOpts{RightBound: 'closed', }).Count()") + suite.T().Log("About to run line #247: tbl.Between(r.MinVal, 2).OptArgs(r.BetweenOpts{RightBound: 'closed', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(r.MinVal, 2).OptArgs(r.BetweenOpts{RightBound: "closed"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, 2).OptArgs(r.BetweenOpts{RightBound: "closed"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -872,11 +872,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #251 /* 2 */ var expected_ int = 2 - /* table_test_selection.between(r.minval, 2, left_bound='open').count() */ + /* tbl.between(r.minval, 2, left_bound='open').count() */ - suite.T().Log("About to run line #251: table_test_selection.Between(r.MinVal, 2).OptArgs(r.BetweenOpts{LeftBound: 'open', }).Count()") + suite.T().Log("About to run line #251: tbl.Between(r.MinVal, 2).OptArgs(r.BetweenOpts{LeftBound: 'open', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(r.MinVal, 2).OptArgs(r.BetweenOpts{LeftBound: "open"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, 2).OptArgs(r.BetweenOpts{LeftBound: "open"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -887,11 +887,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #255 /* 98 */ var expected_ int = 98 - /* table_test_selection.between(2, r.maxval).count() */ + /* tbl.between(2, r.maxval).count() */ - suite.T().Log("About to run line #255: table_test_selection.Between(2, r.MaxVal).Count()") + suite.T().Log("About to run line #255: tbl.Between(2, r.MaxVal).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(2, r.MaxVal).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(2, r.MaxVal).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -902,11 +902,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #265 /* err('ReqlQueryLogicError', 'Cannot use `nu' + 'll` in BETWEEN, use `r.minval` or `r.maxval` to denote unboundedness.') */ var expected_ Err = err("ReqlQueryLogicError", "Cannot use `nu"+"ll` in BETWEEN, use `r.minval` or `r.maxval` to denote unboundedness.") - /* table_test_selection.between(null, 2).count() */ + /* tbl.between(null, 2).count() */ - suite.T().Log("About to run line #265: table_test_selection.Between(nil, 2).Count()") + suite.T().Log("About to run line #265: tbl.Between(nil, 2).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(nil, 2).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(nil, 2).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -917,11 +917,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #266 /* err('ReqlQueryLogicError', 'Cannot use `nu' + 'll` in BETWEEN, use `r.minval` or `r.maxval` to denote unboundedness.') */ var expected_ Err = err("ReqlQueryLogicError", "Cannot use `nu"+"ll` in BETWEEN, use `r.minval` or `r.maxval` to denote unboundedness.") - /* table_test_selection.between(2, null).count() */ + /* tbl.between(2, null).count() */ - suite.T().Log("About to run line #266: table_test_selection.Between(2, nil).Count()") + suite.T().Log("About to run line #266: tbl.Between(2, nil).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(2, nil).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(2, nil).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -932,11 +932,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #267 /* err('ReqlQueryLogicError', 'Cannot use `nu' + 'll` in BETWEEN, use `r.minval` or `r.maxval` to denote unboundedness.') */ var expected_ Err = err("ReqlQueryLogicError", "Cannot use `nu"+"ll` in BETWEEN, use `r.minval` or `r.maxval` to denote unboundedness.") - /* table_test_selection.between(null, null).count() */ + /* tbl.between(null, null).count() */ - suite.T().Log("About to run line #267: table_test_selection.Between(nil, nil).Count()") + suite.T().Log("About to run line #267: tbl.Between(nil, nil).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Between(nil, nil).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(nil, nil).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -947,11 +947,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #271 /* 1 */ var expected_ int = 1 - /* table_test_selectionpkey.between(9, 11).count() */ + /* tblpkey.between(9, 11).count() */ - suite.T().Log("About to run line #271: table_test_selectionpkey.Between(9, 11).Count()") + suite.T().Log("About to run line #271: tblpkey.Between(9, 11).Count()") - runAndAssert(suite.Suite, expected_, table_test_selectionpkey.Between(9, 11).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tblpkey.Between(9, 11).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -962,11 +962,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #274 /* 0 */ var expected_ int = 0 - /* table_test_selectionpkey.between(11, 12).count() */ + /* tblpkey.between(11, 12).count() */ - suite.T().Log("About to run line #274: table_test_selectionpkey.Between(11, 12).Count()") + suite.T().Log("About to run line #274: tblpkey.Between(11, 12).Count()") - runAndAssert(suite.Suite, expected_, table_test_selectionpkey.Between(11, 12).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tblpkey.Between(11, 12).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -977,11 +977,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #278 /* 25 */ var expected_ int = 25 - /* table_test_selection.filter(lambda row:row['a'] > 2).count() */ + /* tbl.filter(lambda row:row['a'] > 2).count() */ - suite.T().Log("About to run line #278: table_test_selection.Filter(func(row r.Term) interface{} { return row.AtIndex('a').Gt(2)}).Count()") + suite.T().Log("About to run line #278: tbl.Filter(func(row r.Term) interface{} { return row.AtIndex('a').Gt(2)}).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Filter(func(row r.Term) interface{} { return row.AtIndex("a").Gt(2) }).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(func(row r.Term) interface{} { return row.AtIndex("a").Gt(2) }).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -992,11 +992,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #284 /* 100 */ var expected_ int = 100 - /* table_test_selection.filter(lambda row: 1).count() */ + /* tbl.filter(lambda row: 1).count() */ - suite.T().Log("About to run line #284: table_test_selection.Filter(func(row r.Term) interface{} { return 1}).Count()") + suite.T().Log("About to run line #284: tbl.Filter(func(row r.Term) interface{} { return 1}).Count()") - runAndAssert(suite.Suite, expected_, table_test_selection.Filter(func(row r.Term) interface{} { return 1 }).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(func(row r.Term) interface{} { return 1 }).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1151,11 +1151,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #335 /* 25 */ var expected_ int = 25 - /* table_test_selection.count(lambda row: {'a':1}) */ + /* tbl.count(lambda row: {'a':1}) */ - suite.T().Log("About to run line #335: table_test_selection.Count(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': 1, }})") + suite.T().Log("About to run line #335: tbl.Count(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': 1, }})") - runAndAssert(suite.Suite, expected_, table_test_selection.Count(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": 1} }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Count(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": 1} }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1196,11 +1196,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #348 /* err('ReqlQueryLogicError', 'Expected type DATUM but found TABLE:', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Expected type DATUM but found TABLE:") - /* r.expr(5) + table_test_selection */ + /* r.expr(5) + tbl */ - suite.T().Log("About to run line #348: r.Expr(5).Add(table_test_selection)") + suite.T().Log("About to run line #348: r.Expr(5).Add(tbl)") - runAndAssert(suite.Suite, expected_, r.Expr(5).Add(table_test_selection), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.Expr(5).Add(tbl), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1211,11 +1211,11 @@ func (suite *SelectionSuite) TestCases() { // selection.yaml line #353 /* "SELECTION" */ var expected_ string = "SELECTION" - /* table_test_selection.has_fields('field').type_of() */ + /* tbl.has_fields('field').type_of() */ - suite.T().Log("About to run line #353: table_test_selection.HasFields('field').TypeOf()") + suite.T().Log("About to run line #353: tbl.HasFields('field').TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_selection.HasFields("field").TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.HasFields("field").TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_sindex_api_test.go b/internal/integration/reql_tests/reql_sindex_api_test.go index 8761cbcc..1f932ef1 100644 --- a/internal/integration/reql_tests/reql_sindex_api_test.go +++ b/internal/integration/reql_tests/reql_sindex_api_test.go @@ -36,16 +36,16 @@ func (suite *SindexApiSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_sindex_api").Exec(suite.session) - err = r.DBCreate("db_sindex_api").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_sindex_api").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_sindex_api").TableDrop("table_test_sindex_api").Exec(suite.session) - err = r.DB("db_sindex_api").TableCreate("table_test_sindex_api").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_sindex_api").Table("table_test_sindex_api").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -54,8 +54,8 @@ func (suite *SindexApiSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_sindex_api").TableDrop("table_test_sindex_api").Exec(suite.session) - r.DBDrop("db_sindex_api").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -64,8 +64,8 @@ func (suite *SindexApiSuite) TearDownSuite() { func (suite *SindexApiSuite) TestCases() { suite.T().Log("Running SindexApiSuite: sindex api (#602)") - table_test_sindex_api := r.DB("db_sindex_api").Table("table_test_sindex_api") - _ = table_test_sindex_api // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors // sindex/api.yaml line #5 // rows = [{'id':0, 'a':0, 'b':0, 'c':0, 'm':[1,2,3]},{'id':1, 'a':0, 'b':0, 'c':0, 'm':[4,5,6]},{'id':2, 'a':0, 'b':0, 'c':1, 'm':7},{'id':3, 'a':0, 'b':1, 'c':1, 'm':[10,11,12]},{'id':4, 'a':4, 'b':4, 'c':4, 'm':[14,15,16]}] @@ -78,14 +78,14 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #11 /* ({'deleted':0,'inserted':4,'skipped':0,'errors':0,'replaced':0,'unchanged':0}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "inserted": 4, "skipped": 0, "errors": 0, "replaced": 0, "unchanged": 0} - /* table_test_sindex_api.insert([{'id':0, 'a':0, 'b':0, 'c':0, 'm':[1,2,3]}, + /* tbl.insert([{'id':0, 'a':0, 'b':0, 'c':0, 'm':[1,2,3]}, {'id':1, 'a':0, 'b':0, 'c':0, 'm':[4,5,6]}, {'id':2, 'a':0, 'b':0, 'c':1, 'm':7}, {'id':3, 'a':0, 'b':1, 'c':1, 'm':[10,11,12]}]) */ - suite.T().Log("About to run line #11: table_test_sindex_api.Insert([]interface{}{map[interface{}]interface{}{'id': 0, 'a': 0, 'b': 0, 'c': 0, 'm': []interface{}{1, 2, 3}, }, map[interface{}]interface{}{'id': 1, 'a': 0, 'b': 0, 'c': 0, 'm': []interface{}{4, 5, 6}, }, map[interface{}]interface{}{'id': 2, 'a': 0, 'b': 0, 'c': 1, 'm': 7, }, map[interface{}]interface{}{'id': 3, 'a': 0, 'b': 1, 'c': 1, 'm': []interface{}{10, 11, 12}, }})") + suite.T().Log("About to run line #11: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 0, 'a': 0, 'b': 0, 'c': 0, 'm': []interface{}{1, 2, 3}, }, map[interface{}]interface{}{'id': 1, 'a': 0, 'b': 0, 'c': 0, 'm': []interface{}{4, 5, 6}, }, map[interface{}]interface{}{'id': 2, 'a': 0, 'b': 0, 'c': 1, 'm': 7, }, map[interface{}]interface{}{'id': 3, 'a': 0, 'b': 1, 'c': 1, 'm': []interface{}{10, 11, 12}, }})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Insert([]interface{}{map[interface{}]interface{}{"id": 0, "a": 0, "b": 0, "c": 0, "m": []interface{}{1, 2, 3}}, map[interface{}]interface{}{"id": 1, "a": 0, "b": 0, "c": 0, "m": []interface{}{4, 5, 6}}, map[interface{}]interface{}{"id": 2, "a": 0, "b": 0, "c": 1, "m": 7}, map[interface{}]interface{}{"id": 3, "a": 0, "b": 1, "c": 1, "m": []interface{}{10, 11, 12}}}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 0, "a": 0, "b": 0, "c": 0, "m": []interface{}{1, 2, 3}}, map[interface{}]interface{}{"id": 1, "a": 0, "b": 0, "c": 0, "m": []interface{}{4, 5, 6}}, map[interface{}]interface{}{"id": 2, "a": 0, "b": 0, "c": 1, "m": 7}, map[interface{}]interface{}{"id": 3, "a": 0, "b": 1, "c": 1, "m": []interface{}{10, 11, 12}}}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -96,11 +96,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #18 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_api.index_create('rename-foo', r.row['b']) */ + /* tbl.index_create('rename-foo', r.row['b']) */ - suite.T().Log("About to run line #18: table_test_sindex_api.IndexCreateFunc('rename-foo', r.Row.AtIndex('b'))") + suite.T().Log("About to run line #18: tbl.IndexCreateFunc('rename-foo', r.Row.AtIndex('b'))") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreateFunc("rename-foo", r.Row.AtIndex("b")), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("rename-foo", r.Row.AtIndex("b")), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -111,11 +111,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #23 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_api.index_create('rename-bar', r.row['c']) */ + /* tbl.index_create('rename-bar', r.row['c']) */ - suite.T().Log("About to run line #23: table_test_sindex_api.IndexCreateFunc('rename-bar', r.Row.AtIndex('c'))") + suite.T().Log("About to run line #23: tbl.IndexCreateFunc('rename-bar', r.Row.AtIndex('c'))") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreateFunc("rename-bar", r.Row.AtIndex("c")), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("rename-bar", r.Row.AtIndex("c")), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -126,11 +126,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #28 /* err_regex('ReqlOpFailedError','Index `rename-foo` does not exist or index `rename-bar` already exists on table `[a-zA-Z0-9_]+.[a-zA-Z0-9_]+`[.]',[]) */ var expected_ Err = err_regex("ReqlOpFailedError", "Index `rename-foo` does not exist or index `rename-bar` already exists on table `[a-zA-Z0-9_]+.[a-zA-Z0-9_]+`[.]") - /* table_test_sindex_api.index_rename('rename-foo','rename-bar') */ + /* tbl.index_rename('rename-foo','rename-bar') */ - suite.T().Log("About to run line #28: table_test_sindex_api.IndexRename('rename-foo', 'rename-bar')") + suite.T().Log("About to run line #28: tbl.IndexRename('rename-foo', 'rename-bar')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexRename("rename-foo", "rename-bar"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexRename("rename-foo", "rename-bar"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -141,11 +141,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #31 /* err_regex('ReqlOpFailedError','Index `rename-fake` does not exist or index `rename-stuff` already exists on table `[a-zA-Z0-9_]+.[a-zA-Z0-9_]+`[.]',[]) */ var expected_ Err = err_regex("ReqlOpFailedError", "Index `rename-fake` does not exist or index `rename-stuff` already exists on table `[a-zA-Z0-9_]+.[a-zA-Z0-9_]+`[.]") - /* table_test_sindex_api.index_rename('rename-fake','rename-stuff') */ + /* tbl.index_rename('rename-fake','rename-stuff') */ - suite.T().Log("About to run line #31: table_test_sindex_api.IndexRename('rename-fake', 'rename-stuff')") + suite.T().Log("About to run line #31: tbl.IndexRename('rename-fake', 'rename-stuff')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexRename("rename-fake", "rename-stuff"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexRename("rename-fake", "rename-stuff"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -156,11 +156,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #34 /* err('ReqlQueryLogicError','Index name conflict:'+' `id` is the name of the primary key.',[]) */ var expected_ Err = err("ReqlQueryLogicError", "Index name conflict:"+" `id` is the name of the primary key.") - /* table_test_sindex_api.index_rename('id','rename-stuff') */ + /* tbl.index_rename('id','rename-stuff') */ - suite.T().Log("About to run line #34: table_test_sindex_api.IndexRename('id', 'rename-stuff')") + suite.T().Log("About to run line #34: tbl.IndexRename('id', 'rename-stuff')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexRename("id", "rename-stuff"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexRename("id", "rename-stuff"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -171,11 +171,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #37 /* err('ReqlQueryLogicError','Index name conflict:'+' `id` is the name of the primary key.',[]) */ var expected_ Err = err("ReqlQueryLogicError", "Index name conflict:"+" `id` is the name of the primary key.") - /* table_test_sindex_api.index_rename('rename-stuff','id') */ + /* tbl.index_rename('rename-stuff','id') */ - suite.T().Log("About to run line #37: table_test_sindex_api.IndexRename('rename-stuff', 'id')") + suite.T().Log("About to run line #37: tbl.IndexRename('rename-stuff', 'id')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexRename("rename-stuff", "id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexRename("rename-stuff", "id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -186,11 +186,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #40 /* {'renamed':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"renamed": 0} - /* table_test_sindex_api.index_rename('rename-foo','rename-foo') */ + /* tbl.index_rename('rename-foo','rename-foo') */ - suite.T().Log("About to run line #40: table_test_sindex_api.IndexRename('rename-foo', 'rename-foo')") + suite.T().Log("About to run line #40: tbl.IndexRename('rename-foo', 'rename-foo')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexRename("rename-foo", "rename-foo"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexRename("rename-foo", "rename-foo"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -201,11 +201,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #43 /* {'renamed':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"renamed": 0} - /* table_test_sindex_api.index_rename('rename-foo','rename-foo',overwrite=True) */ + /* tbl.index_rename('rename-foo','rename-foo',overwrite=True) */ - suite.T().Log("About to run line #43: table_test_sindex_api.IndexRename('rename-foo', 'rename-foo').OptArgs(r.IndexRenameOpts{Overwrite: true, })") + suite.T().Log("About to run line #43: tbl.IndexRename('rename-foo', 'rename-foo').OptArgs(r.IndexRenameOpts{Overwrite: true, })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexRename("rename-foo", "rename-foo").OptArgs(r.IndexRenameOpts{Overwrite: true}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexRename("rename-foo", "rename-foo").OptArgs(r.IndexRenameOpts{Overwrite: true}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -216,11 +216,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #48 /* {'renamed':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"renamed": 1} - /* table_test_sindex_api.index_rename('rename-foo','rename-bar',overwrite=True) */ + /* tbl.index_rename('rename-foo','rename-bar',overwrite=True) */ - suite.T().Log("About to run line #48: table_test_sindex_api.IndexRename('rename-foo', 'rename-bar').OptArgs(r.IndexRenameOpts{Overwrite: true, })") + suite.T().Log("About to run line #48: tbl.IndexRename('rename-foo', 'rename-bar').OptArgs(r.IndexRenameOpts{Overwrite: true, })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexRename("rename-foo", "rename-bar").OptArgs(r.IndexRenameOpts{Overwrite: true}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexRename("rename-foo", "rename-bar").OptArgs(r.IndexRenameOpts{Overwrite: true}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -231,11 +231,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #53 /* {'renamed':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"renamed": 1} - /* table_test_sindex_api.index_rename('rename-bar','rename-stuff',overwrite=True) */ + /* tbl.index_rename('rename-bar','rename-stuff',overwrite=True) */ - suite.T().Log("About to run line #53: table_test_sindex_api.IndexRename('rename-bar', 'rename-stuff').OptArgs(r.IndexRenameOpts{Overwrite: true, })") + suite.T().Log("About to run line #53: tbl.IndexRename('rename-bar', 'rename-stuff').OptArgs(r.IndexRenameOpts{Overwrite: true, })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexRename("rename-bar", "rename-stuff").OptArgs(r.IndexRenameOpts{Overwrite: true}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexRename("rename-bar", "rename-stuff").OptArgs(r.IndexRenameOpts{Overwrite: true}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -246,11 +246,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #58 /* {'renamed':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"renamed": 1} - /* table_test_sindex_api.index_rename('rename-stuff','rename-last') */ + /* tbl.index_rename('rename-stuff','rename-last') */ - suite.T().Log("About to run line #58: table_test_sindex_api.IndexRename('rename-stuff', 'rename-last')") + suite.T().Log("About to run line #58: tbl.IndexRename('rename-stuff', 'rename-last')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexRename("rename-stuff", "rename-last"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexRename("rename-stuff", "rename-last"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -261,11 +261,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #62 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_api.index_create('minval', lambda:r.minval) */ + /* tbl.index_create('minval', lambda:r.minval) */ - suite.T().Log("About to run line #62: table_test_sindex_api.IndexCreateFunc('minval', func() interface{} { return r.MinVal})") + suite.T().Log("About to run line #62: tbl.IndexCreateFunc('minval', func() interface{} { return r.MinVal})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreateFunc("minval", func() interface{} { return r.MinVal }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("minval", func() interface{} { return r.MinVal }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -276,11 +276,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #67 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_api.index_create('maxval', lambda:r.maxval) */ + /* tbl.index_create('maxval', lambda:r.maxval) */ - suite.T().Log("About to run line #67: table_test_sindex_api.IndexCreateFunc('maxval', func() interface{} { return r.MaxVal})") + suite.T().Log("About to run line #67: tbl.IndexCreateFunc('maxval', func() interface{} { return r.MaxVal})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreateFunc("maxval", func() interface{} { return r.MaxVal }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("maxval", func() interface{} { return r.MaxVal }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -293,11 +293,11 @@ func (suite *SindexApiSuite) TestCases() { {'index':'minval','ready':true}, {'index':'maxval','ready':true}]) */ var expected_ compare.Expected = compare.UnorderedMatch([]interface{}{map[interface{}]interface{}{"index": "rename-last", "ready": true}, map[interface{}]interface{}{"index": "minval", "ready": true}, map[interface{}]interface{}{"index": "maxval", "ready": true}}) - /* table_test_sindex_api.index_wait('rename-last', 'minval', 'maxval').pluck('index', 'ready') */ + /* tbl.index_wait('rename-last', 'minval', 'maxval').pluck('index', 'ready') */ - suite.T().Log("About to run line #71: table_test_sindex_api.IndexWait('rename-last', 'minval', 'maxval').Pluck('index', 'ready')") + suite.T().Log("About to run line #71: tbl.IndexWait('rename-last', 'minval', 'maxval').Pluck('index', 'ready')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexWait("rename-last", "minval", "maxval").Pluck("index", "ready"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexWait("rename-last", "minval", "maxval").Pluck("index", "ready"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -308,11 +308,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #76 /* 3 */ var expected_ int = 3 - /* table_test_sindex_api.get_all(0, index='rename-last').count() */ + /* tbl.get_all(0, index='rename-last').count() */ - suite.T().Log("About to run line #76: table_test_sindex_api.GetAll(0).OptArgs(r.GetAllOpts{Index: 'rename-last', }).Count()") + suite.T().Log("About to run line #76: tbl.GetAll(0).OptArgs(r.GetAllOpts{Index: 'rename-last', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(0).OptArgs(r.GetAllOpts{Index: "rename-last"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(0).OptArgs(r.GetAllOpts{Index: "rename-last"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -323,11 +323,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #82 /* 0 */ var expected_ int = 0 - /* table_test_sindex_api.get_all(r.minval, index='minval').count() */ + /* tbl.get_all(r.minval, index='minval').count() */ - suite.T().Log("About to run line #82: table_test_sindex_api.GetAll(r.MinVal).OptArgs(r.GetAllOpts{Index: 'minval', }).Count()") + suite.T().Log("About to run line #82: tbl.GetAll(r.MinVal).OptArgs(r.GetAllOpts{Index: 'minval', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(r.MinVal).OptArgs(r.GetAllOpts{Index: "minval"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(r.MinVal).OptArgs(r.GetAllOpts{Index: "minval"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -338,11 +338,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #87 /* 0 */ var expected_ int = 0 - /* table_test_sindex_api.get_all(r.maxval, index='maxval').count() */ + /* tbl.get_all(r.maxval, index='maxval').count() */ - suite.T().Log("About to run line #87: table_test_sindex_api.GetAll(r.MaxVal).OptArgs(r.GetAllOpts{Index: 'maxval', }).Count()") + suite.T().Log("About to run line #87: tbl.GetAll(r.MaxVal).OptArgs(r.GetAllOpts{Index: 'maxval', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(r.MaxVal).OptArgs(r.GetAllOpts{Index: "maxval"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(r.MaxVal).OptArgs(r.GetAllOpts{Index: "maxval"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -353,11 +353,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #92 /* 0 */ var expected_ int = 0 - /* table_test_sindex_api.between(r.minval, r.maxval, index='minval').count() */ + /* tbl.between(r.minval, r.maxval, index='minval').count() */ - suite.T().Log("About to run line #92: table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'minval', }).Count()") + suite.T().Log("About to run line #92: tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'minval', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "minval"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "minval"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -368,11 +368,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #97 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_api.index_create('rename-last-dup', table_test_sindex_api.index_status('rename-last').nth(0).get_field('function')) */ + /* tbl.index_create('rename-last-dup', tbl.index_status('rename-last').nth(0).get_field('function')) */ - suite.T().Log("About to run line #97: table_test_sindex_api.IndexCreateFunc('rename-last-dup', table_test_sindex_api.IndexStatus('rename-last').Nth(0).Field('function'))") + suite.T().Log("About to run line #97: tbl.IndexCreateFunc('rename-last-dup', tbl.IndexStatus('rename-last').Nth(0).Field('function'))") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreateFunc("rename-last-dup", table_test_sindex_api.IndexStatus("rename-last").Nth(0).Field("function")), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("rename-last-dup", tbl.IndexStatus("rename-last").Nth(0).Field("function")), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -383,11 +383,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #100 /* [{'index':'rename-last-dup','ready':true}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"index": "rename-last-dup", "ready": true}} - /* table_test_sindex_api.index_wait('rename-last-dup').pluck('index', 'ready') */ + /* tbl.index_wait('rename-last-dup').pluck('index', 'ready') */ - suite.T().Log("About to run line #100: table_test_sindex_api.IndexWait('rename-last-dup').Pluck('index', 'ready')") + suite.T().Log("About to run line #100: tbl.IndexWait('rename-last-dup').Pluck('index', 'ready')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexWait("rename-last-dup").Pluck("index", "ready"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexWait("rename-last-dup").Pluck("index", "ready"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -398,11 +398,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #103 /* 3 */ var expected_ int = 3 - /* table_test_sindex_api.get_all(0, index='rename-last-dup').count() */ + /* tbl.get_all(0, index='rename-last-dup').count() */ - suite.T().Log("About to run line #103: table_test_sindex_api.GetAll(0).OptArgs(r.GetAllOpts{Index: 'rename-last-dup', }).Count()") + suite.T().Log("About to run line #103: tbl.GetAll(0).OptArgs(r.GetAllOpts{Index: 'rename-last-dup', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(0).OptArgs(r.GetAllOpts{Index: "rename-last-dup"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(0).OptArgs(r.GetAllOpts{Index: "rename-last-dup"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -413,11 +413,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #109 /* {'dropped':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"dropped": 1} - /* table_test_sindex_api.index_drop('rename-last-dup') */ + /* tbl.index_drop('rename-last-dup') */ - suite.T().Log("About to run line #109: table_test_sindex_api.IndexDrop('rename-last-dup')") + suite.T().Log("About to run line #109: tbl.IndexDrop('rename-last-dup')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexDrop("rename-last-dup"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexDrop("rename-last-dup"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -428,11 +428,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #110 /* {'dropped':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"dropped": 1} - /* table_test_sindex_api.index_drop('minval') */ + /* tbl.index_drop('minval') */ - suite.T().Log("About to run line #110: table_test_sindex_api.IndexDrop('minval')") + suite.T().Log("About to run line #110: tbl.IndexDrop('minval')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexDrop("minval"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexDrop("minval"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -443,11 +443,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #111 /* {'dropped':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"dropped": 1} - /* table_test_sindex_api.index_drop('maxval') */ + /* tbl.index_drop('maxval') */ - suite.T().Log("About to run line #111: table_test_sindex_api.IndexDrop('maxval')") + suite.T().Log("About to run line #111: tbl.IndexDrop('maxval')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexDrop("maxval"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexDrop("maxval"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -458,11 +458,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #114 /* ['rename-last'] */ var expected_ []interface{} = []interface{}{"rename-last"} - /* table_test_sindex_api.index_list() */ + /* tbl.index_list() */ - suite.T().Log("About to run line #114: table_test_sindex_api.IndexList()") + suite.T().Log("About to run line #114: tbl.IndexList()") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexList(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexList(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -473,11 +473,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #117 /* {'dropped':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"dropped": 1} - /* table_test_sindex_api.index_drop('rename-last') */ + /* tbl.index_drop('rename-last') */ - suite.T().Log("About to run line #117: table_test_sindex_api.IndexDrop('rename-last')") + suite.T().Log("About to run line #117: tbl.IndexDrop('rename-last')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexDrop("rename-last"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexDrop("rename-last"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -488,11 +488,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #121 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_api.index_create('ai', r.row['a']) */ + /* tbl.index_create('ai', r.row['a']) */ - suite.T().Log("About to run line #121: table_test_sindex_api.IndexCreateFunc('ai', r.Row.AtIndex('a'))") + suite.T().Log("About to run line #121: tbl.IndexCreateFunc('ai', r.Row.AtIndex('a'))") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreateFunc("ai", r.Row.AtIndex("a")), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("ai", r.Row.AtIndex("a")), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -503,11 +503,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #125 /* err_regex("ReqlOpFailedError", "Index `ai` already exists on table `[a-zA-Z0-9_]+.[a-zA-Z0-9_]+`[.]", []) */ var expected_ Err = err_regex("ReqlOpFailedError", "Index `ai` already exists on table `[a-zA-Z0-9_]+.[a-zA-Z0-9_]+`[.]") - /* table_test_sindex_api.index_create('ai', r.row['a']) */ + /* tbl.index_create('ai', r.row['a']) */ - suite.T().Log("About to run line #125: table_test_sindex_api.IndexCreateFunc('ai', r.Row.AtIndex('a'))") + suite.T().Log("About to run line #125: tbl.IndexCreateFunc('ai', r.Row.AtIndex('a'))") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreateFunc("ai", r.Row.AtIndex("a")), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("ai", r.Row.AtIndex("a")), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -518,11 +518,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #129 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_api.index_create('bi', r.row['b']) */ + /* tbl.index_create('bi', r.row['b']) */ - suite.T().Log("About to run line #129: table_test_sindex_api.IndexCreateFunc('bi', r.Row.AtIndex('b'))") + suite.T().Log("About to run line #129: tbl.IndexCreateFunc('bi', r.Row.AtIndex('b'))") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreateFunc("bi", r.Row.AtIndex("b")), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("bi", r.Row.AtIndex("b")), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -533,11 +533,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #133 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_api.index_create('ci', r.row['c']) */ + /* tbl.index_create('ci', r.row['c']) */ - suite.T().Log("About to run line #133: table_test_sindex_api.IndexCreateFunc('ci', r.Row.AtIndex('c'))") + suite.T().Log("About to run line #133: tbl.IndexCreateFunc('ci', r.Row.AtIndex('c'))") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreateFunc("ci", r.Row.AtIndex("c")), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("ci", r.Row.AtIndex("c")), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -548,11 +548,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #137 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_api.index_create('idi', r.row['id']) */ + /* tbl.index_create('idi', r.row['id']) */ - suite.T().Log("About to run line #137: table_test_sindex_api.IndexCreateFunc('idi', r.Row.AtIndex('id'))") + suite.T().Log("About to run line #137: tbl.IndexCreateFunc('idi', r.Row.AtIndex('id'))") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreateFunc("idi", r.Row.AtIndex("id")), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("idi", r.Row.AtIndex("id")), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -563,11 +563,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #141 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_api.index_create('kdi', [r.row['id']]) */ + /* tbl.index_create('kdi', [r.row['id']]) */ - suite.T().Log("About to run line #141: table_test_sindex_api.IndexCreateFunc('kdi', []interface{}{r.Row.AtIndex('id')})") + suite.T().Log("About to run line #141: tbl.IndexCreateFunc('kdi', []interface{}{r.Row.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreateFunc("kdi", []interface{}{r.Row.AtIndex("id")}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("kdi", []interface{}{r.Row.AtIndex("id")}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -578,11 +578,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #145 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_api.index_create('mi', r.row['m'], multi=True) */ + /* tbl.index_create('mi', r.row['m'], multi=True) */ - suite.T().Log("About to run line #145: table_test_sindex_api.IndexCreateFunc('mi', r.Row.AtIndex('m')).OptArgs(r.IndexCreateOpts{Multi: true, })") + suite.T().Log("About to run line #145: tbl.IndexCreateFunc('mi', r.Row.AtIndex('m')).OptArgs(r.IndexCreateOpts{Multi: true, })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreateFunc("mi", r.Row.AtIndex("m")).OptArgs(r.IndexCreateOpts{Multi: true}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("mi", r.Row.AtIndex("m")).OptArgs(r.IndexCreateOpts{Multi: true}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -593,11 +593,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #149 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_api.index_create('brokeni', r.row['broken']) */ + /* tbl.index_create('brokeni', r.row['broken']) */ - suite.T().Log("About to run line #149: table_test_sindex_api.IndexCreateFunc('brokeni', r.Row.AtIndex('broken'))") + suite.T().Log("About to run line #149: tbl.IndexCreateFunc('brokeni', r.Row.AtIndex('broken'))") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreateFunc("brokeni", r.Row.AtIndex("broken")), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("brokeni", r.Row.AtIndex("broken")), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -608,11 +608,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #153 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_sindex_api.index_wait().pluck('index', 'ready') */ + /* tbl.index_wait().pluck('index', 'ready') */ - suite.T().Log("About to run line #153: table_test_sindex_api.IndexWait().Pluck('index', 'ready')") + suite.T().Log("About to run line #153: tbl.IndexWait().Pluck('index', 'ready')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexWait().Pluck("index", "ready"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexWait().Pluck("index", "ready"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -623,11 +623,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #156 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_sindex_api.get(True) */ + /* tbl.get(True) */ - suite.T().Log("About to run line #156: table_test_sindex_api.Get(true)") + suite.T().Log("About to run line #156: tbl.Get(true)") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Get(true), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(true), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -638,11 +638,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #159 /* null */ var expected_ interface{} = nil - /* table_test_sindex_api.get([]) */ + /* tbl.get([]) */ - suite.T().Log("About to run line #159: table_test_sindex_api.Get([]interface{}{})") + suite.T().Log("About to run line #159: tbl.Get([]interface{}{})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Get([]interface{}{}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get([]interface{}{}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -653,11 +653,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #161 /* null */ var expected_ interface{} = nil - /* table_test_sindex_api.get(-1) */ + /* tbl.get(-1) */ - suite.T().Log("About to run line #161: table_test_sindex_api.Get(-1)") + suite.T().Log("About to run line #161: tbl.Get(-1)") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Get(-1), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(-1), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -668,11 +668,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #164 /* 1 */ var expected_ int = 1 - /* table_test_sindex_api.get(1)['id'] */ + /* tbl.get(1)['id'] */ - suite.T().Log("About to run line #164: table_test_sindex_api.Get(1).AtIndex('id')") + suite.T().Log("About to run line #164: tbl.Get(1).AtIndex('id')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Get(1).AtIndex("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).AtIndex("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -683,11 +683,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #168 /* 'SELECTION' */ var expected_ string = "SELECTION" - /* table_test_sindex_api.get(1).type_of() */ + /* tbl.get(1).type_of() */ - suite.T().Log("About to run line #168: table_test_sindex_api.Get(1).TypeOf()") + suite.T().Log("About to run line #168: tbl.Get(1).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Get(1).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -698,11 +698,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #172 /* {'replaced':0,'skipped':0,'deleted':0,'unchanged':1,'errors':0,'inserted':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"replaced": 0, "skipped": 0, "deleted": 0, "unchanged": 1, "errors": 0, "inserted": 0} - /* table_test_sindex_api.get(1).update(lambda x:null) */ + /* tbl.get(1).update(lambda x:null) */ - suite.T().Log("About to run line #172: table_test_sindex_api.Get(1).Update(func(x r.Term) interface{} { return nil})") + suite.T().Log("About to run line #172: tbl.Get(1).Update(func(x r.Term) interface{} { return nil})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Get(1).Update(func(x r.Term) interface{} { return nil }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Get(1).Update(func(x r.Term) interface{} { return nil }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -713,11 +713,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #180 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_sindex_api.get_all(True, index='id') */ + /* tbl.get_all(True, index='id') */ - suite.T().Log("About to run line #180: table_test_sindex_api.GetAll(true).OptArgs(r.GetAllOpts{Index: 'id', })") + suite.T().Log("About to run line #180: tbl.GetAll(true).OptArgs(r.GetAllOpts{Index: 'id', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(true).OptArgs(r.GetAllOpts{Index: "id"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(true).OptArgs(r.GetAllOpts{Index: "id"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -728,11 +728,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #185 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.get_all(-1, index='id') */ + /* tbl.get_all(-1, index='id') */ - suite.T().Log("About to run line #185: table_test_sindex_api.GetAll(-1).OptArgs(r.GetAllOpts{Index: 'id', })") + suite.T().Log("About to run line #185: tbl.GetAll(-1).OptArgs(r.GetAllOpts{Index: 'id', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(-1).OptArgs(r.GetAllOpts{Index: "id"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(-1).OptArgs(r.GetAllOpts{Index: "id"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -743,11 +743,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #189 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.get_all(-1) */ + /* tbl.get_all(-1) */ - suite.T().Log("About to run line #189: table_test_sindex_api.GetAll(-1)") + suite.T().Log("About to run line #189: tbl.GetAll(-1)") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(-1), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(-1), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -758,11 +758,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #193 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.get_all([-1]) */ + /* tbl.get_all([-1]) */ - suite.T().Log("About to run line #193: table_test_sindex_api.GetAll([]interface{}{-1})") + suite.T().Log("About to run line #193: tbl.GetAll([]interface{}{-1})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll([]interface{}{-1}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll([]interface{}{-1}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -773,11 +773,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #197 /* 1 */ var expected_ int = 1 - /* table_test_sindex_api.get_all(1, index='id')[0]['id'] */ + /* tbl.get_all(1, index='id')[0]['id'] */ - suite.T().Log("About to run line #197: table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: 'id', }).AtIndex(0).AtIndex('id')") + suite.T().Log("About to run line #197: tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: 'id', }).AtIndex(0).AtIndex('id')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: "id"}).AtIndex(0).AtIndex("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: "id"}).AtIndex(0).AtIndex("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -788,11 +788,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #201 /* 1 */ var expected_ int = 1 - /* table_test_sindex_api.get_all(1)[0]['id'] */ + /* tbl.get_all(1)[0]['id'] */ - suite.T().Log("About to run line #201: table_test_sindex_api.GetAll(1).AtIndex(0).AtIndex('id')") + suite.T().Log("About to run line #201: tbl.GetAll(1).AtIndex(0).AtIndex('id')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).AtIndex(0).AtIndex("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).AtIndex(0).AtIndex("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -803,11 +803,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #205 /* bag([1,2,3]) */ var expected_ compare.Expected = compare.UnorderedMatch([]interface{}{1, 2, 3}) - /* table_test_sindex_api.get_all(1,2,3, index='id').map(lambda x:x["id"]).coerce_to("ARRAY") */ + /* tbl.get_all(1,2,3, index='id').map(lambda x:x["id"]).coerce_to("ARRAY") */ - suite.T().Log("About to run line #205: table_test_sindex_api.GetAll(1, 2, 3).OptArgs(r.GetAllOpts{Index: 'id', }).Map(func(x r.Term) interface{} { return x.AtIndex('id')}).CoerceTo('ARRAY')") + suite.T().Log("About to run line #205: tbl.GetAll(1, 2, 3).OptArgs(r.GetAllOpts{Index: 'id', }).Map(func(x r.Term) interface{} { return x.AtIndex('id')}).CoerceTo('ARRAY')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1, 2, 3).OptArgs(r.GetAllOpts{Index: "id"}).Map(func(x r.Term) interface{} { return x.AtIndex("id") }).CoerceTo("ARRAY"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1, 2, 3).OptArgs(r.GetAllOpts{Index: "id"}).Map(func(x r.Term) interface{} { return x.AtIndex("id") }).CoerceTo("ARRAY"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -818,11 +818,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #209 /* bag([1,2,3]) */ var expected_ compare.Expected = compare.UnorderedMatch([]interface{}{1, 2, 3}) - /* table_test_sindex_api.get_all(1,2,3).map(lambda x:x["id"]).coerce_to("ARRAY") */ + /* tbl.get_all(1,2,3).map(lambda x:x["id"]).coerce_to("ARRAY") */ - suite.T().Log("About to run line #209: table_test_sindex_api.GetAll(1, 2, 3).Map(func(x r.Term) interface{} { return x.AtIndex('id')}).CoerceTo('ARRAY')") + suite.T().Log("About to run line #209: tbl.GetAll(1, 2, 3).Map(func(x r.Term) interface{} { return x.AtIndex('id')}).CoerceTo('ARRAY')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1, 2, 3).Map(func(x r.Term) interface{} { return x.AtIndex("id") }).CoerceTo("ARRAY"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1, 2, 3).Map(func(x r.Term) interface{} { return x.AtIndex("id") }).CoerceTo("ARRAY"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -833,11 +833,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #213 /* 'SELECTION' */ var expected_ string = "SELECTION" - /* table_test_sindex_api.get_all(1, index='id').type_of() */ + /* tbl.get_all(1, index='id').type_of() */ - suite.T().Log("About to run line #213: table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: 'id', }).TypeOf()") + suite.T().Log("About to run line #213: tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: 'id', }).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: "id"}).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: "id"}).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -848,11 +848,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #217 /* 'SELECTION' */ var expected_ string = "SELECTION" - /* table_test_sindex_api.get_all(1).type_of() */ + /* tbl.get_all(1).type_of() */ - suite.T().Log("About to run line #217: table_test_sindex_api.GetAll(1).TypeOf()") + suite.T().Log("About to run line #217: tbl.GetAll(1).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -863,11 +863,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #221 /* {'replaced':0,'skipped':0,'deleted':0,'unchanged':1,'errors':0,'inserted':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"replaced": 0, "skipped": 0, "deleted": 0, "unchanged": 1, "errors": 0, "inserted": 0} - /* table_test_sindex_api.get_all(1, index='id').update(lambda x:null) */ + /* tbl.get_all(1, index='id').update(lambda x:null) */ - suite.T().Log("About to run line #221: table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: 'id', }).Update(func(x r.Term) interface{} { return nil})") + suite.T().Log("About to run line #221: tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: 'id', }).Update(func(x r.Term) interface{} { return nil})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: "id"}).Update(func(x r.Term) interface{} { return nil }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: "id"}).Update(func(x r.Term) interface{} { return nil }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -878,11 +878,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #225 /* {'replaced':0,'skipped':0,'deleted':0,'unchanged':1,'errors':0,'inserted':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"replaced": 0, "skipped": 0, "deleted": 0, "unchanged": 1, "errors": 0, "inserted": 0} - /* table_test_sindex_api.get_all(1).update(lambda x:null) */ + /* tbl.get_all(1).update(lambda x:null) */ - suite.T().Log("About to run line #225: table_test_sindex_api.GetAll(1).Update(func(x r.Term) interface{} { return nil})") + suite.T().Log("About to run line #225: tbl.GetAll(1).Update(func(x r.Term) interface{} { return nil})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).Update(func(x r.Term) interface{} { return nil }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).Update(func(x r.Term) interface{} { return nil }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -893,11 +893,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #229 /* {'replaced':0,'skipped':0,'deleted':0,'unchanged':3,'errors':0,'inserted':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"replaced": 0, "skipped": 0, "deleted": 0, "unchanged": 3, "errors": 0, "inserted": 0} - /* table_test_sindex_api.get_all(1,2,3, index='id').update(lambda x:null) */ + /* tbl.get_all(1,2,3, index='id').update(lambda x:null) */ - suite.T().Log("About to run line #229: table_test_sindex_api.GetAll(1, 2, 3).OptArgs(r.GetAllOpts{Index: 'id', }).Update(func(x r.Term) interface{} { return nil})") + suite.T().Log("About to run line #229: tbl.GetAll(1, 2, 3).OptArgs(r.GetAllOpts{Index: 'id', }).Update(func(x r.Term) interface{} { return nil})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1, 2, 3).OptArgs(r.GetAllOpts{Index: "id"}).Update(func(x r.Term) interface{} { return nil }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1, 2, 3).OptArgs(r.GetAllOpts{Index: "id"}).Update(func(x r.Term) interface{} { return nil }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -908,11 +908,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #233 /* {'replaced':0,'skipped':0,'deleted':0,'unchanged':3,'errors':0,'inserted':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"replaced": 0, "skipped": 0, "deleted": 0, "unchanged": 3, "errors": 0, "inserted": 0} - /* table_test_sindex_api.get_all(1,2,3).update(lambda x:null) */ + /* tbl.get_all(1,2,3).update(lambda x:null) */ - suite.T().Log("About to run line #233: table_test_sindex_api.GetAll(1, 2, 3).Update(func(x r.Term) interface{} { return nil})") + suite.T().Log("About to run line #233: tbl.GetAll(1, 2, 3).Update(func(x r.Term) interface{} { return nil})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1, 2, 3).Update(func(x r.Term) interface{} { return nil }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1, 2, 3).Update(func(x r.Term) interface{} { return nil }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -923,11 +923,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #238 /* err_regex("ReqlOpFailedError", "Index `fake` was not found on table `[a-zA-Z0-9_]+.[a-zA-Z0-9_]+`[.]", []) */ var expected_ Err = err_regex("ReqlOpFailedError", "Index `fake` was not found on table `[a-zA-Z0-9_]+.[a-zA-Z0-9_]+`[.]") - /* table_test_sindex_api.get_all(0, index='fake') */ + /* tbl.get_all(0, index='fake') */ - suite.T().Log("About to run line #238: table_test_sindex_api.GetAll(0).OptArgs(r.GetAllOpts{Index: 'fake', })") + suite.T().Log("About to run line #238: tbl.GetAll(0).OptArgs(r.GetAllOpts{Index: 'fake', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(0).OptArgs(r.GetAllOpts{Index: "fake"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(0).OptArgs(r.GetAllOpts{Index: "fake"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -938,11 +938,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #242 /* err("ReqlQueryLogicError", "Cannot use a geospatial index with `get_all`. Use `get_intersecting` instead.", []) */ var expected_ Err = err("ReqlQueryLogicError", "Cannot use a geospatial index with `get_all`. Use `get_intersecting` instead.") - /* table_test_sindex_api.get_all(r.point(0, 0)) */ + /* tbl.get_all(r.point(0, 0)) */ - suite.T().Log("About to run line #242: table_test_sindex_api.GetAll(r.Point(0, 0))") + suite.T().Log("About to run line #242: tbl.GetAll(r.Point(0, 0))") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(r.Point(0, 0)), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(r.Point(0, 0)), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -953,11 +953,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #246 /* err("ReqlQueryLogicError", "Expected type STRING but found BOOL.", []) */ var expected_ Err = err("ReqlQueryLogicError", "Expected type STRING but found BOOL.") - /* table_test_sindex_api.get_all(0, index=False) */ + /* tbl.get_all(0, index=False) */ - suite.T().Log("About to run line #246: table_test_sindex_api.GetAll(0).OptArgs(r.GetAllOpts{Index: false, })") + suite.T().Log("About to run line #246: tbl.GetAll(0).OptArgs(r.GetAllOpts{Index: false, })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(0).OptArgs(r.GetAllOpts{Index: false}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(0).OptArgs(r.GetAllOpts{Index: false}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -968,11 +968,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #251 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_sindex_api.get_all(True, index='id') */ + /* tbl.get_all(True, index='id') */ - suite.T().Log("About to run line #251: table_test_sindex_api.GetAll(true).OptArgs(r.GetAllOpts{Index: 'id', })") + suite.T().Log("About to run line #251: tbl.GetAll(true).OptArgs(r.GetAllOpts{Index: 'id', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(true).OptArgs(r.GetAllOpts{Index: "id"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(true).OptArgs(r.GetAllOpts{Index: "id"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -983,11 +983,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #256 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.get_all([], index='id') */ + /* tbl.get_all([], index='id') */ - suite.T().Log("About to run line #256: table_test_sindex_api.GetAll([]interface{}{}).OptArgs(r.GetAllOpts{Index: 'id', })") + suite.T().Log("About to run line #256: tbl.GetAll([]interface{}{}).OptArgs(r.GetAllOpts{Index: 'id', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll([]interface{}{}).OptArgs(r.GetAllOpts{Index: "id"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll([]interface{}{}).OptArgs(r.GetAllOpts{Index: "id"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -998,11 +998,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #260 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_sindex_api.get_all(True, index='idi') */ + /* tbl.get_all(True, index='idi') */ - suite.T().Log("About to run line #260: table_test_sindex_api.GetAll(true).OptArgs(r.GetAllOpts{Index: 'idi', })") + suite.T().Log("About to run line #260: tbl.GetAll(true).OptArgs(r.GetAllOpts{Index: 'idi', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(true).OptArgs(r.GetAllOpts{Index: "idi"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(true).OptArgs(r.GetAllOpts{Index: "idi"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1013,11 +1013,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #265 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.get_all([], index='idi') */ + /* tbl.get_all([], index='idi') */ - suite.T().Log("About to run line #265: table_test_sindex_api.GetAll([]interface{}{}).OptArgs(r.GetAllOpts{Index: 'idi', })") + suite.T().Log("About to run line #265: tbl.GetAll([]interface{}{}).OptArgs(r.GetAllOpts{Index: 'idi', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll([]interface{}{}).OptArgs(r.GetAllOpts{Index: "idi"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll([]interface{}{}).OptArgs(r.GetAllOpts{Index: "idi"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1028,11 +1028,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #270 /* 1 */ var expected_ int = 1 - /* table_test_sindex_api.get_all(1, index='id')[0]['id'] */ + /* tbl.get_all(1, index='id')[0]['id'] */ - suite.T().Log("About to run line #270: table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: 'id', }).AtIndex(0).AtIndex('id')") + suite.T().Log("About to run line #270: tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: 'id', }).AtIndex(0).AtIndex('id')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: "id"}).AtIndex(0).AtIndex("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: "id"}).AtIndex(0).AtIndex("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1043,11 +1043,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #274 /* 1 */ var expected_ int = 1 - /* table_test_sindex_api.get_all(1, index='idi')[0]['id'] */ + /* tbl.get_all(1, index='idi')[0]['id'] */ - suite.T().Log("About to run line #274: table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: 'idi', }).AtIndex(0).AtIndex('id')") + suite.T().Log("About to run line #274: tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: 'idi', }).AtIndex(0).AtIndex('id')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: "idi"}).AtIndex(0).AtIndex("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: "idi"}).AtIndex(0).AtIndex("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1058,11 +1058,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #278 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.get_all(1, index='ai') */ + /* tbl.get_all(1, index='ai') */ - suite.T().Log("About to run line #278: table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: 'ai', })") + suite.T().Log("About to run line #278: tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: 'ai', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: "ai"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: "ai"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1073,11 +1073,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #282 /* [3] */ var expected_ []interface{} = []interface{}{3} - /* table_test_sindex_api.get_all(1, index='bi').order_by('id').map(lambda x:x['id']) */ + /* tbl.get_all(1, index='bi').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #282: table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: 'bi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #282: tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: 'bi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: "bi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: "bi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1086,13 +1086,13 @@ func (suite *SindexApiSuite) TestCases() { { // sindex/api.yaml line #286 - /* err('ReqlQueryLogicError', 'Indexed order_by can only be performed on a TABLE or TABLE_SLICE.', [0]) */ + /* err('ReqlQueryLogicError', 'Indexed order_by can only be performed on a TABLE or TABLE_SLICE. Make sure order_by comes before any transformations (such as map) or filters.', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Indexed order_by can only be performed on a TABLE or TABLE_SLICE. Make sure order_by comes before any transformations (such as map) or filters.") - /* table_test_sindex_api.get_all(1, index='bi').order_by(index='id').map(lambda x:x['id']) */ + /* tbl.get_all(1, index='bi').order_by(index='id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #286: table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: 'bi', }).OrderBy().OptArgs(r.OrderByOpts{Index: 'id', }).Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #286: tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: 'bi', }).OrderBy().OptArgs(r.OrderByOpts{Index: 'id', }).Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: "bi"}).OrderBy().OptArgs(r.OrderByOpts{Index: "id"}).Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: "bi"}).OrderBy().OptArgs(r.OrderByOpts{Index: "id"}).Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1103,11 +1103,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #290 /* err('ReqlQueryLogicError', 'Expected type TABLE_SLICE but found SELECTION:', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Expected type TABLE_SLICE but found SELECTION:") - /* table_test_sindex_api.get_all(1, index='bi').between(1, 1, index='id').map(lambda x:x['id']) */ + /* tbl.get_all(1, index='bi').between(1, 1, index='id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #290: table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: 'bi', }).Between(1, 1).OptArgs(r.BetweenOpts{Index: 'id', }).Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #290: tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: 'bi', }).Between(1, 1).OptArgs(r.BetweenOpts{Index: 'id', }).Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: "bi"}).Between(1, 1).OptArgs(r.BetweenOpts{Index: "id"}).Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: "bi"}).Between(1, 1).OptArgs(r.BetweenOpts{Index: "id"}).Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1118,11 +1118,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #294 /* [2, 3] */ var expected_ []interface{} = []interface{}{2, 3} - /* table_test_sindex_api.get_all(1, index='ci').order_by('id').map(lambda x:x['id']) */ + /* tbl.get_all(1, index='ci').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #294: table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: 'ci', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #294: tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: 'ci', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: "ci"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: "ci"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1133,11 +1133,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #298 /* 'SELECTION' */ var expected_ string = "SELECTION" - /* table_test_sindex_api.get_all(1, index='ci').type_of() */ + /* tbl.get_all(1, index='ci').type_of() */ - suite.T().Log("About to run line #298: table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: 'ci', }).TypeOf()") + suite.T().Log("About to run line #298: tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: 'ci', }).TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: "ci"}).TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: "ci"}).TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1148,11 +1148,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #302 /* {'replaced':0,'skipped':0,'deleted':0,'unchanged':2,'errors':0,'inserted':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"replaced": 0, "skipped": 0, "deleted": 0, "unchanged": 2, "errors": 0, "inserted": 0} - /* table_test_sindex_api.get_all(1, index='ci').update(lambda x:null) */ + /* tbl.get_all(1, index='ci').update(lambda x:null) */ - suite.T().Log("About to run line #302: table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: 'ci', }).Update(func(x r.Term) interface{} { return nil})") + suite.T().Log("About to run line #302: tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: 'ci', }).Update(func(x r.Term) interface{} { return nil})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: "ci"}).Update(func(x r.Term) interface{} { return nil }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: "ci"}).Update(func(x r.Term) interface{} { return nil }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1163,11 +1163,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #306 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.get_all(1, index='brokeni') */ + /* tbl.get_all(1, index='brokeni') */ - suite.T().Log("About to run line #306: table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: 'brokeni', })") + suite.T().Log("About to run line #306: tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: 'brokeni', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: "brokeni"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: "brokeni"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1178,11 +1178,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #311 /* [rows[0]] */ var expected_ []interface{} = []interface{}{rows[0]} - /* table_test_sindex_api.get_all(1, index='mi') */ + /* tbl.get_all(1, index='mi') */ - suite.T().Log("About to run line #311: table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: 'mi', })") + suite.T().Log("About to run line #311: tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: 'mi', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: "mi"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: "mi"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1193,11 +1193,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #316 /* [rows[0]] */ var expected_ []interface{} = []interface{}{rows[0]} - /* table_test_sindex_api.get_all(2, index='mi') */ + /* tbl.get_all(2, index='mi') */ - suite.T().Log("About to run line #316: table_test_sindex_api.GetAll(2).OptArgs(r.GetAllOpts{Index: 'mi', })") + suite.T().Log("About to run line #316: tbl.GetAll(2).OptArgs(r.GetAllOpts{Index: 'mi', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(2).OptArgs(r.GetAllOpts{Index: "mi"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(2).OptArgs(r.GetAllOpts{Index: "mi"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1208,11 +1208,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #321 /* [rows[1]] */ var expected_ []interface{} = []interface{}{rows[1]} - /* table_test_sindex_api.get_all(5, index='mi') */ + /* tbl.get_all(5, index='mi') */ - suite.T().Log("About to run line #321: table_test_sindex_api.GetAll(5).OptArgs(r.GetAllOpts{Index: 'mi', })") + suite.T().Log("About to run line #321: tbl.GetAll(5).OptArgs(r.GetAllOpts{Index: 'mi', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(5).OptArgs(r.GetAllOpts{Index: "mi"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(5).OptArgs(r.GetAllOpts{Index: "mi"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1223,11 +1223,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #326 /* [rows[2]] */ var expected_ []interface{} = []interface{}{rows[2]} - /* table_test_sindex_api.get_all(7, index='mi') */ + /* tbl.get_all(7, index='mi') */ - suite.T().Log("About to run line #326: table_test_sindex_api.GetAll(7).OptArgs(r.GetAllOpts{Index: 'mi', })") + suite.T().Log("About to run line #326: tbl.GetAll(7).OptArgs(r.GetAllOpts{Index: 'mi', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(7).OptArgs(r.GetAllOpts{Index: "mi"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(7).OptArgs(r.GetAllOpts{Index: "mi"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1238,11 +1238,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #331 /* err_regex("ReqlOpFailedError", "Index `fake` was not found on table `[a-zA-Z0-9_]+.[a-zA-Z0-9_]+`[.]", []) */ var expected_ Err = err_regex("ReqlOpFailedError", "Index `fake` was not found on table `[a-zA-Z0-9_]+.[a-zA-Z0-9_]+`[.]") - /* table_test_sindex_api.eq_join('id', table_test_sindex_api, index='fake') */ + /* tbl.eq_join('id', tbl, index='fake') */ - suite.T().Log("About to run line #331: table_test_sindex_api.EqJoin('id', table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: 'fake', })") + suite.T().Log("About to run line #331: tbl.EqJoin('id', tbl).OptArgs(r.EqJoinOpts{Index: 'fake', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.EqJoin("id", table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: "fake"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.EqJoin("id", tbl).OptArgs(r.EqJoinOpts{Index: "fake"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1253,11 +1253,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #335 /* err("ReqlQueryLogicError", "Expected type STRING but found BOOL.", []) */ var expected_ Err = err("ReqlQueryLogicError", "Expected type STRING but found BOOL.") - /* table_test_sindex_api.eq_join('id', table_test_sindex_api, index=False) */ + /* tbl.eq_join('id', tbl, index=False) */ - suite.T().Log("About to run line #335: table_test_sindex_api.EqJoin('id', table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: false, })") + suite.T().Log("About to run line #335: tbl.EqJoin('id', tbl).OptArgs(r.EqJoinOpts{Index: false, })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.EqJoin("id", table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: false}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.EqJoin("id", tbl).OptArgs(r.EqJoinOpts{Index: false}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1268,11 +1268,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #340 /* [{'left':rows[1],'right':rows[0]}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"left": rows[1], "right": rows[0]}} - /* table_test_sindex_api.filter({'id':1}).eq_join('id', table_test_sindex_api, index='mi') */ + /* tbl.filter({'id':1}).eq_join('id', tbl, index='mi') */ - suite.T().Log("About to run line #340: table_test_sindex_api.Filter(map[interface{}]interface{}{'id': 1, }).EqJoin('id', table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: 'mi', })") + suite.T().Log("About to run line #340: tbl.Filter(map[interface{}]interface{}{'id': 1, }).EqJoin('id', tbl).OptArgs(r.EqJoinOpts{Index: 'mi', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Filter(map[interface{}]interface{}{"id": 1}).EqJoin("id", table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: "mi"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(map[interface{}]interface{}{"id": 1}).EqJoin("id", tbl).OptArgs(r.EqJoinOpts{Index: "mi"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1283,11 +1283,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #345 /* [{'left':rows[0],'right':rows[0]}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"left": rows[0], "right": rows[0]}} - /* table_test_sindex_api.filter({'id':0}).eq_join('id', table_test_sindex_api) */ + /* tbl.filter({'id':0}).eq_join('id', tbl) */ - suite.T().Log("About to run line #345: table_test_sindex_api.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin('id', table_test_sindex_api)") + suite.T().Log("About to run line #345: tbl.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin('id', tbl)") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Filter(map[interface{}]interface{}{"id": 0}).EqJoin("id", table_test_sindex_api), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(map[interface{}]interface{}{"id": 0}).EqJoin("id", tbl), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1298,11 +1298,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #350 /* [{'left':rows[0],'right':rows[0]}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"left": rows[0], "right": rows[0]}} - /* table_test_sindex_api.filter({'id':0}).eq_join(lambda x:x['id'], table_test_sindex_api) */ + /* tbl.filter({'id':0}).eq_join(lambda x:x['id'], tbl) */ - suite.T().Log("About to run line #350: table_test_sindex_api.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin(func(x r.Term) interface{} { return x.AtIndex('id')}, table_test_sindex_api)") + suite.T().Log("About to run line #350: tbl.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin(func(x r.Term) interface{} { return x.AtIndex('id')}, tbl)") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Filter(map[interface{}]interface{}{"id": 0}).EqJoin(func(x r.Term) interface{} { return x.AtIndex("id") }, table_test_sindex_api), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(map[interface{}]interface{}{"id": 0}).EqJoin(func(x r.Term) interface{} { return x.AtIndex("id") }, tbl), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1313,11 +1313,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #355 /* [{'left':rows[0],'right':rows[0]}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"left": rows[0], "right": rows[0]}} - /* table_test_sindex_api.filter({'id':0}).eq_join('id', table_test_sindex_api, index='id') */ + /* tbl.filter({'id':0}).eq_join('id', tbl, index='id') */ - suite.T().Log("About to run line #355: table_test_sindex_api.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin('id', table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: 'id', })") + suite.T().Log("About to run line #355: tbl.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin('id', tbl).OptArgs(r.EqJoinOpts{Index: 'id', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Filter(map[interface{}]interface{}{"id": 0}).EqJoin("id", table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: "id"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(map[interface{}]interface{}{"id": 0}).EqJoin("id", tbl).OptArgs(r.EqJoinOpts{Index: "id"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1328,11 +1328,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #360 /* [{'left':rows[0],'right':rows[0]}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"left": rows[0], "right": rows[0]}} - /* table_test_sindex_api.filter({'id':0}).eq_join(lambda x:x['id'], table_test_sindex_api, index='id') */ + /* tbl.filter({'id':0}).eq_join(lambda x:x['id'], tbl, index='id') */ - suite.T().Log("About to run line #360: table_test_sindex_api.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin(func(x r.Term) interface{} { return x.AtIndex('id')}, table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: 'id', })") + suite.T().Log("About to run line #360: tbl.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin(func(x r.Term) interface{} { return x.AtIndex('id')}, tbl).OptArgs(r.EqJoinOpts{Index: 'id', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Filter(map[interface{}]interface{}{"id": 0}).EqJoin(func(x r.Term) interface{} { return x.AtIndex("id") }, table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: "id"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(map[interface{}]interface{}{"id": 0}).EqJoin(func(x r.Term) interface{} { return x.AtIndex("id") }, tbl).OptArgs(r.EqJoinOpts{Index: "id"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1343,11 +1343,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #365 /* [{'left':rows[0],'right':rows[0]}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"left": rows[0], "right": rows[0]}} - /* table_test_sindex_api.filter({'id':0}).eq_join('id', table_test_sindex_api, index='idi') */ + /* tbl.filter({'id':0}).eq_join('id', tbl, index='idi') */ - suite.T().Log("About to run line #365: table_test_sindex_api.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin('id', table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: 'idi', })") + suite.T().Log("About to run line #365: tbl.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin('id', tbl).OptArgs(r.EqJoinOpts{Index: 'idi', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Filter(map[interface{}]interface{}{"id": 0}).EqJoin("id", table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: "idi"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(map[interface{}]interface{}{"id": 0}).EqJoin("id", tbl).OptArgs(r.EqJoinOpts{Index: "idi"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1358,11 +1358,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #370 /* [{'left':rows[0],'right':rows[0]}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"left": rows[0], "right": rows[0]}} - /* table_test_sindex_api.filter({'id':0}).eq_join(lambda x:x['id'], table_test_sindex_api, index='idi') */ + /* tbl.filter({'id':0}).eq_join(lambda x:x['id'], tbl, index='idi') */ - suite.T().Log("About to run line #370: table_test_sindex_api.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin(func(x r.Term) interface{} { return x.AtIndex('id')}, table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: 'idi', })") + suite.T().Log("About to run line #370: tbl.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin(func(x r.Term) interface{} { return x.AtIndex('id')}, tbl).OptArgs(r.EqJoinOpts{Index: 'idi', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Filter(map[interface{}]interface{}{"id": 0}).EqJoin(func(x r.Term) interface{} { return x.AtIndex("id") }, table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: "idi"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(map[interface{}]interface{}{"id": 0}).EqJoin(func(x r.Term) interface{} { return x.AtIndex("id") }, tbl).OptArgs(r.EqJoinOpts{Index: "idi"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1376,11 +1376,11 @@ func (suite *SindexApiSuite) TestCases() { {'right':rows[2],'left':rows[0]}, {'right':rows[3],'left':rows[0]}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"right": rows[0], "left": rows[0]}, map[interface{}]interface{}{"right": rows[1], "left": rows[0]}, map[interface{}]interface{}{"right": rows[2], "left": rows[0]}, map[interface{}]interface{}{"right": rows[3], "left": rows[0]}} - /* table_test_sindex_api.filter({'id':0}).eq_join('id', table_test_sindex_api, index='ai').order_by('right') */ + /* tbl.filter({'id':0}).eq_join('id', tbl, index='ai').order_by('right') */ - suite.T().Log("About to run line #375: table_test_sindex_api.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin('id', table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: 'ai', }).OrderBy('right')") + suite.T().Log("About to run line #375: tbl.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin('id', tbl).OptArgs(r.EqJoinOpts{Index: 'ai', }).OrderBy('right')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Filter(map[interface{}]interface{}{"id": 0}).EqJoin("id", table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: "ai"}).OrderBy("right"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(map[interface{}]interface{}{"id": 0}).EqJoin("id", tbl).OptArgs(r.EqJoinOpts{Index: "ai"}).OrderBy("right"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1393,11 +1393,11 @@ func (suite *SindexApiSuite) TestCases() { {'right':rows[1],'left':rows[0]}, {'right':rows[2],'left':rows[0]}]) */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"right": rows[0], "left": rows[0]}, map[interface{}]interface{}{"right": rows[1], "left": rows[0]}, map[interface{}]interface{}{"right": rows[2], "left": rows[0]}} - /* table_test_sindex_api.filter({'id':0}).eq_join('id', table_test_sindex_api, index='bi').order_by('right') */ + /* tbl.filter({'id':0}).eq_join('id', tbl, index='bi').order_by('right') */ - suite.T().Log("About to run line #382: table_test_sindex_api.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin('id', table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: 'bi', }).OrderBy('right')") + suite.T().Log("About to run line #382: tbl.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin('id', tbl).OptArgs(r.EqJoinOpts{Index: 'bi', }).OrderBy('right')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Filter(map[interface{}]interface{}{"id": 0}).EqJoin("id", table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: "bi"}).OrderBy("right"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(map[interface{}]interface{}{"id": 0}).EqJoin("id", tbl).OptArgs(r.EqJoinOpts{Index: "bi"}).OrderBy("right"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1408,11 +1408,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #388 /* [{'right':rows[0],'left':rows[0]}, {'right':rows[1],'left':rows[0]}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"right": rows[0], "left": rows[0]}, map[interface{}]interface{}{"right": rows[1], "left": rows[0]}} - /* table_test_sindex_api.filter({'id':0}).eq_join('id', table_test_sindex_api, index='ci').order_by('right') */ + /* tbl.filter({'id':0}).eq_join('id', tbl, index='ci').order_by('right') */ - suite.T().Log("About to run line #388: table_test_sindex_api.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin('id', table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: 'ci', }).OrderBy('right')") + suite.T().Log("About to run line #388: tbl.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin('id', tbl).OptArgs(r.EqJoinOpts{Index: 'ci', }).OrderBy('right')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Filter(map[interface{}]interface{}{"id": 0}).EqJoin("id", table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: "ci"}).OrderBy("right"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(map[interface{}]interface{}{"id": 0}).EqJoin("id", tbl).OptArgs(r.EqJoinOpts{Index: "ci"}).OrderBy("right"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1423,11 +1423,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #392 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.filter({'id':0}).eq_join('id', table_test_sindex_api, index='brokeni') */ + /* tbl.filter({'id':0}).eq_join('id', tbl, index='brokeni') */ - suite.T().Log("About to run line #392: table_test_sindex_api.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin('id', table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: 'brokeni', })") + suite.T().Log("About to run line #392: tbl.Filter(map[interface{}]interface{}{'id': 0, }).EqJoin('id', tbl).OptArgs(r.EqJoinOpts{Index: 'brokeni', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Filter(map[interface{}]interface{}{"id": 0}).EqJoin("id", table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: "brokeni"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Filter(map[interface{}]interface{}{"id": 0}).EqJoin("id", tbl).OptArgs(r.EqJoinOpts{Index: "brokeni"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1445,11 +1445,11 @@ func (suite *SindexApiSuite) TestCases() { {'left':rows[2],'right':rows[3]}, {'left':rows[3],'right':rows[3]}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"left": rows[0], "right": rows[0]}, map[interface{}]interface{}{"left": rows[1], "right": rows[0]}, map[interface{}]interface{}{"left": rows[0], "right": rows[1]}, map[interface{}]interface{}{"left": rows[1], "right": rows[1]}, map[interface{}]interface{}{"left": rows[0], "right": rows[2]}, map[interface{}]interface{}{"left": rows[1], "right": rows[2]}, map[interface{}]interface{}{"left": rows[2], "right": rows[3]}, map[interface{}]interface{}{"left": rows[3], "right": rows[3]}} - /* table_test_sindex_api.eq_join('c', table_test_sindex_api, index='bi').order_by('right', 'left') */ + /* tbl.eq_join('c', tbl, index='bi').order_by('right', 'left') */ - suite.T().Log("About to run line #397: table_test_sindex_api.EqJoin('c', table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: 'bi', }).OrderBy('right', 'left')") + suite.T().Log("About to run line #397: tbl.EqJoin('c', tbl).OptArgs(r.EqJoinOpts{Index: 'bi', }).OrderBy('right', 'left')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.EqJoin("c", table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: "bi"}).OrderBy("right", "left"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.EqJoin("c", tbl).OptArgs(r.EqJoinOpts{Index: "bi"}).OrderBy("right", "left"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1460,11 +1460,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #408 /* err("ReqlQueryLogicError", "Index name conflict: `id` is the name of the primary key.", []) */ var expected_ Err = err("ReqlQueryLogicError", "Index name conflict: `id` is the name of the primary key.") - /* table_test_sindex_api.index_create('id') */ + /* tbl.index_create('id') */ - suite.T().Log("About to run line #408: table_test_sindex_api.IndexCreate('id')") + suite.T().Log("About to run line #408: tbl.IndexCreate('id')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreate("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreate("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1475,11 +1475,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #411 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_api.index_create('c') */ + /* tbl.index_create('c') */ - suite.T().Log("About to run line #411: table_test_sindex_api.IndexCreate('c')") + suite.T().Log("About to run line #411: tbl.IndexCreate('c')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreate("c"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreate("c"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1490,11 +1490,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #413 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_api.index_create('broken') */ + /* tbl.index_create('broken') */ - suite.T().Log("About to run line #413: table_test_sindex_api.IndexCreate('broken')") + suite.T().Log("About to run line #413: tbl.IndexCreate('broken')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreate("broken"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreate("broken"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1505,11 +1505,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #416 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_sindex_api.index_wait('broken') */ + /* tbl.index_wait('broken') */ - suite.T().Log("About to run line #416: table_test_sindex_api.IndexWait('broken')") + suite.T().Log("About to run line #416: tbl.IndexWait('broken')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexWait("broken"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexWait("broken"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1520,11 +1520,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #419 /* [2, 3] */ var expected_ []interface{} = []interface{}{2, 3} - /* table_test_sindex_api.get_all(1, index='c').order_by('id').map(lambda x:x['id']) */ + /* tbl.get_all(1, index='c').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #419: table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #419: tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1535,11 +1535,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #423 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.get_all(1, index='broken').order_by('broken').map(lambda x:x['id']) */ + /* tbl.get_all(1, index='broken').order_by('broken').map(lambda x:x['id']) */ - suite.T().Log("About to run line #423: table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: 'broken', }).OrderBy('broken').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #423: tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: 'broken', }).OrderBy('broken').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(1).OptArgs(r.GetAllOpts{Index: "broken"}).OrderBy("broken").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(1).OptArgs(r.GetAllOpts{Index: "broken"}).OrderBy("broken").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1550,11 +1550,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #428 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_api.index_create('nil', lambda x:null) */ + /* tbl.index_create('nil', lambda x:null) */ - suite.T().Log("About to run line #428: table_test_sindex_api.IndexCreateFunc('nil', func(x r.Term) interface{} { return nil})") + suite.T().Log("About to run line #428: tbl.IndexCreateFunc('nil', func(x r.Term) interface{} { return nil})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreateFunc("nil", func(x r.Term) interface{} { return nil }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("nil", func(x r.Term) interface{} { return nil }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1565,11 +1565,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #431 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_sindex_api.index_wait().pluck('index', 'ready') */ + /* tbl.index_wait().pluck('index', 'ready') */ - suite.T().Log("About to run line #431: table_test_sindex_api.IndexWait().Pluck('index', 'ready')") + suite.T().Log("About to run line #431: tbl.IndexWait().Pluck('index', 'ready')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexWait().Pluck("index", "ready"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexWait().Pluck("index", "ready"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1580,11 +1580,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #434 /* err("ReqlNonExistenceError", "Keys cannot be NULL.", []) */ var expected_ Err = err("ReqlNonExistenceError", "Keys cannot be NULL.") - /* table_test_sindex_api.get_all(null, index='nil') */ + /* tbl.get_all(null, index='nil') */ - suite.T().Log("About to run line #434: table_test_sindex_api.GetAll(nil).OptArgs(r.GetAllOpts{Index: 'nil', })") + suite.T().Log("About to run line #434: tbl.GetAll(nil).OptArgs(r.GetAllOpts{Index: 'nil', })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.GetAll(nil).OptArgs(r.GetAllOpts{Index: "nil"}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll(nil).OptArgs(r.GetAllOpts{Index: "nil"}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1595,11 +1595,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #439 /* {'deleted':0,'inserted':1,'skipped':0,'errors':0,'replaced':0,'unchanged':0} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"deleted": 0, "inserted": 1, "skipped": 0, "errors": 0, "replaced": 0, "unchanged": 0} - /* table_test_sindex_api.insert({'id':4, 'a':4, 'b':4, 'c':4, 'm':[14,15,16]}) */ + /* tbl.insert({'id':4, 'a':4, 'b':4, 'c':4, 'm':[14,15,16]}) */ - suite.T().Log("About to run line #439: table_test_sindex_api.Insert(map[interface{}]interface{}{'id': 4, 'a': 4, 'b': 4, 'c': 4, 'm': []interface{}{14, 15, 16}, })") + suite.T().Log("About to run line #439: tbl.Insert(map[interface{}]interface{}{'id': 4, 'a': 4, 'b': 4, 'c': 4, 'm': []interface{}{14, 15, 16}, })") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Insert(map[interface{}]interface{}{"id": 4, "a": 4, "b": 4, "c": 4, "m": []interface{}{14, 15, 16}}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(map[interface{}]interface{}{"id": 4, "a": 4, "b": 4, "c": 4, "m": []interface{}{14, 15, 16}}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1614,11 +1614,11 @@ func (suite *SindexApiSuite) TestCases() { {'right':rows[3],'left':rows[1]}, {'right':rows[4],'left':rows[4]}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"right": rows[0], "left": rows[0]}, map[interface{}]interface{}{"right": rows[1], "left": rows[0]}, map[interface{}]interface{}{"right": rows[2], "left": rows[1]}, map[interface{}]interface{}{"right": rows[3], "left": rows[1]}, map[interface{}]interface{}{"right": rows[4], "left": rows[4]}} - /* table_test_sindex_api.eq_join('id', table_test_sindex_api, index='c').order_by('left', 'right').coerce_to("ARRAY") */ + /* tbl.eq_join('id', tbl, index='c').order_by('left', 'right').coerce_to("ARRAY") */ - suite.T().Log("About to run line #446: table_test_sindex_api.EqJoin('id', table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: 'c', }).OrderBy('left', 'right').CoerceTo('ARRAY')") + suite.T().Log("About to run line #446: tbl.EqJoin('id', tbl).OptArgs(r.EqJoinOpts{Index: 'c', }).OrderBy('left', 'right').CoerceTo('ARRAY')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.EqJoin("id", table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: "c"}).OrderBy("left", "right").CoerceTo("ARRAY"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.EqJoin("id", tbl).OptArgs(r.EqJoinOpts{Index: "c"}).OrderBy("left", "right").CoerceTo("ARRAY"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1633,11 +1633,11 @@ func (suite *SindexApiSuite) TestCases() { {'right':rows[3],'left':rows[1]}, {'right':rows[4],'left':rows[4]}] */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"right": rows[0], "left": rows[0]}, map[interface{}]interface{}{"right": rows[1], "left": rows[0]}, map[interface{}]interface{}{"right": rows[2], "left": rows[1]}, map[interface{}]interface{}{"right": rows[3], "left": rows[1]}, map[interface{}]interface{}{"right": rows[4], "left": rows[4]}} - /* table_test_sindex_api.eq_join('id', table_test_sindex_api, index='ci').order_by('left', 'right') */ + /* tbl.eq_join('id', tbl, index='ci').order_by('left', 'right') */ - suite.T().Log("About to run line #455: table_test_sindex_api.EqJoin('id', table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: 'ci', }).OrderBy('left', 'right')") + suite.T().Log("About to run line #455: tbl.EqJoin('id', tbl).OptArgs(r.EqJoinOpts{Index: 'ci', }).OrderBy('left', 'right')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.EqJoin("id", table_test_sindex_api).OptArgs(r.EqJoinOpts{Index: "ci"}).OrderBy("left", "right"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.EqJoin("id", tbl).OptArgs(r.EqJoinOpts{Index: "ci"}).OrderBy("left", "right"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1648,11 +1648,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #465 /* err('ReqlQueryLogicError', 'Cannot use `nu' + 'll` in BETWEEN, use `r.minval` or `r.maxval` to denote unboundedness.') */ var expected_ Err = err("ReqlQueryLogicError", "Cannot use `nu"+"ll` in BETWEEN, use `r.minval` or `r.maxval` to denote unboundedness.") - /* table_test_sindex_api.between(null, 2, index='id').count() */ + /* tbl.between(null, 2, index='id').count() */ - suite.T().Log("About to run line #465: table_test_sindex_api.Between(nil, 2).OptArgs(r.BetweenOpts{Index: 'id', }).Count()") + suite.T().Log("About to run line #465: tbl.Between(nil, 2).OptArgs(r.BetweenOpts{Index: 'id', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(nil, 2).OptArgs(r.BetweenOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(nil, 2).OptArgs(r.BetweenOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1663,11 +1663,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #466 /* err('ReqlQueryLogicError', 'Cannot use `nu' + 'll` in BETWEEN, use `r.minval` or `r.maxval` to denote unboundedness.') */ var expected_ Err = err("ReqlQueryLogicError", "Cannot use `nu"+"ll` in BETWEEN, use `r.minval` or `r.maxval` to denote unboundedness.") - /* table_test_sindex_api.between(2, null, index='id').count() */ + /* tbl.between(2, null, index='id').count() */ - suite.T().Log("About to run line #466: table_test_sindex_api.Between(2, nil).OptArgs(r.BetweenOpts{Index: 'id', }).Count()") + suite.T().Log("About to run line #466: tbl.Between(2, nil).OptArgs(r.BetweenOpts{Index: 'id', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(2, nil).OptArgs(r.BetweenOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(2, nil).OptArgs(r.BetweenOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1678,11 +1678,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #467 /* err('ReqlQueryLogicError', 'Cannot use `nu' + 'll` in BETWEEN, use `r.minval` or `r.maxval` to denote unboundedness.') */ var expected_ Err = err("ReqlQueryLogicError", "Cannot use `nu"+"ll` in BETWEEN, use `r.minval` or `r.maxval` to denote unboundedness.") - /* table_test_sindex_api.between(null, null, index='id').count() */ + /* tbl.between(null, null, index='id').count() */ - suite.T().Log("About to run line #467: table_test_sindex_api.Between(nil, nil).OptArgs(r.BetweenOpts{Index: 'id', }).Count()") + suite.T().Log("About to run line #467: tbl.Between(nil, nil).OptArgs(r.BetweenOpts{Index: 'id', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(nil, nil).OptArgs(r.BetweenOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(nil, nil).OptArgs(r.BetweenOpts{Index: "id"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1693,11 +1693,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #479 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, r.maxval).order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, r.maxval).order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #479: table_test_sindex_api.Between(r.MinVal, r.MaxVal).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #479: tbl.Between(r.MinVal, r.MaxVal).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, r.MaxVal).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, r.MaxVal).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1708,11 +1708,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #483 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, r.maxval).order_by(index='id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, r.maxval).order_by(index='id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #483: table_test_sindex_api.Between(r.MinVal, r.MaxVal).OrderBy().OptArgs(r.OrderByOpts{Index: 'id', }).Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #483: tbl.Between(r.MinVal, r.MaxVal).OrderBy().OptArgs(r.OrderByOpts{Index: 'id', }).Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, r.MaxVal).OrderBy().OptArgs(r.OrderByOpts{Index: "id"}).Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, r.MaxVal).OrderBy().OptArgs(r.OrderByOpts{Index: "id"}).Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1723,11 +1723,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #487 /* err('ReqlQueryLogicError', 'Cannot perform multiple BETWEENs on the same table.', [0]) */ var expected_ Err = err("ReqlQueryLogicError", "Cannot perform multiple BETWEENs on the same table.") - /* table_test_sindex_api.between(r.minval, r.maxval).between(r.minval, r.maxval).map(lambda x:x['id']) */ + /* tbl.between(r.minval, r.maxval).between(r.minval, r.maxval).map(lambda x:x['id']) */ - suite.T().Log("About to run line #487: table_test_sindex_api.Between(r.MinVal, r.MaxVal).Between(r.MinVal, r.MaxVal).Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #487: tbl.Between(r.MinVal, r.MaxVal).Between(r.MinVal, r.MaxVal).Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, r.MaxVal).Between(r.MinVal, r.MaxVal).Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, r.MaxVal).Between(r.MinVal, r.MaxVal).Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1738,11 +1738,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #491 /* [0, 1, 2] */ var expected_ []interface{} = []interface{}{0, 1, 2} - /* table_test_sindex_api.order_by(index='id').between(r.minval, 3).map(lambda x:x['id']) */ + /* tbl.order_by(index='id').between(r.minval, 3).map(lambda x:x['id']) */ - suite.T().Log("About to run line #491: table_test_sindex_api.OrderBy().OptArgs(r.OrderByOpts{Index: 'id', }).Between(r.MinVal, 3).Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #491: tbl.OrderBy().OptArgs(r.OrderByOpts{Index: 'id', }).Between(r.MinVal, 3).Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.OrderBy().OptArgs(r.OrderByOpts{Index: "id"}).Between(r.MinVal, 3).Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.OrderBy().OptArgs(r.OrderByOpts{Index: "id"}).Between(r.MinVal, 3).Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1753,11 +1753,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #495 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(0, r.maxval).order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, r.maxval).order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #495: table_test_sindex_api.Between(0, r.MaxVal).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #495: tbl.Between(0, r.MaxVal).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, r.MaxVal).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, r.MaxVal).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1768,11 +1768,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #499 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(r.minval, 4).order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, 4).order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #499: table_test_sindex_api.Between(r.MinVal, 4).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #499: tbl.Between(r.MinVal, 4).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, 4).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, 4).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1783,11 +1783,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #503 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(0, 4).order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 4).order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #503: table_test_sindex_api.Between(0, 4).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #503: tbl.Between(0, 4).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 4).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 4).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1798,11 +1798,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #507 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(-1, 5).order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, 5).order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #507: table_test_sindex_api.Between(-1, 5).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #507: tbl.Between(-1, 5).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, 5).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, 5).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1813,11 +1813,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #511 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(5, 5).order_by('id').map(lambda x:x['id']) */ + /* tbl.between(5, 5).order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #511: table_test_sindex_api.Between(5, 5).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #511: tbl.Between(5, 5).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(5, 5).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(5, 5).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1828,11 +1828,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #515 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(5, r.maxval).order_by('id').map(lambda x:x['id']) */ + /* tbl.between(5, r.maxval).order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #515: table_test_sindex_api.Between(5, r.MaxVal).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #515: tbl.Between(5, r.MaxVal).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(5, r.MaxVal).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(5, r.MaxVal).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1843,11 +1843,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #519 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(-1, -1).order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, -1).order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #519: table_test_sindex_api.Between(-1, -1).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #519: tbl.Between(-1, -1).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, -1).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, -1).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1858,11 +1858,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #523 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(r.minval, -1).order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, -1).order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #523: table_test_sindex_api.Between(r.MinVal, -1).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #523: tbl.Between(r.MinVal, -1).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, -1).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, -1).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1873,11 +1873,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #528 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, r.maxval, right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, r.maxval, right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #528: table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #528: tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1888,11 +1888,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #532 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(0, r.maxval, right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, r.maxval, right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #532: table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #532: tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1903,11 +1903,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #536 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, 4, right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, 4, right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #536: table_test_sindex_api.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #536: tbl.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1918,11 +1918,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #540 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(0, 4, right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 4, right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #540: table_test_sindex_api.Between(0, 4).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #540: tbl.Between(0, 4).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 4).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 4).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1933,11 +1933,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #544 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(-1, 5, right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, 5, right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #544: table_test_sindex_api.Between(-1, 5).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #544: tbl.Between(-1, 5).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, 5).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, 5).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1948,11 +1948,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #548 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(5, 5, right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(5, 5, right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #548: table_test_sindex_api.Between(5, 5).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #548: tbl.Between(5, 5).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(5, 5).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(5, 5).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1963,11 +1963,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #552 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(5, r.maxval, right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(5, r.maxval, right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #552: table_test_sindex_api.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #552: tbl.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1978,11 +1978,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #556 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(-1, -1, right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, -1, right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #556: table_test_sindex_api.Between(-1, -1).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #556: tbl.Between(-1, -1).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, -1).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, -1).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -1993,11 +1993,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #560 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(r.minval, -1, right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, -1, right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #560: table_test_sindex_api.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #560: tbl.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2008,11 +2008,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #565 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, r.maxval, index='id').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, r.maxval, index='id').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #565: table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #565: tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2023,11 +2023,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #569 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(0, r.maxval, index='id').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, r.maxval, index='id').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #569: table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #569: tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2038,11 +2038,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #573 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(r.minval, 4, index='id').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, 4, index='id').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #573: table_test_sindex_api.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #573: tbl.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2053,11 +2053,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #577 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(0, 4, index='id').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 4, index='id').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #577: table_test_sindex_api.Between(0, 4).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #577: tbl.Between(0, 4).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 4).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 4).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2068,11 +2068,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #581 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(-1, 5, index='id').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, 5, index='id').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #581: table_test_sindex_api.Between(-1, 5).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #581: tbl.Between(-1, 5).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, 5).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, 5).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2083,11 +2083,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #585 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(5, 5, index='id').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(5, 5, index='id').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #585: table_test_sindex_api.Between(5, 5).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #585: tbl.Between(5, 5).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(5, 5).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(5, 5).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2098,11 +2098,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #589 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(5, r.maxval, index='id').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(5, r.maxval, index='id').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #589: table_test_sindex_api.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #589: tbl.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2113,11 +2113,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #593 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(-1, -1, index='id').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, -1, index='id').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #593: table_test_sindex_api.Between(-1, -1).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #593: tbl.Between(-1, -1).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, -1).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, -1).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2128,11 +2128,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #597 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(r.minval, -1, index='id').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, -1, index='id').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #597: table_test_sindex_api.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #597: tbl.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: 'id', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: "id"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2143,11 +2143,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #602 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, r.maxval, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, r.maxval, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #602: table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #602: tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2158,11 +2158,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #606 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(0, r.maxval, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, r.maxval, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #606: table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #606: tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2173,11 +2173,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #610 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, 4, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, 4, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #610: table_test_sindex_api.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #610: tbl.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2188,11 +2188,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #614 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(0, 4, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 4, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #614: table_test_sindex_api.Between(0, 4).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #614: tbl.Between(0, 4).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 4).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 4).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2203,11 +2203,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #618 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(-1, 5, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, 5, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #618: table_test_sindex_api.Between(-1, 5).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #618: tbl.Between(-1, 5).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, 5).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, 5).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2218,11 +2218,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #622 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(5, 5, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(5, 5, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #622: table_test_sindex_api.Between(5, 5).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #622: tbl.Between(5, 5).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(5, 5).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(5, 5).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2233,11 +2233,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #626 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(5, r.maxval, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(5, r.maxval, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #626: table_test_sindex_api.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #626: tbl.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2248,11 +2248,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #630 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(-1, -1, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, -1, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #630: table_test_sindex_api.Between(-1, -1).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #630: tbl.Between(-1, -1).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, -1).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, -1).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2263,11 +2263,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #634 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(r.minval, -1, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, -1, index='id', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #634: table_test_sindex_api.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #634: tbl.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2278,11 +2278,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #639 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, r.maxval, index='idi').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, r.maxval, index='idi').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #639: table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #639: tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2293,11 +2293,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #643 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(0, r.maxval, index='idi').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, r.maxval, index='idi').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #643: table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #643: tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2308,11 +2308,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #647 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(r.minval, 4, index='idi').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, 4, index='idi').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #647: table_test_sindex_api.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #647: tbl.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2323,11 +2323,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #651 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(0, 4, index='idi').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 4, index='idi').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #651: table_test_sindex_api.Between(0, 4).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #651: tbl.Between(0, 4).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 4).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 4).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2338,11 +2338,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #655 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(-1, 5, index='idi').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, 5, index='idi').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #655: table_test_sindex_api.Between(-1, 5).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #655: tbl.Between(-1, 5).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, 5).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, 5).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2353,11 +2353,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #659 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(5, 5, index='idi').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(5, 5, index='idi').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #659: table_test_sindex_api.Between(5, 5).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #659: tbl.Between(5, 5).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(5, 5).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(5, 5).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2368,11 +2368,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #663 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(5, r.maxval, index='idi').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(5, r.maxval, index='idi').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #663: table_test_sindex_api.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #663: tbl.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2383,11 +2383,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #667 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(-1, -1, index='idi').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, -1, index='idi').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #667: table_test_sindex_api.Between(-1, -1).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #667: tbl.Between(-1, -1).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, -1).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, -1).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2398,11 +2398,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #671 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(r.minval, -1, index='idi').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, -1, index='idi').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #671: table_test_sindex_api.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #671: tbl.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: 'idi', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: "idi"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2413,11 +2413,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #676 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, r.maxval, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, r.maxval, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #676: table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #676: tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2428,11 +2428,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #680 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(0, r.maxval, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, r.maxval, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #680: table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #680: tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2443,11 +2443,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #684 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, 4, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, 4, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #684: table_test_sindex_api.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #684: tbl.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2458,11 +2458,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #688 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(0, 4, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 4, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #688: table_test_sindex_api.Between(0, 4).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #688: tbl.Between(0, 4).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 4).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 4).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2473,11 +2473,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #692 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(-1, 5, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, 5, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #692: table_test_sindex_api.Between(-1, 5).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #692: tbl.Between(-1, 5).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, 5).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, 5).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2488,11 +2488,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #696 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(5, 5, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(5, 5, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #696: table_test_sindex_api.Between(5, 5).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #696: tbl.Between(5, 5).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(5, 5).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(5, 5).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2503,11 +2503,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #700 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(5, r.maxval, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(5, r.maxval, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #700: table_test_sindex_api.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #700: tbl.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2518,11 +2518,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #704 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(-1, -1, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, -1, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #704: table_test_sindex_api.Between(-1, -1).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #704: tbl.Between(-1, -1).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, -1).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, -1).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2533,11 +2533,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #708 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(r.minval, -1, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, -1, index='idi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #708: table_test_sindex_api.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #708: tbl.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: 'idi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: "idi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2548,11 +2548,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #713 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, r.maxval, index='ai').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, r.maxval, index='ai').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #713: table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #713: tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2563,11 +2563,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #717 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(0, r.maxval, index='ai').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, r.maxval, index='ai').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #717: table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #717: tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2578,11 +2578,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #721 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(r.minval, 4, index='ai').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, 4, index='ai').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #721: table_test_sindex_api.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #721: tbl.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2593,11 +2593,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #725 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(0, 4, index='ai').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 4, index='ai').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #725: table_test_sindex_api.Between(0, 4).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #725: tbl.Between(0, 4).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 4).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 4).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2608,11 +2608,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #729 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(0, 5, index='ai').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 5, index='ai').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #729: table_test_sindex_api.Between(0, 5).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #729: tbl.Between(0, 5).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 5).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 5).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2623,11 +2623,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #734 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, r.maxval, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, r.maxval, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #734: table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #734: tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2638,11 +2638,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #738 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(0, r.maxval, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, r.maxval, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #738: table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #738: tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2653,11 +2653,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #742 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, 4, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, 4, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #742: table_test_sindex_api.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #742: tbl.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, 4).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2668,11 +2668,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #746 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(0, 4, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 4, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #746: table_test_sindex_api.Between(0, 4).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #746: tbl.Between(0, 4).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 4).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 4).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2683,11 +2683,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #750 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(0, 5, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 5, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #750: table_test_sindex_api.Between(0, 5).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #750: tbl.Between(0, 5).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 5).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 5).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2698,11 +2698,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #755 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(0, 3, index='ai').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 3, index='ai').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #755: table_test_sindex_api.Between(0, 3).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #755: tbl.Between(0, 3).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 3).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 3).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2713,11 +2713,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #759 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(0, 1, index='ai').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 1, index='ai').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #759: table_test_sindex_api.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #759: tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 1).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2728,11 +2728,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #763 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(0, 0, index='ai').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 0, index='ai').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #763: table_test_sindex_api.Between(0, 0).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #763: tbl.Between(0, 0).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 0).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 0).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2743,11 +2743,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #767 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(-1, 2, index='ai').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, 2, index='ai').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #767: table_test_sindex_api.Between(-1, 2).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #767: tbl.Between(-1, 2).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, 2).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, 2).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2758,11 +2758,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #772 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(0, 3, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 3, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #772: table_test_sindex_api.Between(0, 3).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #772: tbl.Between(0, 3).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 3).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 3).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2773,11 +2773,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #776 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(0, 1, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 1, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #776: table_test_sindex_api.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #776: tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 1).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2788,11 +2788,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #780 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(0, 0, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 0, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #780: table_test_sindex_api.Between(0, 0).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #780: tbl.Between(0, 0).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 0).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 0).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2803,11 +2803,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #784 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(-1, 2, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, 2, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #784: table_test_sindex_api.Between(-1, 2).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #784: tbl.Between(-1, 2).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, 2).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, 2).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2818,11 +2818,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #789 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(1, 1, index='ai').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(1, 1, index='ai').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #789: table_test_sindex_api.Between(1, 1).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #789: tbl.Between(1, 1).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(1, 1).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(1, 1).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2833,11 +2833,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #793 /* [4] */ var expected_ []interface{} = []interface{}{4} - /* table_test_sindex_api.between(1, r.maxval, index='ai').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(1, r.maxval, index='ai').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #793: table_test_sindex_api.Between(1, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #793: tbl.Between(1, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(1, r.MaxVal).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(1, r.MaxVal).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2848,11 +2848,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #797 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(5, r.maxval, index='ai').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(5, r.maxval, index='ai').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #797: table_test_sindex_api.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #797: tbl.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2863,11 +2863,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #801 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(r.minval, 0, index='ai').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, 0, index='ai').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #801: table_test_sindex_api.Between(r.MinVal, 0).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #801: tbl.Between(r.MinVal, 0).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, 0).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, 0).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2878,11 +2878,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #805 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(-1, -1, index='ai').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, -1, index='ai').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #805: table_test_sindex_api.Between(-1, -1).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #805: tbl.Between(-1, -1).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, -1).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, -1).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2893,11 +2893,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #809 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(r.minval, -1, index='ai').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, -1, index='ai').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #809: table_test_sindex_api.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #809: tbl.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: 'ai', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: "ai"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2908,11 +2908,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #814 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(1, 1, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(1, 1, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #814: table_test_sindex_api.Between(1, 1).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #814: tbl.Between(1, 1).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(1, 1).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(1, 1).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2923,11 +2923,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #818 /* [4] */ var expected_ []interface{} = []interface{}{4} - /* table_test_sindex_api.between(1, r.maxval, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(1, r.maxval, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #818: table_test_sindex_api.Between(1, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #818: tbl.Between(1, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(1, r.MaxVal).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(1, r.MaxVal).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2938,11 +2938,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #822 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(5, r.maxval, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(5, r.maxval, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #822: table_test_sindex_api.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #822: tbl.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(5, r.MaxVal).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2953,11 +2953,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #826 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(r.minval, 0, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, 0, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #826: table_test_sindex_api.Between(r.MinVal, 0).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #826: tbl.Between(r.MinVal, 0).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, 0).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, 0).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2968,11 +2968,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #830 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(-1, -1, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, -1, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #830: table_test_sindex_api.Between(-1, -1).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #830: tbl.Between(-1, -1).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, -1).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, -1).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2983,11 +2983,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #834 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(r.minval, -1, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, -1, index='ai', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #834: table_test_sindex_api.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #834: tbl.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: 'ai', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, -1).OptArgs(r.BetweenOpts{Index: "ai", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -2998,11 +2998,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #839 /* [0, 1] */ var expected_ []interface{} = []interface{}{0, 1} - /* table_test_sindex_api.between(0, 1, index='c').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 1, index='c').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #839: table_test_sindex_api.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #839: tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 1).OptArgs(r.BetweenOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3013,11 +3013,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #843 /* [0, 1] */ var expected_ []interface{} = []interface{}{0, 1} - /* table_test_sindex_api.between(-1, 1, index='c').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, 1, index='c').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #843: table_test_sindex_api.Between(-1, 1).OptArgs(r.BetweenOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #843: tbl.Between(-1, 1).OptArgs(r.BetweenOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, 1).OptArgs(r.BetweenOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, 1).OptArgs(r.BetweenOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3028,11 +3028,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #847 /* [0, 1] */ var expected_ []interface{} = []interface{}{0, 1} - /* table_test_sindex_api.between(r.minval, 1, index='c').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, 1, index='c').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #847: table_test_sindex_api.Between(r.MinVal, 1).OptArgs(r.BetweenOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #847: tbl.Between(r.MinVal, 1).OptArgs(r.BetweenOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, 1).OptArgs(r.BetweenOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, 1).OptArgs(r.BetweenOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3043,11 +3043,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #851 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(0, r.maxval, index='c').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, r.maxval, index='c').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #851: table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #851: tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3058,11 +3058,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #855 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(-1, r.maxval, index='c').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, r.maxval, index='c').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #855: table_test_sindex_api.Between(-1, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #855: tbl.Between(-1, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, r.MaxVal).OptArgs(r.BetweenOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, r.MaxVal).OptArgs(r.BetweenOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3073,11 +3073,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #859 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, r.maxval, index='c').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, r.maxval, index='c').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #859: table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #859: tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3088,11 +3088,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #863 /* [2, 3, 4] */ var expected_ []interface{} = []interface{}{2, 3, 4} - /* table_test_sindex_api.between(1, r.maxval, index='c').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(1, r.maxval, index='c').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #863: table_test_sindex_api.Between(1, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #863: tbl.Between(1, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(1, r.MaxVal).OptArgs(r.BetweenOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(1, r.MaxVal).OptArgs(r.BetweenOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3103,11 +3103,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #867 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(1, 1, index='c').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(1, 1, index='c').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #867: table_test_sindex_api.Between(1, 1).OptArgs(r.BetweenOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #867: tbl.Between(1, 1).OptArgs(r.BetweenOpts{Index: 'c', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(1, 1).OptArgs(r.BetweenOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(1, 1).OptArgs(r.BetweenOpts{Index: "c"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3118,11 +3118,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #872 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(0, 1, index='c', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, 1, index='c', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #872: table_test_sindex_api.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #872: tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 1).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3133,11 +3133,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #876 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(-1, 1, index='c', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, 1, index='c', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #876: table_test_sindex_api.Between(-1, 1).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #876: tbl.Between(-1, 1).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, 1).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, 1).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3148,11 +3148,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #880 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(r.minval, 1, index='c', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, 1, index='c', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #880: table_test_sindex_api.Between(r.MinVal, 1).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #880: tbl.Between(r.MinVal, 1).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, 1).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, 1).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3163,11 +3163,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #884 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(0, r.maxval, index='c', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(0, r.maxval, index='c', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #884: table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #884: tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, r.MaxVal).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3178,11 +3178,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #888 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(-1, r.maxval, index='c', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(-1, r.maxval, index='c', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #888: table_test_sindex_api.Between(-1, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #888: tbl.Between(-1, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(-1, r.MaxVal).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(-1, r.MaxVal).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3193,11 +3193,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #892 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, r.maxval, index='c', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, r.maxval, index='c', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #892: table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #892: tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3208,11 +3208,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #896 /* [2, 3, 4] */ var expected_ []interface{} = []interface{}{2, 3, 4} - /* table_test_sindex_api.between(1, r.maxval, index='c', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(1, r.maxval, index='c', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #896: table_test_sindex_api.Between(1, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #896: tbl.Between(1, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(1, r.MaxVal).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(1, r.MaxVal).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3223,11 +3223,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #900 /* [2, 3] */ var expected_ []interface{} = []interface{}{2, 3} - /* table_test_sindex_api.between(1, 1, index='c', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(1, 1, index='c', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #900: table_test_sindex_api.Between(1, 1).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #900: tbl.Between(1, 1).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(1, 1).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(1, 1).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3238,11 +3238,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #905 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_api.index_create('bc', lambda row:[row['b'], row['c']]) */ + /* tbl.index_create('bc', lambda row:[row['b'], row['c']]) */ - suite.T().Log("About to run line #905: table_test_sindex_api.IndexCreateFunc('bc', func(row r.Term) interface{} { return []interface{}{row.AtIndex('b'), row.AtIndex('c')}})") + suite.T().Log("About to run line #905: tbl.IndexCreateFunc('bc', func(row r.Term) interface{} { return []interface{}{row.AtIndex('b'), row.AtIndex('c')}})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreateFunc("bc", func(row r.Term) interface{} { return []interface{}{row.AtIndex("b"), row.AtIndex("c")} }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("bc", func(row r.Term) interface{} { return []interface{}{row.AtIndex("b"), row.AtIndex("c")} }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3253,11 +3253,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #909 /* {'created':1} */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_api.index_create('cb', lambda row:[row['c'], row['b']]) */ + /* tbl.index_create('cb', lambda row:[row['c'], row['b']]) */ - suite.T().Log("About to run line #909: table_test_sindex_api.IndexCreateFunc('cb', func(row r.Term) interface{} { return []interface{}{row.AtIndex('c'), row.AtIndex('b')}})") + suite.T().Log("About to run line #909: tbl.IndexCreateFunc('cb', func(row r.Term) interface{} { return []interface{}{row.AtIndex('c'), row.AtIndex('b')}})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexCreateFunc("cb", func(row r.Term) interface{} { return []interface{}{row.AtIndex("c"), row.AtIndex("b")} }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("cb", func(row r.Term) interface{} { return []interface{}{row.AtIndex("c"), row.AtIndex("b")} }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3268,11 +3268,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #912 /* AnythingIsFine */ var expected_ string = compare.AnythingIsFine - /* table_test_sindex_api.index_wait().pluck('index', 'ready') */ + /* tbl.index_wait().pluck('index', 'ready') */ - suite.T().Log("About to run line #912: table_test_sindex_api.IndexWait().Pluck('index', 'ready')") + suite.T().Log("About to run line #912: tbl.IndexWait().Pluck('index', 'ready')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.IndexWait().Pluck("index", "ready"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexWait().Pluck("index", "ready"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3283,11 +3283,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #915 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(r.minval, [0, 0], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, [0, 0], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #915: table_test_sindex_api.Between(r.MinVal, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #915: tbl.Between(r.MinVal, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3298,11 +3298,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #919 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between(r.minval, [0, 0], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, [0, 0], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #919: table_test_sindex_api.Between(r.MinVal, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #919: tbl.Between(r.MinVal, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3313,11 +3313,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #923 /* [0, 1] */ var expected_ []interface{} = []interface{}{0, 1} - /* table_test_sindex_api.between(r.minval, [0, 1], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, [0, 1], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #923: table_test_sindex_api.Between(r.MinVal, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #923: tbl.Between(r.MinVal, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3328,11 +3328,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #927 /* [0, 1] */ var expected_ []interface{} = []interface{}{0, 1} - /* table_test_sindex_api.between(r.minval, [0, 1], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, [0, 1], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #927: table_test_sindex_api.Between(r.MinVal, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #927: tbl.Between(r.MinVal, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3343,11 +3343,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #931 /* [0, 1, 2] */ var expected_ []interface{} = []interface{}{0, 1, 2} - /* table_test_sindex_api.between(r.minval, [1, 0], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, [1, 0], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #931: table_test_sindex_api.Between(r.MinVal, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #931: tbl.Between(r.MinVal, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3358,11 +3358,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #935 /* [0, 1] */ var expected_ []interface{} = []interface{}{0, 1} - /* table_test_sindex_api.between(r.minval, [1, 0], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, [1, 0], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #935: table_test_sindex_api.Between(r.MinVal, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #935: tbl.Between(r.MinVal, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3373,11 +3373,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #939 /* [0, 1, 2] */ var expected_ []interface{} = []interface{}{0, 1, 2} - /* table_test_sindex_api.between(r.minval, [1, 1], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, [1, 1], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #939: table_test_sindex_api.Between(r.MinVal, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #939: tbl.Between(r.MinVal, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3388,11 +3388,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #943 /* [0, 1, 2] */ var expected_ []interface{} = []interface{}{0, 1, 2} - /* table_test_sindex_api.between(r.minval, [1, 1], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, [1, 1], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #943: table_test_sindex_api.Between(r.MinVal, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #943: tbl.Between(r.MinVal, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3403,11 +3403,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #947 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, r.maxval, index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, r.maxval, index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #947: table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #947: tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3418,11 +3418,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #951 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, r.maxval, index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, r.maxval, index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #951: table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #951: tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3433,11 +3433,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #956 /* [0, 1] */ var expected_ []interface{} = []interface{}{0, 1} - /* table_test_sindex_api.between(r.minval, [0, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, [0, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #956: table_test_sindex_api.Between(r.MinVal, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #956: tbl.Between(r.MinVal, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3448,11 +3448,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #960 /* [0, 1] */ var expected_ []interface{} = []interface{}{0, 1} - /* table_test_sindex_api.between(r.minval, [0, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, [0, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #960: table_test_sindex_api.Between(r.MinVal, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #960: tbl.Between(r.MinVal, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3463,11 +3463,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #964 /* [0, 1, 2] */ var expected_ []interface{} = []interface{}{0, 1, 2} - /* table_test_sindex_api.between(r.minval, [0, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, [0, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #964: table_test_sindex_api.Between(r.MinVal, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #964: tbl.Between(r.MinVal, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3478,11 +3478,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #968 /* [0, 1] */ var expected_ []interface{} = []interface{}{0, 1} - /* table_test_sindex_api.between(r.minval, [0, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, [0, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #968: table_test_sindex_api.Between(r.MinVal, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #968: tbl.Between(r.MinVal, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3493,11 +3493,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #972 /* [0, 1, 2] */ var expected_ []interface{} = []interface{}{0, 1, 2} - /* table_test_sindex_api.between(r.minval, [1, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, [1, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #972: table_test_sindex_api.Between(r.MinVal, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #972: tbl.Between(r.MinVal, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3508,11 +3508,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #976 /* [0, 1, 2] */ var expected_ []interface{} = []interface{}{0, 1, 2} - /* table_test_sindex_api.between(r.minval, [1, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, [1, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #976: table_test_sindex_api.Between(r.MinVal, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #976: tbl.Between(r.MinVal, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3523,11 +3523,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #980 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(r.minval, [1, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, [1, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #980: table_test_sindex_api.Between(r.MinVal, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #980: tbl.Between(r.MinVal, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3538,11 +3538,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #984 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between(r.minval, [1, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, [1, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #984: table_test_sindex_api.Between(r.MinVal, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #984: tbl.Between(r.MinVal, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3553,11 +3553,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #988 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, r.maxval, index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, r.maxval, index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #988: table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #988: tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3568,11 +3568,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #992 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between(r.minval, r.maxval, index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(r.minval, r.maxval, index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #992: table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #992: tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.MinVal, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3583,11 +3583,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #997 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([0, 0], [0, 0], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], [0, 0], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #997: table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #997: tbl.Between([]interface{}{0, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3598,11 +3598,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1001 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([0, 0], [0, 0], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], [0, 0], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1001: table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1001: tbl.Between([]interface{}{0, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3613,11 +3613,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1005 /* [0, 1] */ var expected_ []interface{} = []interface{}{0, 1} - /* table_test_sindex_api.between([0, 0], [0, 1], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], [0, 1], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1005: table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1005: tbl.Between([]interface{}{0, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3628,11 +3628,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1009 /* [0, 1] */ var expected_ []interface{} = []interface{}{0, 1} - /* table_test_sindex_api.between([0, 0], [0, 1], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], [0, 1], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1009: table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1009: tbl.Between([]interface{}{0, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3643,11 +3643,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1013 /* [0, 1, 2] */ var expected_ []interface{} = []interface{}{0, 1, 2} - /* table_test_sindex_api.between([0, 0], [1, 0], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], [1, 0], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1013: table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1013: tbl.Between([]interface{}{0, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3658,11 +3658,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1017 /* [0, 1] */ var expected_ []interface{} = []interface{}{0, 1} - /* table_test_sindex_api.between([0, 0], [1, 0], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], [1, 0], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1017: table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1017: tbl.Between([]interface{}{0, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3673,11 +3673,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1021 /* [0, 1, 2] */ var expected_ []interface{} = []interface{}{0, 1, 2} - /* table_test_sindex_api.between([0, 0], [1, 1], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], [1, 1], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1021: table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1021: tbl.Between([]interface{}{0, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3688,11 +3688,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1025 /* [0, 1, 2] */ var expected_ []interface{} = []interface{}{0, 1, 2} - /* table_test_sindex_api.between([0, 0], [1, 1], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], [1, 1], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1025: table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1025: tbl.Between([]interface{}{0, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3703,11 +3703,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1029 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between([0, 0], r.maxval, index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], r.maxval, index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1029: table_test_sindex_api.Between([]interface{}{0, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1029: tbl.Between([]interface{}{0, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3718,11 +3718,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1033 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between([0, 0], r.maxval, index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], r.maxval, index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1033: table_test_sindex_api.Between([]interface{}{0, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1033: tbl.Between([]interface{}{0, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3733,11 +3733,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1038 /* [0, 1] */ var expected_ []interface{} = []interface{}{0, 1} - /* table_test_sindex_api.between([0, 0], [0, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], [0, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1038: table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1038: tbl.Between([]interface{}{0, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3748,11 +3748,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1042 /* [0, 1] */ var expected_ []interface{} = []interface{}{0, 1} - /* table_test_sindex_api.between([0, 0], [0, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], [0, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1042: table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1042: tbl.Between([]interface{}{0, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3763,11 +3763,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1046 /* [0, 1, 2] */ var expected_ []interface{} = []interface{}{0, 1, 2} - /* table_test_sindex_api.between([0, 0], [0, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], [0, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1046: table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1046: tbl.Between([]interface{}{0, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3778,11 +3778,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1050 /* [0, 1] */ var expected_ []interface{} = []interface{}{0, 1} - /* table_test_sindex_api.between([0, 0], [0, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], [0, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1050: table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1050: tbl.Between([]interface{}{0, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3793,11 +3793,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1054 /* [0, 1, 2] */ var expected_ []interface{} = []interface{}{0, 1, 2} - /* table_test_sindex_api.between([0, 0], [1, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], [1, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1054: table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1054: tbl.Between([]interface{}{0, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3808,11 +3808,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1058 /* [0, 1, 2] */ var expected_ []interface{} = []interface{}{0, 1, 2} - /* table_test_sindex_api.between([0, 0], [1, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], [1, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1058: table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1058: tbl.Between([]interface{}{0, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3823,11 +3823,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1062 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between([0, 0], [1, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], [1, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1062: table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1062: tbl.Between([]interface{}{0, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3838,11 +3838,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1066 /* [0, 1, 2, 3] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3} - /* table_test_sindex_api.between([0, 0], [1, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], [1, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1066: table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1066: tbl.Between([]interface{}{0, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3853,11 +3853,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1070 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between([0, 0], r.maxval, index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], r.maxval, index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1070: table_test_sindex_api.Between([]interface{}{0, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1070: tbl.Between([]interface{}{0, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3868,11 +3868,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1074 /* [0, 1, 2, 3, 4] */ var expected_ []interface{} = []interface{}{0, 1, 2, 3, 4} - /* table_test_sindex_api.between([0, 0], r.maxval, index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 0], r.maxval, index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1074: table_test_sindex_api.Between([]interface{}{0, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1074: tbl.Between([]interface{}{0, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3883,11 +3883,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1079 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([0, 1], [0, 0], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], [0, 0], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1079: table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1079: tbl.Between([]interface{}{0, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3898,11 +3898,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1083 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([0, 1], [0, 0], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], [0, 0], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1083: table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1083: tbl.Between([]interface{}{0, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3913,11 +3913,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1087 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([0, 1], [0, 1], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], [0, 1], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1087: table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1087: tbl.Between([]interface{}{0, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3928,11 +3928,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1091 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([0, 1], [0, 1], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], [0, 1], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1091: table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1091: tbl.Between([]interface{}{0, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3943,11 +3943,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1095 /* [2] */ var expected_ []interface{} = []interface{}{2} - /* table_test_sindex_api.between([0, 1], [1, 0], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], [1, 0], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1095: table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1095: tbl.Between([]interface{}{0, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3958,11 +3958,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1099 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([0, 1], [1, 0], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], [1, 0], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1099: table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1099: tbl.Between([]interface{}{0, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3973,11 +3973,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1103 /* [2] */ var expected_ []interface{} = []interface{}{2} - /* table_test_sindex_api.between([0, 1], [1, 1], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], [1, 1], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1103: table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1103: tbl.Between([]interface{}{0, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -3988,11 +3988,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1107 /* [2] */ var expected_ []interface{} = []interface{}{2} - /* table_test_sindex_api.between([0, 1], [1, 1], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], [1, 1], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1107: table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1107: tbl.Between([]interface{}{0, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4003,11 +4003,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1111 /* [2, 3, 4] */ var expected_ []interface{} = []interface{}{2, 3, 4} - /* table_test_sindex_api.between([0, 1], r.maxval, index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], r.maxval, index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1111: table_test_sindex_api.Between([]interface{}{0, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1111: tbl.Between([]interface{}{0, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4018,11 +4018,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1115 /* [2, 3, 4] */ var expected_ []interface{} = []interface{}{2, 3, 4} - /* table_test_sindex_api.between([0, 1], r.maxval, index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], r.maxval, index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1115: table_test_sindex_api.Between([]interface{}{0, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1115: tbl.Between([]interface{}{0, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4033,11 +4033,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1120 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([0, 1], [0, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], [0, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1120: table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1120: tbl.Between([]interface{}{0, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4048,11 +4048,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1124 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([0, 1], [0, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], [0, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1124: table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1124: tbl.Between([]interface{}{0, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4063,11 +4063,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1128 /* [2] */ var expected_ []interface{} = []interface{}{2} - /* table_test_sindex_api.between([0, 1], [0, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], [0, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1128: table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1128: tbl.Between([]interface{}{0, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4078,11 +4078,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1132 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([0, 1], [0, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], [0, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1132: table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1132: tbl.Between([]interface{}{0, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4093,11 +4093,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1136 /* [2] */ var expected_ []interface{} = []interface{}{2} - /* table_test_sindex_api.between([0, 1], [1, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], [1, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1136: table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1136: tbl.Between([]interface{}{0, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4108,11 +4108,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1140 /* [2] */ var expected_ []interface{} = []interface{}{2} - /* table_test_sindex_api.between([0, 1], [1, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], [1, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1140: table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1140: tbl.Between([]interface{}{0, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4123,11 +4123,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1144 /* [2, 3] */ var expected_ []interface{} = []interface{}{2, 3} - /* table_test_sindex_api.between([0, 1], [1, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], [1, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1144: table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1144: tbl.Between([]interface{}{0, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4138,11 +4138,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1148 /* [2, 3] */ var expected_ []interface{} = []interface{}{2, 3} - /* table_test_sindex_api.between([0, 1], [1, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], [1, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1148: table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1148: tbl.Between([]interface{}{0, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4153,11 +4153,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1152 /* [2, 3, 4] */ var expected_ []interface{} = []interface{}{2, 3, 4} - /* table_test_sindex_api.between([0, 1], r.maxval, index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], r.maxval, index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1152: table_test_sindex_api.Between([]interface{}{0, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1152: tbl.Between([]interface{}{0, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4168,11 +4168,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1156 /* [2, 3, 4] */ var expected_ []interface{} = []interface{}{2, 3, 4} - /* table_test_sindex_api.between([0, 1], r.maxval, index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([0, 1], r.maxval, index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1156: table_test_sindex_api.Between([]interface{}{0, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1156: tbl.Between([]interface{}{0, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{0, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{0, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4183,11 +4183,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1161 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 0], [0, 0], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], [0, 0], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1161: table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1161: tbl.Between([]interface{}{1, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4198,11 +4198,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1165 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 0], [0, 0], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], [0, 0], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1165: table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1165: tbl.Between([]interface{}{1, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4213,11 +4213,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1169 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 0], [0, 1], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], [0, 1], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1169: table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1169: tbl.Between([]interface{}{1, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4228,11 +4228,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1173 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 0], [0, 1], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], [0, 1], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1173: table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1173: tbl.Between([]interface{}{1, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4243,11 +4243,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1177 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 0], [1, 0], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], [1, 0], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1177: table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1177: tbl.Between([]interface{}{1, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4258,11 +4258,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1181 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 0], [1, 0], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], [1, 0], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1181: table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1181: tbl.Between([]interface{}{1, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4273,11 +4273,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1185 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 0], [1, 1], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], [1, 1], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1185: table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1185: tbl.Between([]interface{}{1, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4288,11 +4288,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1189 /* [2] */ var expected_ []interface{} = []interface{}{2} - /* table_test_sindex_api.between([1, 0], [1, 1], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], [1, 1], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1189: table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1189: tbl.Between([]interface{}{1, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4303,11 +4303,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1193 /* [3, 4] */ var expected_ []interface{} = []interface{}{3, 4} - /* table_test_sindex_api.between([1, 0], r.maxval, index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], r.maxval, index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1193: table_test_sindex_api.Between([]interface{}{1, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1193: tbl.Between([]interface{}{1, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4318,11 +4318,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1197 /* [2, 3, 4] */ var expected_ []interface{} = []interface{}{2, 3, 4} - /* table_test_sindex_api.between([1, 0], r.maxval, index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], r.maxval, index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1197: table_test_sindex_api.Between([]interface{}{1, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1197: tbl.Between([]interface{}{1, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4333,11 +4333,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1202 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 0], [0, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], [0, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1202: table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1202: tbl.Between([]interface{}{1, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4348,11 +4348,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1206 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 0], [0, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], [0, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1206: table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1206: tbl.Between([]interface{}{1, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4363,11 +4363,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1210 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 0], [0, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], [0, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1210: table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1210: tbl.Between([]interface{}{1, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4378,11 +4378,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1214 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 0], [0, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], [0, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1214: table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1214: tbl.Between([]interface{}{1, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4393,11 +4393,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1218 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 0], [1, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], [1, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1218: table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1218: tbl.Between([]interface{}{1, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4408,11 +4408,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1222 /* [2] */ var expected_ []interface{} = []interface{}{2} - /* table_test_sindex_api.between([1, 0], [1, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], [1, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1222: table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1222: tbl.Between([]interface{}{1, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4423,11 +4423,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1226 /* [3] */ var expected_ []interface{} = []interface{}{3} - /* table_test_sindex_api.between([1, 0], [1, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], [1, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1226: table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1226: tbl.Between([]interface{}{1, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4438,11 +4438,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1230 /* [2, 3] */ var expected_ []interface{} = []interface{}{2, 3} - /* table_test_sindex_api.between([1, 0], [1, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], [1, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1230: table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1230: tbl.Between([]interface{}{1, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4453,11 +4453,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1234 /* [3, 4] */ var expected_ []interface{} = []interface{}{3, 4} - /* table_test_sindex_api.between([1, 0], r.maxval, index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], r.maxval, index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1234: table_test_sindex_api.Between([]interface{}{1, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1234: tbl.Between([]interface{}{1, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4468,11 +4468,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1238 /* [2, 3, 4] */ var expected_ []interface{} = []interface{}{2, 3, 4} - /* table_test_sindex_api.between([1, 0], r.maxval, index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 0], r.maxval, index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1238: table_test_sindex_api.Between([]interface{}{1, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1238: tbl.Between([]interface{}{1, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 0}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4483,11 +4483,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1243 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 1], [0, 0], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], [0, 0], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1243: table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1243: tbl.Between([]interface{}{1, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4498,11 +4498,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1247 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 1], [0, 0], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], [0, 0], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1247: table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1247: tbl.Between([]interface{}{1, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4513,11 +4513,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1251 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 1], [0, 1], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], [0, 1], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1251: table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1251: tbl.Between([]interface{}{1, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4528,11 +4528,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1255 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 1], [0, 1], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], [0, 1], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1255: table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1255: tbl.Between([]interface{}{1, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4543,11 +4543,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1259 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 1], [1, 0], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], [1, 0], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1259: table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1259: tbl.Between([]interface{}{1, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4558,11 +4558,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1263 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 1], [1, 0], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], [1, 0], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1263: table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1263: tbl.Between([]interface{}{1, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4573,11 +4573,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1267 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 1], [1, 1], index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], [1, 1], index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1267: table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1267: tbl.Between([]interface{}{1, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4588,11 +4588,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1271 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 1], [1, 1], index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], [1, 1], index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1271: table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1271: tbl.Between([]interface{}{1, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4603,11 +4603,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1275 /* [3, 4] */ var expected_ []interface{} = []interface{}{3, 4} - /* table_test_sindex_api.between([1, 1], r.maxval, index='bc').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], r.maxval, index='bc').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1275: table_test_sindex_api.Between([]interface{}{1, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1275: tbl.Between([]interface{}{1, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4618,11 +4618,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1279 /* [3, 4] */ var expected_ []interface{} = []interface{}{3, 4} - /* table_test_sindex_api.between([1, 1], r.maxval, index='cb').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], r.maxval, index='cb').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1279: table_test_sindex_api.Between([]interface{}{1, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1279: tbl.Between([]interface{}{1, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4633,11 +4633,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1284 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 1], [0, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], [0, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1284: table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1284: tbl.Between([]interface{}{1, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4648,11 +4648,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1288 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 1], [0, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], [0, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1288: table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1288: tbl.Between([]interface{}{1, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, []interface{}{0, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4663,11 +4663,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1292 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 1], [0, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], [0, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1292: table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1292: tbl.Between([]interface{}{1, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4678,11 +4678,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1296 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 1], [0, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], [0, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1296: table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1296: tbl.Between([]interface{}{1, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, []interface{}{0, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4693,11 +4693,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1300 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 1], [1, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], [1, 0], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1300: table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1300: tbl.Between([]interface{}{1, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4708,11 +4708,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1304 /* [] */ var expected_ []interface{} = []interface{}{} - /* table_test_sindex_api.between([1, 1], [1, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], [1, 0], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1304: table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1304: tbl.Between([]interface{}{1, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, []interface{}{1, 0}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4723,11 +4723,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1308 /* [3] */ var expected_ []interface{} = []interface{}{3} - /* table_test_sindex_api.between([1, 1], [1, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], [1, 1], index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1308: table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1308: tbl.Between([]interface{}{1, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4738,11 +4738,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1312 /* [3] */ var expected_ []interface{} = []interface{}{3} - /* table_test_sindex_api.between([1, 1], [1, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], [1, 1], index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1312: table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1312: tbl.Between([]interface{}{1, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, []interface{}{1, 1}).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4753,11 +4753,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1316 /* [3, 4] */ var expected_ []interface{} = []interface{}{3, 4} - /* table_test_sindex_api.between([1, 1], r.maxval, index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], r.maxval, index='bc', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1316: table_test_sindex_api.Between([]interface{}{1, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1316: tbl.Between([]interface{}{1, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'bc', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "bc", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4768,11 +4768,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1320 /* [3, 4] */ var expected_ []interface{} = []interface{}{3, 4} - /* table_test_sindex_api.between([1, 1], r.maxval, index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between([1, 1], r.maxval, index='cb', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1320: table_test_sindex_api.Between([]interface{}{1, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1320: tbl.Between([]interface{}{1, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: 'cb', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between([]interface{}{1, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between([]interface{}{1, 1}, r.MaxVal).OptArgs(r.BetweenOpts{Index: "cb", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4783,11 +4783,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1325 /* [0,0,0] */ var expected_ []interface{} = []interface{}{0, 0, 0} - /* table_test_sindex_api.between(1, 3, index='mi', right_bound='closed').map(lambda x:x['id']) */ + /* tbl.between(1, 3, index='mi', right_bound='closed').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1325: table_test_sindex_api.Between(1, 3).OptArgs(r.BetweenOpts{Index: 'mi', RightBound: 'closed', }).Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1325: tbl.Between(1, 3).OptArgs(r.BetweenOpts{Index: 'mi', RightBound: 'closed', }).Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(1, 3).OptArgs(r.BetweenOpts{Index: "mi", RightBound: "closed"}).Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(1, 3).OptArgs(r.BetweenOpts{Index: "mi", RightBound: "closed"}).Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4798,11 +4798,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1330 /* [0,0,0,1,1,1,2,3,3,3,4,4,4] */ var expected_ []interface{} = []interface{}{0, 0, 0, 1, 1, 1, 2, 3, 3, 3, 4, 4, 4} - /* table_test_sindex_api.between(1, 16, index='mi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ + /* tbl.between(1, 16, index='mi', right_bound='closed').order_by('id').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1330: table_test_sindex_api.Between(1, 16).OptArgs(r.BetweenOpts{Index: 'mi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1330: tbl.Between(1, 16).OptArgs(r.BetweenOpts{Index: 'mi', RightBound: 'closed', }).OrderBy('id').Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(1, 16).OptArgs(r.BetweenOpts{Index: "mi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(1, 16).OptArgs(r.BetweenOpts{Index: "mi", RightBound: "closed"}).OrderBy("id").Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4813,11 +4813,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1335 /* [0,0,0,1,1,1,2,3,3,3,4,4,4] */ var expected_ []interface{} = []interface{}{0, 0, 0, 1, 1, 1, 2, 3, 3, 3, 4, 4, 4} - /* table_test_sindex_api.order_by(index='mi').map(lambda x:x['id']) */ + /* tbl.order_by(index='mi').map(lambda x:x['id']) */ - suite.T().Log("About to run line #1335: table_test_sindex_api.OrderBy().OptArgs(r.OrderByOpts{Index: 'mi', }).Map(func(x r.Term) interface{} { return x.AtIndex('id')})") + suite.T().Log("About to run line #1335: tbl.OrderBy().OptArgs(r.OrderByOpts{Index: 'mi', }).Map(func(x r.Term) interface{} { return x.AtIndex('id')})") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.OrderBy().OptArgs(r.OrderByOpts{Index: "mi"}).Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.OrderBy().OptArgs(r.OrderByOpts{Index: "mi"}).Map(func(x r.Term) interface{} { return x.AtIndex("id") }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4828,11 +4828,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1341 /* [2, 3] */ var expected_ []interface{} = []interface{}{2, 3} - /* table_test_sindex_api.between(0, 1, index='c', right_bound='closed', left_bound='open').order_by('id')['id'] */ + /* tbl.between(0, 1, index='c', right_bound='closed', left_bound='open').order_by('id')['id'] */ - suite.T().Log("About to run line #1341: table_test_sindex_api.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', LeftBound: 'open', }).OrderBy('id').AtIndex('id')") + suite.T().Log("About to run line #1341: tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'c', RightBound: 'closed', LeftBound: 'open', }).OrderBy('id').AtIndex('id')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 1).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed", LeftBound: "open"}).OrderBy("id").AtIndex("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: "c", RightBound: "closed", LeftBound: "open"}).OrderBy("id").AtIndex("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -4843,11 +4843,11 @@ func (suite *SindexApiSuite) TestCases() { // sindex/api.yaml line #1345 /* [1] */ var expected_ []interface{} = []interface{}{1} - /* table_test_sindex_api.between(0, 1, index='id', right_bound='closed', left_bound='open').order_by('id')['id'] */ + /* tbl.between(0, 1, index='id', right_bound='closed', left_bound='open').order_by('id')['id'] */ - suite.T().Log("About to run line #1345: table_test_sindex_api.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', LeftBound: 'open', }).OrderBy('id').AtIndex('id')") + suite.T().Log("About to run line #1345: tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: 'id', RightBound: 'closed', LeftBound: 'open', }).OrderBy('id').AtIndex('id')") - runAndAssert(suite.Suite, expected_, table_test_sindex_api.Between(0, 1).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed", LeftBound: "open"}).OrderBy("id").AtIndex("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(0, 1).OptArgs(r.BetweenOpts{Index: "id", RightBound: "closed", LeftBound: "open"}).OrderBy("id").AtIndex("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_sindex_nullsinstrings_test.go b/internal/integration/reql_tests/reql_sindex_nullsinstrings_test.go index 51ae2f27..501d8a35 100644 --- a/internal/integration/reql_tests/reql_sindex_nullsinstrings_test.go +++ b/internal/integration/reql_tests/reql_sindex_nullsinstrings_test.go @@ -36,16 +36,16 @@ func (suite *SindexNullsinstringsSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_sindex_null").Exec(suite.session) - err = r.DBCreate("db_sindex_null").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_sindex_null").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_sindex_null").TableDrop("table_test_sindex_nullstr").Exec(suite.session) - err = r.DB("db_sindex_null").TableCreate("table_test_sindex_nullstr").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_sindex_null").Table("table_test_sindex_nullstr").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -54,8 +54,8 @@ func (suite *SindexNullsinstringsSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_sindex_null").TableDrop("table_test_sindex_nullstr").Exec(suite.session) - r.DBDrop("db_sindex_null").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -64,18 +64,18 @@ func (suite *SindexNullsinstringsSuite) TearDownSuite() { func (suite *SindexNullsinstringsSuite) TestCases() { suite.T().Log("Running SindexNullsinstringsSuite: sindex nulls in strings") - table_test_sindex_nullstr := r.DB("db_sindex_null").Table("table_test_sindex_nullstr") - _ = table_test_sindex_nullstr // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors { // sindex/nullsinstrings.yaml line #4 /* ({"created":1}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_nullstr.index_create("key") */ + /* tbl.index_create("key") */ - suite.T().Log("About to run line #4: table_test_sindex_nullstr.IndexCreate('key')") + suite.T().Log("About to run line #4: tbl.IndexCreate('key')") - runAndAssert(suite.Suite, expected_, table_test_sindex_nullstr.IndexCreate("key"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreate("key"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -86,11 +86,11 @@ func (suite *SindexNullsinstringsSuite) TestCases() { // sindex/nullsinstrings.yaml line #6 /* ([{"ready":true}]) */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"ready": true}} - /* table_test_sindex_nullstr.index_wait().pluck("ready") */ + /* tbl.index_wait().pluck("ready") */ - suite.T().Log("About to run line #6: table_test_sindex_nullstr.IndexWait().Pluck('ready')") + suite.T().Log("About to run line #6: tbl.IndexWait().Pluck('ready')") - runAndAssert(suite.Suite, expected_, table_test_sindex_nullstr.IndexWait().Pluck("ready"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexWait().Pluck("ready"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -101,11 +101,11 @@ func (suite *SindexNullsinstringsSuite) TestCases() { // sindex/nullsinstrings.yaml line #10 /* ({"inserted":2}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"inserted": 2} - /* table_test_sindex_nullstr.insert([{"id":1,"key":["a","b"]},{"id":2,"key":["a\u0000Sb"]}]).pluck("inserted") */ + /* tbl.insert([{"id":1,"key":["a","b"]},{"id":2,"key":["a\u0000Sb"]}]).pluck("inserted") */ - suite.T().Log("About to run line #10: table_test_sindex_nullstr.Insert([]interface{}{map[interface{}]interface{}{'id': 1, 'key': []interface{}{'a', 'b'}, }, map[interface{}]interface{}{'id': 2, 'key': []interface{}{'a\\u0000Sb'}, }}).Pluck('inserted')") + suite.T().Log("About to run line #10: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': 1, 'key': []interface{}{'a', 'b'}, }, map[interface{}]interface{}{'id': 2, 'key': []interface{}{'a\\u0000Sb'}, }}).Pluck('inserted')") - runAndAssert(suite.Suite, expected_, table_test_sindex_nullstr.Insert([]interface{}{map[interface{}]interface{}{"id": 1, "key": []interface{}{"a", "b"}}, map[interface{}]interface{}{"id": 2, "key": []interface{}{"a\u0000Sb"}}}).Pluck("inserted"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": 1, "key": []interface{}{"a", "b"}}, map[interface{}]interface{}{"id": 2, "key": []interface{}{"a\u0000Sb"}}}).Pluck("inserted"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -116,11 +116,11 @@ func (suite *SindexNullsinstringsSuite) TestCases() { // sindex/nullsinstrings.yaml line #13 /* ([{"id":2}]) */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"id": 2}} - /* table_test_sindex_nullstr.get_all(["a\u0000Sb"], index="key").pluck("id") */ + /* tbl.get_all(["a\u0000Sb"], index="key").pluck("id") */ - suite.T().Log("About to run line #13: table_test_sindex_nullstr.GetAll([]interface{}{'a\\u0000Sb'}).OptArgs(r.GetAllOpts{Index: 'key', }).Pluck('id')") + suite.T().Log("About to run line #13: tbl.GetAll([]interface{}{'a\\u0000Sb'}).OptArgs(r.GetAllOpts{Index: 'key', }).Pluck('id')") - runAndAssert(suite.Suite, expected_, table_test_sindex_nullstr.GetAll([]interface{}{"a\u0000Sb"}).OptArgs(r.GetAllOpts{Index: "key"}).Pluck("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll([]interface{}{"a\u0000Sb"}).OptArgs(r.GetAllOpts{Index: "key"}).Pluck("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -131,11 +131,11 @@ func (suite *SindexNullsinstringsSuite) TestCases() { // sindex/nullsinstrings.yaml line #18 /* ([{"id":1}]) */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"id": 1}} - /* table_test_sindex_nullstr.get_all(["a","b"], index="key").pluck("id") */ + /* tbl.get_all(["a","b"], index="key").pluck("id") */ - suite.T().Log("About to run line #18: table_test_sindex_nullstr.GetAll([]interface{}{'a', 'b'}).OptArgs(r.GetAllOpts{Index: 'key', }).Pluck('id')") + suite.T().Log("About to run line #18: tbl.GetAll([]interface{}{'a', 'b'}).OptArgs(r.GetAllOpts{Index: 'key', }).Pluck('id')") - runAndAssert(suite.Suite, expected_, table_test_sindex_nullstr.GetAll([]interface{}{"a", "b"}).OptArgs(r.GetAllOpts{Index: "key"}).Pluck("id"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.GetAll([]interface{}{"a", "b"}).OptArgs(r.GetAllOpts{Index: "key"}).Pluck("id"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_sindex_status_test.go b/internal/integration/reql_tests/reql_sindex_status_test.go index 468d072b..03871f92 100644 --- a/internal/integration/reql_tests/reql_sindex_status_test.go +++ b/internal/integration/reql_tests/reql_sindex_status_test.go @@ -36,16 +36,16 @@ func (suite *SindexStatusSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_sindex_st").Exec(suite.session) - err = r.DBCreate("db_sindex_st").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_sindex_st").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_sindex_st").TableDrop("table_test_sindex_status2").Exec(suite.session) - err = r.DB("db_sindex_st").TableCreate("table_test_sindex_status2").Exec(suite.session) + r.DB("test").TableDrop("tbl2").Exec(suite.session) + err = r.DB("test").TableCreate("tbl2").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_sindex_st").Table("table_test_sindex_status2").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl2").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -54,8 +54,8 @@ func (suite *SindexStatusSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_sindex_st").TableDrop("table_test_sindex_status2").Exec(suite.session) - r.DBDrop("db_sindex_st").Exec(suite.session) + r.DB("test").TableDrop("tbl2").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -64,18 +64,18 @@ func (suite *SindexStatusSuite) TearDownSuite() { func (suite *SindexStatusSuite) TestCases() { suite.T().Log("Running SindexStatusSuite: sindex status") - table_test_sindex_status2 := r.DB("db_sindex_st").Table("table_test_sindex_status2") - _ = table_test_sindex_status2 // Prevent any noused variable errors + tbl2 := r.DB("test").Table("tbl2") + _ = tbl2 // Prevent any noused variable errors { // sindex/status.yaml line #7 /* ({'created':1}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_status2.index_create("a") */ + /* tbl2.index_create("a") */ - suite.T().Log("About to run line #7: table_test_sindex_status2.IndexCreate('a')") + suite.T().Log("About to run line #7: tbl2.IndexCreate('a')") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexCreate("a"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexCreate("a"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -86,11 +86,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #9 /* ({'created':1}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_status2.index_create("b") */ + /* tbl2.index_create("b") */ - suite.T().Log("About to run line #9: table_test_sindex_status2.IndexCreate('b')") + suite.T().Log("About to run line #9: tbl2.IndexCreate('b')") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexCreate("b"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexCreate("b"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -101,11 +101,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #12 /* 2 */ var expected_ int = 2 - /* table_test_sindex_status2.index_status().count() */ + /* tbl2.index_status().count() */ - suite.T().Log("About to run line #12: table_test_sindex_status2.IndexStatus().Count()") + suite.T().Log("About to run line #12: tbl2.IndexStatus().Count()") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexStatus().Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexStatus().Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -116,11 +116,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #14 /* 1 */ var expected_ int = 1 - /* table_test_sindex_status2.index_status("a").count() */ + /* tbl2.index_status("a").count() */ - suite.T().Log("About to run line #14: table_test_sindex_status2.IndexStatus('a').Count()") + suite.T().Log("About to run line #14: tbl2.IndexStatus('a').Count()") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexStatus("a").Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexStatus("a").Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -131,11 +131,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #16 /* 1 */ var expected_ int = 1 - /* table_test_sindex_status2.index_status("b").count() */ + /* tbl2.index_status("b").count() */ - suite.T().Log("About to run line #16: table_test_sindex_status2.IndexStatus('b').Count()") + suite.T().Log("About to run line #16: tbl2.IndexStatus('b').Count()") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexStatus("b").Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexStatus("b").Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -146,11 +146,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #18 /* 2 */ var expected_ int = 2 - /* table_test_sindex_status2.index_status("a", "b").count() */ + /* tbl2.index_status("a", "b").count() */ - suite.T().Log("About to run line #18: table_test_sindex_status2.IndexStatus('a', 'b').Count()") + suite.T().Log("About to run line #18: tbl2.IndexStatus('a', 'b').Count()") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexStatus("a", "b").Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexStatus("a", "b").Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -161,11 +161,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #21 /* ({'dropped':1}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"dropped": 1} - /* table_test_sindex_status2.index_drop("a") */ + /* tbl2.index_drop("a") */ - suite.T().Log("About to run line #21: table_test_sindex_status2.IndexDrop('a')") + suite.T().Log("About to run line #21: tbl2.IndexDrop('a')") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexDrop("a"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexDrop("a"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -176,11 +176,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #23 /* ({'dropped':1}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"dropped": 1} - /* table_test_sindex_status2.index_drop("b") */ + /* tbl2.index_drop("b") */ - suite.T().Log("About to run line #23: table_test_sindex_status2.IndexDrop('b')") + suite.T().Log("About to run line #23: tbl2.IndexDrop('b')") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexDrop("b"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexDrop("b"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -191,11 +191,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #28 /* partial({'inserted':5000}) */ var expected_ compare.Expected = compare.PartialMatch(map[interface{}]interface{}{"inserted": 5000}) - /* table_test_sindex_status2.insert(r.range(0, 5000).map({'a':r.row})) */ + /* tbl2.insert(r.range(0, 5000).map({'a':r.row})) */ - suite.T().Log("About to run line #28: table_test_sindex_status2.Insert(r.Range(0, 5000).Map(map[interface{}]interface{}{'a': r.Row, }))") + suite.T().Log("About to run line #28: tbl2.Insert(r.Range(0, 5000).Map(map[interface{}]interface{}{'a': r.Row, }))") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.Insert(r.Range(0, 5000).Map(map[interface{}]interface{}{"a": r.Row})), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.Insert(r.Range(0, 5000).Map(map[interface{}]interface{}{"a": r.Row})), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -206,11 +206,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #33 /* ({'created':1}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_status2.index_create("foo") */ + /* tbl2.index_create("foo") */ - suite.T().Log("About to run line #33: table_test_sindex_status2.IndexCreate('foo')") + suite.T().Log("About to run line #33: tbl2.IndexCreate('foo')") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexCreate("foo"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexCreate("foo"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -221,11 +221,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #36 /* ({'created':1}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_status2.index_create("bar", multi=True) */ + /* tbl2.index_create("bar", multi=True) */ - suite.T().Log("About to run line #36: table_test_sindex_status2.IndexCreate('bar').OptArgs(r.IndexCreateOpts{Multi: true, })") + suite.T().Log("About to run line #36: tbl2.IndexCreate('bar').OptArgs(r.IndexCreateOpts{Multi: true, })") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexCreate("bar").OptArgs(r.IndexCreateOpts{Multi: true}), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexCreate("bar").OptArgs(r.IndexCreateOpts{Multi: true}), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -236,11 +236,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #44 /* [true, true] */ var expected_ []interface{} = []interface{}{true, true} - /* table_test_sindex_status2.index_status().map(lambda x:x["progress"] < 1) */ + /* tbl2.index_status().map(lambda x:x["progress"] < 1) */ - suite.T().Log("About to run line #44: table_test_sindex_status2.IndexStatus().Map(func(x r.Term) interface{} { return x.AtIndex('progress').Lt(1)})") + suite.T().Log("About to run line #44: tbl2.IndexStatus().Map(func(x r.Term) interface{} { return x.AtIndex('progress').Lt(1)})") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexStatus().Map(func(x r.Term) interface{} { return x.AtIndex("progress").Lt(1) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexStatus().Map(func(x r.Term) interface{} { return x.AtIndex("progress").Lt(1) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -251,11 +251,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #49 /* ([true, true]) */ var expected_ []interface{} = []interface{}{true, true} - /* table_test_sindex_status2.index_wait()['ready'] */ + /* tbl2.index_wait()['ready'] */ - suite.T().Log("About to run line #49: table_test_sindex_status2.IndexWait().AtIndex('ready')") + suite.T().Log("About to run line #49: tbl2.IndexWait().AtIndex('ready')") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexWait().AtIndex("ready"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexWait().AtIndex("ready"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -266,11 +266,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #54 /* bag([false, false]) */ var expected_ compare.Expected = compare.UnorderedMatch([]interface{}{false, false}) - /* table_test_sindex_status2.index_wait()['geo'] */ + /* tbl2.index_wait()['geo'] */ - suite.T().Log("About to run line #54: table_test_sindex_status2.IndexWait().AtIndex('geo')") + suite.T().Log("About to run line #54: tbl2.IndexWait().AtIndex('geo')") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexWait().AtIndex("geo"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexWait().AtIndex("geo"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -281,11 +281,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #57 /* bag([false, true]) */ var expected_ compare.Expected = compare.UnorderedMatch([]interface{}{false, true}) - /* table_test_sindex_status2.index_wait()['multi'] */ + /* tbl2.index_wait()['multi'] */ - suite.T().Log("About to run line #57: table_test_sindex_status2.IndexWait().AtIndex('multi')") + suite.T().Log("About to run line #57: tbl2.IndexWait().AtIndex('multi')") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexWait().AtIndex("multi"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexWait().AtIndex("multi"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -296,11 +296,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #60 /* ([false, false]) */ var expected_ []interface{} = []interface{}{false, false} - /* table_test_sindex_status2.index_wait()['outdated'] */ + /* tbl2.index_wait()['outdated'] */ - suite.T().Log("About to run line #60: table_test_sindex_status2.IndexWait().AtIndex('outdated')") + suite.T().Log("About to run line #60: tbl2.IndexWait().AtIndex('outdated')") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexWait().AtIndex("outdated"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexWait().AtIndex("outdated"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -311,11 +311,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #63 /* ({'created':1}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_sindex_status2.index_create("quux") */ + /* tbl2.index_create("quux") */ - suite.T().Log("About to run line #63: table_test_sindex_status2.IndexCreate('quux')") + suite.T().Log("About to run line #63: tbl2.IndexCreate('quux')") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexCreate("quux"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexCreate("quux"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -326,11 +326,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #66 /* true */ var expected_ bool = true - /* table_test_sindex_status2.index_status("quux").do(lambda x:(x[0]["index"] == "quux") & (x[0]["progress"] < 1)) */ + /* tbl2.index_status("quux").do(lambda x:(x[0]["index"] == "quux") & (x[0]["progress"] < 1)) */ - suite.T().Log("About to run line #66: table_test_sindex_status2.IndexStatus('quux').Do(func(x r.Term) interface{} { return x.AtIndex(0).AtIndex('index').Eq('quux').And(x.AtIndex(0).AtIndex('progress').Lt(1))})") + suite.T().Log("About to run line #66: tbl2.IndexStatus('quux').Do(func(x r.Term) interface{} { return x.AtIndex(0).AtIndex('index').Eq('quux').And(x.AtIndex(0).AtIndex('progress').Lt(1))})") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexStatus("quux").Do(func(x r.Term) interface{} { + runAndAssert(suite.Suite, expected_, tbl2.IndexStatus("quux").Do(func(x r.Term) interface{} { return x.AtIndex(0).AtIndex("index").Eq("quux").And(x.AtIndex(0).AtIndex("progress").Lt(1)) }), suite.session, r.RunOpts{ GeometryFormat: "raw", @@ -343,11 +343,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #71 /* ([{'index':'quux', 'ready':true}]) */ var expected_ []interface{} = []interface{}{map[interface{}]interface{}{"index": "quux", "ready": true}} - /* table_test_sindex_status2.index_wait("quux").pluck('index', 'ready') */ + /* tbl2.index_wait("quux").pluck('index', 'ready') */ - suite.T().Log("About to run line #71: table_test_sindex_status2.IndexWait('quux').Pluck('index', 'ready')") + suite.T().Log("About to run line #71: tbl2.IndexWait('quux').Pluck('index', 'ready')") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexWait("quux").Pluck("index", "ready"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexWait("quux").Pluck("index", "ready"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -358,11 +358,11 @@ func (suite *SindexStatusSuite) TestCases() { // sindex/status.yaml line #74 /* ("PTYPE") */ var expected_ string = "PTYPE" - /* table_test_sindex_status2.index_wait("quux").nth(0).get_field('function').type_of() */ + /* tbl2.index_wait("quux").nth(0).get_field('function').type_of() */ - suite.T().Log("About to run line #74: table_test_sindex_status2.IndexWait('quux').Nth(0).Field('function').TypeOf()") + suite.T().Log("About to run line #74: tbl2.IndexWait('quux').Nth(0).Field('function').TypeOf()") - runAndAssert(suite.Suite, expected_, table_test_sindex_status2.IndexWait("quux").Nth(0).Field("function").TypeOf(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl2.IndexWait("quux").Nth(0).Field("function").TypeOf(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) diff --git a/internal/integration/reql_tests/reql_timeout_test.go b/internal/integration/reql_tests/reql_timeout_test.go index 0a15306a..3ec26b20 100644 --- a/internal/integration/reql_tests/reql_timeout_test.go +++ b/internal/integration/reql_tests/reql_timeout_test.go @@ -36,10 +36,10 @@ func (suite *TimeoutSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_timeout").Exec(suite.session) - err = r.DBCreate("db_timeout").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_timeout").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *TimeoutSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_timeout").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -59,7 +59,6 @@ func (suite *TimeoutSuite) TestCases() { suite.T().Log("Running TimeoutSuite: Tests timeouts.") { - // r.JS default timeout is 5 sec // timeout.yaml line #5 /* err("ReqlQueryLogicError", "JavaScript query `while(true) {}` timed out after 5.000 seconds.", [0]) */ var expected_ Err = err("ReqlQueryLogicError", "JavaScript query `while(true) {}` timed out after 5.000 seconds.") diff --git a/internal/integration/reql_tests/reql_times_api_test.go b/internal/integration/reql_tests/reql_times_api_test.go index 39e66acc..e1bff8e5 100644 --- a/internal/integration/reql_tests/reql_times_api_test.go +++ b/internal/integration/reql_tests/reql_times_api_test.go @@ -36,10 +36,10 @@ func (suite *TimesApiSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_timesapi").Exec(suite.session) - err = r.DBCreate("db_timesapi").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_timesapi").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *TimesApiSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_timesapi").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } diff --git a/internal/integration/reql_tests/reql_times_constructors_test.go b/internal/integration/reql_tests/reql_times_constructors_test.go index 59ef3443..05e59f7f 100644 --- a/internal/integration/reql_tests/reql_times_constructors_test.go +++ b/internal/integration/reql_tests/reql_times_constructors_test.go @@ -36,10 +36,10 @@ func (suite *TimesConstructorsSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_timesctor").Exec(suite.session) - err = r.DBCreate("db_timesctor").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_timesctor").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -49,7 +49,7 @@ func (suite *TimesConstructorsSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DBDrop("db_timesctor").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -209,174 +209,159 @@ func (suite *TimesConstructorsSuite) TestCases() { } { - // times/constructors.yaml line #48 - /* 10000 */ - var expected_ int = 10000 - /* r.epoch_time(253430000000).year() */ + // times/constructors.yaml line #49 + /* "1970-01-01T00:00:01.444+00:00" */ + var expected_ string = "1970-01-01T00:00:01.444+00:00" + /* r.epoch_time(1.444).to_iso8601() */ - suite.T().Log("About to run line #48: r.EpochTime(253430000000).Year()") + suite.T().Log("About to run line #49: r.EpochTime(1.444).ToISO8601()") - runAndAssert(suite.Suite, expected_, r.EpochTime(253430000000).Year(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.EpochTime(1.444).ToISO8601(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #48") + suite.T().Log("Finished running line #49") } { - // times/constructors.yaml line #50 - /* err("ReqlQueryLogicError", "Year `10000` out of valid ISO 8601 range [0, 9999].", []) */ - var expected_ Err = err("ReqlQueryLogicError", "Year `10000` out of valid ISO 8601 range [0, 9999].") - /* r.epoch_time(253430000000).to_iso8601() */ + // times/constructors.yaml line #52 + /* "1970-01-01T00:00:01.001+00:00" */ + var expected_ string = "1970-01-01T00:00:01.001+00:00" + /* r.epoch_time(1.001).to_iso8601() */ - suite.T().Log("About to run line #50: r.EpochTime(253430000000).ToISO8601()") + suite.T().Log("About to run line #52: r.EpochTime(1.001).ToISO8601()") - runAndAssert(suite.Suite, expected_, r.EpochTime(253430000000).ToISO8601(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.EpochTime(1.001).ToISO8601(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #50") + suite.T().Log("Finished running line #52") } { - // times/constructors.yaml line #53 - /* err("ReqlQueryLogicError", "Error in time logic: Year is out of valid range: 1400..10000.", []) */ - var expected_ Err = err("ReqlQueryLogicError", "Error in time logic: Year is out of valid range: 1400..10000.") - /* r.epoch_time(253440000000).year() */ + // times/constructors.yaml line #55 + /* "1970-01-01T00:00:02.058+00:00" */ + var expected_ string = "1970-01-01T00:00:02.058+00:00" + /* r.epoch_time(2.058).to_iso8601() */ - suite.T().Log("About to run line #53: r.EpochTime(253440000000).Year()") + suite.T().Log("About to run line #55: r.EpochTime(2.058).ToISO8601()") - runAndAssert(suite.Suite, expected_, r.EpochTime(253440000000).Year(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, r.EpochTime(2.058).ToISO8601(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #53") + suite.T().Log("Finished running line #55") } { - // times/constructors.yaml line #55 + // times/constructors.yaml line #66 /* 253440000000 */ var expected_ int = 253440000000 /* r.epoch_time(253440000000).to_epoch_time() */ - suite.T().Log("About to run line #55: r.EpochTime(253440000000).ToEpochTime()") + suite.T().Log("About to run line #66: r.EpochTime(253440000000).ToEpochTime()") runAndAssert(suite.Suite, expected_, r.EpochTime(253440000000).ToEpochTime(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #55") + suite.T().Log("Finished running line #66") } { - // times/constructors.yaml line #57 + // times/constructors.yaml line #68 /* 1400 */ var expected_ int = 1400 /* r.epoch_time(-17980000000).year() */ - suite.T().Log("About to run line #57: r.EpochTime(-17980000000).Year()") + suite.T().Log("About to run line #68: r.EpochTime(-17980000000).Year()") runAndAssert(suite.Suite, expected_, r.EpochTime(-17980000000).Year(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #57") - } - - { - // times/constructors.yaml line #59 - /* err("ReqlQueryLogicError", "Error in time logic: Year is out of valid range: 1400..10000.", []) */ - var expected_ Err = err("ReqlQueryLogicError", "Error in time logic: Year is out of valid range: 1400..10000.") - /* r.epoch_time(-17990000000).year() */ - - suite.T().Log("About to run line #59: r.EpochTime(-17990000000).Year()") - - runAndAssert(suite.Suite, expected_, r.EpochTime(-17990000000).Year(), suite.session, r.RunOpts{ - GeometryFormat: "raw", - GroupFormat: "map", - }) - suite.T().Log("Finished running line #59") + suite.T().Log("Finished running line #68") } { - // times/constructors.yaml line #61 + // times/constructors.yaml line #72 /* -17990000000 */ var expected_ int = -17990000000 /* r.epoch_time(-17990000000).to_epoch_time() */ - suite.T().Log("About to run line #61: r.EpochTime(-17990000000).ToEpochTime()") + suite.T().Log("About to run line #72: r.EpochTime(-17990000000).ToEpochTime()") runAndAssert(suite.Suite, expected_, r.EpochTime(-17990000000).ToEpochTime(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) - suite.T().Log("Finished running line #61") + suite.T().Log("Finished running line #72") } - // times/constructors.yaml line #65 + // times/constructors.yaml line #76 // cdate = "2013-01-01" suite.T().Log("Possibly executing: var cdate string = '2013-01-01'") cdate := "2013-01-01" _ = cdate // Prevent any noused variable errors - // times/constructors.yaml line #66 + // times/constructors.yaml line #77 // dates = ["2013", "2013-01", "2013-01-01", "20130101", "2013-001", "2013001"] suite.T().Log("Possibly executing: var dates []interface{} = []interface{}{'2013', '2013-01', '2013-01-01', '20130101', '2013-001', '2013001'}") dates := []interface{}{"2013", "2013-01", "2013-01-01", "20130101", "2013-001", "2013001"} _ = dates // Prevent any noused variable errors - // times/constructors.yaml line #67 + // times/constructors.yaml line #78 // ctime = "13:00:00" suite.T().Log("Possibly executing: var ctime string = '13:00:00'") ctime := "13:00:00" _ = ctime // Prevent any noused variable errors - // times/constructors.yaml line #68 + // times/constructors.yaml line #79 // times = ["13", "13:00", "1300", "13:00:00", "13:00:00.000000", "130000.000000"] suite.T().Log("Possibly executing: var times []interface{} = []interface{}{'13', '13:00', '1300', '13:00:00', '13:00:00.000000', '130000.000000'}") times := []interface{}{"13", "13:00", "1300", "13:00:00", "13:00:00.000000", "130000.000000"} _ = times // Prevent any noused variable errors - // times/constructors.yaml line #69 + // times/constructors.yaml line #80 // ctz = "+00:00" suite.T().Log("Possibly executing: var ctz string = '+00:00'") ctz := "+00:00" _ = ctz // Prevent any noused variable errors - // times/constructors.yaml line #70 + // times/constructors.yaml line #81 // tzs = ["Z", "+00", "+0000", "+00:00"] suite.T().Log("Possibly executing: var tzs []interface{} = []interface{}{'Z', '+00', '+0000', '+00:00'}") tzs := []interface{}{"Z", "+00", "+0000", "+00:00"} _ = tzs // Prevent any noused variable errors - // times/constructors.yaml line #71 + // times/constructors.yaml line #82 // cdt = [cdate+"T"+ctime+ctz] suite.T().Log("Possibly executing: var cdt []interface{} = []interface{}{cdate + 'T' + ctime + ctz}") cdt := []interface{}{cdate + "T" + ctime + ctz} _ = cdt // Prevent any noused variable errors - // times/constructors.yaml line #81 + // times/constructors.yaml line #92 // bad_dates = ["201301", "2013-0101", "2a13", "2013+01", "2013-01-01.1"] suite.T().Log("Possibly executing: var bad_dates []interface{} = []interface{}{'201301', '2013-0101', '2a13', '2013+01', '2013-01-01.1'}") bad_dates := []interface{}{"201301", "2013-0101", "2a13", "2013+01", "2013-01-01.1"} _ = bad_dates // Prevent any noused variable errors - // times/constructors.yaml line #82 + // times/constructors.yaml line #93 // bad_times = ["a3", "13:0000", "13:000", "13:00.00", "130000.00000000a"] suite.T().Log("Possibly executing: var bad_times []interface{} = []interface{}{'a3', '13:0000', '13:000', '13:00.00', '130000.00000000a'}") bad_times := []interface{}{"a3", "13:0000", "13:000", "13:00.00", "130000.00000000a"} _ = bad_times // Prevent any noused variable errors - // times/constructors.yaml line #83 + // times/constructors.yaml line #94 // bad_tzs = ["X", "-7", "-07:-1", "+07+01", "PST", "UTC", "Z+00"] suite.T().Log("Possibly executing: var bad_tzs []interface{} = []interface{}{'X', '-7', '-07:-1', '+07+01', 'PST', 'UTC', 'Z+00'}") diff --git a/internal/integration/reql_tests/reql_times_index_test.go b/internal/integration/reql_tests/reql_times_index_test.go index 5af6e062..4620d37a 100644 --- a/internal/integration/reql_tests/reql_times_index_test.go +++ b/internal/integration/reql_tests/reql_times_index_test.go @@ -36,16 +36,16 @@ func (suite *TimesIndexSuite) SetupTest() { suite.Require().NoError(err, "Error returned when connecting to server") suite.session = session - r.DBDrop("db_times_idx").Exec(suite.session) - err = r.DBCreate("db_times_idx").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) + err = r.DBCreate("test").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_times_idx").Wait().Exec(suite.session) + err = r.DB("test").Wait().Exec(suite.session) suite.Require().NoError(err) - r.DB("db_times_idx").TableDrop("table_test_times_index").Exec(suite.session) - err = r.DB("db_times_idx").TableCreate("table_test_times_index").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + err = r.DB("test").TableCreate("tbl").Exec(suite.session) suite.Require().NoError(err) - err = r.DB("db_times_idx").Table("table_test_times_index").Wait().Exec(suite.session) + err = r.DB("test").Table("tbl").Wait().Exec(suite.session) suite.Require().NoError(err) } @@ -54,8 +54,8 @@ func (suite *TimesIndexSuite) TearDownSuite() { if suite.session != nil { r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) - r.DB("db_times_idx").TableDrop("table_test_times_index").Exec(suite.session) - r.DBDrop("db_times_idx").Exec(suite.session) + r.DB("test").TableDrop("tbl").Exec(suite.session) + r.DBDrop("test").Exec(suite.session) suite.session.Close() } @@ -64,8 +64,8 @@ func (suite *TimesIndexSuite) TearDownSuite() { func (suite *TimesIndexSuite) TestCases() { suite.T().Log("Running TimesIndexSuite: secondary indexes on times") - table_test_times_index := r.DB("db_times_idx").Table("table_test_times_index") - _ = table_test_times_index // Prevent any noused variable errors + tbl := r.DB("test").Table("tbl") + _ = tbl // Prevent any noused variable errors // times/index.yaml line #7 // ts={"timezone":"-07:00","epoch_time":1375445162.0872,"$reql_type$":"TIME"} @@ -127,11 +127,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #37 /* 5 */ var expected_ int = 5 - /* table_test_times_index.insert(trows)['inserted'] */ + /* tbl.insert(trows)['inserted'] */ - suite.T().Log("About to run line #37: table_test_times_index.Insert(trows).AtIndex('inserted')") + suite.T().Log("About to run line #37: tbl.Insert(trows).AtIndex('inserted')") - runAndAssert(suite.Suite, expected_, table_test_times_index.Insert(trows).AtIndex("inserted"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(trows).AtIndex("inserted"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -149,11 +149,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #42 /* ("Duplicate primary key `id`:\n{\n\t\"id\":\t{\n\t\t\"$reql_type$\":\t\"TIME\",\n\t\t\"epoch_time\":\t1375445163.087,\n\t\t\"timezone\":\t\"-07:00\"\n\t}\n}\n{\n\t\"id\":\t{\n\t\t\"$reql_type$\":\t\"TIME\",\n\t\t\"epoch_time\":\t1375445163.087,\n\t\t\"timezone\":\t\"+00:00\"\n\t}\n}") */ var expected_ string = "Duplicate primary key `id`:\n{\n\t\"id\":\t{\n\t\t\"$reql_type$\":\t\"TIME\",\n\t\t\"epoch_time\":\t1375445163.087,\n\t\t\"timezone\":\t\"-07:00\"\n\t}\n}\n{\n\t\"id\":\t{\n\t\t\"$reql_type$\":\t\"TIME\",\n\t\t\"epoch_time\":\t1375445163.087,\n\t\t\"timezone\":\t\"+00:00\"\n\t}\n}" - /* table_test_times_index.insert(bad_insert)['first_error'] */ + /* tbl.insert(bad_insert)['first_error'] */ - suite.T().Log("About to run line #42: table_test_times_index.Insert(bad_insert).AtIndex('first_error')") + suite.T().Log("About to run line #42: tbl.Insert(bad_insert).AtIndex('first_error')") - runAndAssert(suite.Suite, expected_, table_test_times_index.Insert(bad_insert).AtIndex("first_error"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert(bad_insert).AtIndex("first_error"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -164,11 +164,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #46 /* 5 */ var expected_ int = 5 - /* table_test_times_index.between(ts, te).count() */ + /* tbl.between(ts, te).count() */ - suite.T().Log("About to run line #46: table_test_times_index.Between(ts, te).Count()") + suite.T().Log("About to run line #46: tbl.Between(ts, te).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(ts, te).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(ts, te).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -179,11 +179,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #48 /* 3 */ var expected_ int = 3 - /* table_test_times_index.between(t1, t4).count() */ + /* tbl.between(t1, t4).count() */ - suite.T().Log("About to run line #48: table_test_times_index.Between(t1, t4).Count()") + suite.T().Log("About to run line #48: tbl.Between(t1, t4).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(t1, t4).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(t1, t4).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -194,11 +194,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #51 /* 4 */ var expected_ int = 4 - /* table_test_times_index.between(t1, t4, right_bound='closed').count() */ + /* tbl.between(t1, t4, right_bound='closed').count() */ - suite.T().Log("About to run line #51: table_test_times_index.Between(t1, t4).OptArgs(r.BetweenOpts{RightBound: 'closed', }).Count()") + suite.T().Log("About to run line #51: tbl.Between(t1, t4).OptArgs(r.BetweenOpts{RightBound: 'closed', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(t1, t4).OptArgs(r.BetweenOpts{RightBound: "closed"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(t1, t4).OptArgs(r.BetweenOpts{RightBound: "closed"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -209,11 +209,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #54 /* 5 */ var expected_ int = 5 - /* table_test_times_index.between(r.expr(ts).in_timezone("+06:00"), te).count() */ + /* tbl.between(r.expr(ts).in_timezone("+06:00"), te).count() */ - suite.T().Log("About to run line #54: table_test_times_index.Between(r.Expr(ts).InTimezone('+06:00'), te).Count()") + suite.T().Log("About to run line #54: tbl.Between(r.Expr(ts).InTimezone('+06:00'), te).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(r.Expr(ts).InTimezone("+06:00"), te).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.Expr(ts).InTimezone("+06:00"), te).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -224,11 +224,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #56 /* 3 */ var expected_ int = 3 - /* table_test_times_index.between(t1, r.expr(t4).in_timezone("+08:00")).count() */ + /* tbl.between(t1, r.expr(t4).in_timezone("+08:00")).count() */ - suite.T().Log("About to run line #56: table_test_times_index.Between(t1, r.Expr(t4).InTimezone('+08:00')).Count()") + suite.T().Log("About to run line #56: tbl.Between(t1, r.Expr(t4).InTimezone('+08:00')).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(t1, r.Expr(t4).InTimezone("+08:00")).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(t1, r.Expr(t4).InTimezone("+08:00")).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -239,11 +239,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #59 /* 4 */ var expected_ int = 4 - /* table_test_times_index.between(r.expr(t1).in_timezone("Z"), t4, right_bound='closed').count() */ + /* tbl.between(r.expr(t1).in_timezone("Z"), t4, right_bound='closed').count() */ - suite.T().Log("About to run line #59: table_test_times_index.Between(r.Expr(t1).InTimezone('Z'), t4).OptArgs(r.BetweenOpts{RightBound: 'closed', }).Count()") + suite.T().Log("About to run line #59: tbl.Between(r.Expr(t1).InTimezone('Z'), t4).OptArgs(r.BetweenOpts{RightBound: 'closed', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(r.Expr(t1).InTimezone("Z"), t4).OptArgs(r.BetweenOpts{RightBound: "closed"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.Expr(t1).InTimezone("Z"), t4).OptArgs(r.BetweenOpts{RightBound: "closed"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -254,11 +254,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #64 /* 5 */ var expected_ int = 5 - /* table_test_times_index.update(lambda row:{'a':row['id']})['replaced'] */ + /* tbl.update(lambda row:{'a':row['id']})['replaced'] */ - suite.T().Log("About to run line #64: table_test_times_index.Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': row.AtIndex('id'), }}).AtIndex('replaced')") + suite.T().Log("About to run line #64: tbl.Update(func(row r.Term) interface{} { return map[interface{}]interface{}{'a': row.AtIndex('id'), }}).AtIndex('replaced')") - runAndAssert(suite.Suite, expected_, table_test_times_index.Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": row.AtIndex("id")} }).AtIndex("replaced"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Update(func(row r.Term) interface{} { return map[interface{}]interface{}{"a": row.AtIndex("id")} }).AtIndex("replaced"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -269,11 +269,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #67 /* ({'created':1}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_times_index.index_create('a') */ + /* tbl.index_create('a') */ - suite.T().Log("About to run line #67: table_test_times_index.IndexCreate('a')") + suite.T().Log("About to run line #67: tbl.IndexCreate('a')") - runAndAssert(suite.Suite, expected_, table_test_times_index.IndexCreate("a"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreate("a"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -284,11 +284,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #69 /* 1 */ var expected_ int = 1 - /* table_test_times_index.index_wait('a').count() */ + /* tbl.index_wait('a').count() */ - suite.T().Log("About to run line #69: table_test_times_index.IndexWait('a').Count()") + suite.T().Log("About to run line #69: tbl.IndexWait('a').Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.IndexWait("a").Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexWait("a").Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -299,11 +299,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #73 /* 5 */ var expected_ int = 5 - /* table_test_times_index.between(ts, te, index='a').count() */ + /* tbl.between(ts, te, index='a').count() */ - suite.T().Log("About to run line #73: table_test_times_index.Between(ts, te).OptArgs(r.BetweenOpts{Index: 'a', }).Count()") + suite.T().Log("About to run line #73: tbl.Between(ts, te).OptArgs(r.BetweenOpts{Index: 'a', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(ts, te).OptArgs(r.BetweenOpts{Index: "a"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(ts, te).OptArgs(r.BetweenOpts{Index: "a"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -314,11 +314,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #77 /* 3 */ var expected_ int = 3 - /* table_test_times_index.between(t1, t4, index='a').count() */ + /* tbl.between(t1, t4, index='a').count() */ - suite.T().Log("About to run line #77: table_test_times_index.Between(t1, t4).OptArgs(r.BetweenOpts{Index: 'a', }).Count()") + suite.T().Log("About to run line #77: tbl.Between(t1, t4).OptArgs(r.BetweenOpts{Index: 'a', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(t1, t4).OptArgs(r.BetweenOpts{Index: "a"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(t1, t4).OptArgs(r.BetweenOpts{Index: "a"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -329,11 +329,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #81 /* 4 */ var expected_ int = 4 - /* table_test_times_index.between(t1, t4, right_bound='closed', index='a').count() */ + /* tbl.between(t1, t4, right_bound='closed', index='a').count() */ - suite.T().Log("About to run line #81: table_test_times_index.Between(t1, t4).OptArgs(r.BetweenOpts{RightBound: 'closed', Index: 'a', }).Count()") + suite.T().Log("About to run line #81: tbl.Between(t1, t4).OptArgs(r.BetweenOpts{RightBound: 'closed', Index: 'a', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(t1, t4).OptArgs(r.BetweenOpts{RightBound: "closed", Index: "a"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(t1, t4).OptArgs(r.BetweenOpts{RightBound: "closed", Index: "a"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -344,11 +344,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #85 /* 5 */ var expected_ int = 5 - /* table_test_times_index.between(r.expr(ts).in_timezone("+06:00"), te, index='a').count() */ + /* tbl.between(r.expr(ts).in_timezone("+06:00"), te, index='a').count() */ - suite.T().Log("About to run line #85: table_test_times_index.Between(r.Expr(ts).InTimezone('+06:00'), te).OptArgs(r.BetweenOpts{Index: 'a', }).Count()") + suite.T().Log("About to run line #85: tbl.Between(r.Expr(ts).InTimezone('+06:00'), te).OptArgs(r.BetweenOpts{Index: 'a', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(r.Expr(ts).InTimezone("+06:00"), te).OptArgs(r.BetweenOpts{Index: "a"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.Expr(ts).InTimezone("+06:00"), te).OptArgs(r.BetweenOpts{Index: "a"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -359,11 +359,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #89 /* 3 */ var expected_ int = 3 - /* table_test_times_index.between(t1, r.expr(t4).in_timezone("+08:00"), index='a').count() */ + /* tbl.between(t1, r.expr(t4).in_timezone("+08:00"), index='a').count() */ - suite.T().Log("About to run line #89: table_test_times_index.Between(t1, r.Expr(t4).InTimezone('+08:00')).OptArgs(r.BetweenOpts{Index: 'a', }).Count()") + suite.T().Log("About to run line #89: tbl.Between(t1, r.Expr(t4).InTimezone('+08:00')).OptArgs(r.BetweenOpts{Index: 'a', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(t1, r.Expr(t4).InTimezone("+08:00")).OptArgs(r.BetweenOpts{Index: "a"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(t1, r.Expr(t4).InTimezone("+08:00")).OptArgs(r.BetweenOpts{Index: "a"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -374,11 +374,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #93 /* 4 */ var expected_ int = 4 - /* table_test_times_index.between(r.expr(t1).in_timezone("Z"), t4, right_bound='closed', index='a').count() */ + /* tbl.between(r.expr(t1).in_timezone("Z"), t4, right_bound='closed', index='a').count() */ - suite.T().Log("About to run line #93: table_test_times_index.Between(r.Expr(t1).InTimezone('Z'), t4).OptArgs(r.BetweenOpts{RightBound: 'closed', Index: 'a', }).Count()") + suite.T().Log("About to run line #93: tbl.Between(r.Expr(t1).InTimezone('Z'), t4).OptArgs(r.BetweenOpts{RightBound: 'closed', Index: 'a', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(r.Expr(t1).InTimezone("Z"), t4).OptArgs(r.BetweenOpts{RightBound: "closed", Index: "a"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.Expr(t1).InTimezone("Z"), t4).OptArgs(r.BetweenOpts{RightBound: "closed", Index: "a"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -389,11 +389,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #98 /* ({'created':1}) */ var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"created": 1} - /* table_test_times_index.index_create('b', lambda row:r.branch(row['id'] < t4, row['a'], null)) */ + /* tbl.index_create('b', lambda row:r.branch(row['id'] < t4, row['a'], null)) */ - suite.T().Log("About to run line #98: table_test_times_index.IndexCreateFunc('b', func(row r.Term) interface{} { return r.Branch(row.AtIndex('id').Lt(t4), row.AtIndex('a'), nil)})") + suite.T().Log("About to run line #98: tbl.IndexCreateFunc('b', func(row r.Term) interface{} { return r.Branch(row.AtIndex('id').Lt(t4), row.AtIndex('a'), nil)})") - runAndAssert(suite.Suite, expected_, table_test_times_index.IndexCreateFunc("b", func(row r.Term) interface{} { return r.Branch(row.AtIndex("id").Lt(t4), row.AtIndex("a"), nil) }), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexCreateFunc("b", func(row r.Term) interface{} { return r.Branch(row.AtIndex("id").Lt(t4), row.AtIndex("a"), nil) }), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -404,11 +404,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #101 /* 1 */ var expected_ int = 1 - /* table_test_times_index.index_wait('b').count() */ + /* tbl.index_wait('b').count() */ - suite.T().Log("About to run line #101: table_test_times_index.IndexWait('b').Count()") + suite.T().Log("About to run line #101: tbl.IndexWait('b').Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.IndexWait("b").Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexWait("b").Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -419,11 +419,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #105 /* 1 */ var expected_ int = 1 - /* table_test_times_index.index_wait('b').count() */ + /* tbl.index_wait('b').count() */ - suite.T().Log("About to run line #105: table_test_times_index.IndexWait('b').Count()") + suite.T().Log("About to run line #105: tbl.IndexWait('b').Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.IndexWait("b").Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.IndexWait("b").Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -434,11 +434,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #109 /* 3 */ var expected_ int = 3 - /* table_test_times_index.between(ts, te, index='b').count() */ + /* tbl.between(ts, te, index='b').count() */ - suite.T().Log("About to run line #109: table_test_times_index.Between(ts, te).OptArgs(r.BetweenOpts{Index: 'b', }).Count()") + suite.T().Log("About to run line #109: tbl.Between(ts, te).OptArgs(r.BetweenOpts{Index: 'b', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(ts, te).OptArgs(r.BetweenOpts{Index: "b"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(ts, te).OptArgs(r.BetweenOpts{Index: "b"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -449,11 +449,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #113 /* 3 */ var expected_ int = 3 - /* table_test_times_index.between(t1, t4, index='b').count() */ + /* tbl.between(t1, t4, index='b').count() */ - suite.T().Log("About to run line #113: table_test_times_index.Between(t1, t4).OptArgs(r.BetweenOpts{Index: 'b', }).Count()") + suite.T().Log("About to run line #113: tbl.Between(t1, t4).OptArgs(r.BetweenOpts{Index: 'b', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(t1, t4).OptArgs(r.BetweenOpts{Index: "b"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(t1, t4).OptArgs(r.BetweenOpts{Index: "b"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -464,11 +464,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #117 /* 3 */ var expected_ int = 3 - /* table_test_times_index.between(t1, t4, right_bound='closed', index='b').count() */ + /* tbl.between(t1, t4, right_bound='closed', index='b').count() */ - suite.T().Log("About to run line #117: table_test_times_index.Between(t1, t4).OptArgs(r.BetweenOpts{RightBound: 'closed', Index: 'b', }).Count()") + suite.T().Log("About to run line #117: tbl.Between(t1, t4).OptArgs(r.BetweenOpts{RightBound: 'closed', Index: 'b', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(t1, t4).OptArgs(r.BetweenOpts{RightBound: "closed", Index: "b"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(t1, t4).OptArgs(r.BetweenOpts{RightBound: "closed", Index: "b"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -479,11 +479,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #121 /* 3 */ var expected_ int = 3 - /* table_test_times_index.between(r.expr(ts).in_timezone("+06:00"), te, index='b').count() */ + /* tbl.between(r.expr(ts).in_timezone("+06:00"), te, index='b').count() */ - suite.T().Log("About to run line #121: table_test_times_index.Between(r.Expr(ts).InTimezone('+06:00'), te).OptArgs(r.BetweenOpts{Index: 'b', }).Count()") + suite.T().Log("About to run line #121: tbl.Between(r.Expr(ts).InTimezone('+06:00'), te).OptArgs(r.BetweenOpts{Index: 'b', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(r.Expr(ts).InTimezone("+06:00"), te).OptArgs(r.BetweenOpts{Index: "b"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.Expr(ts).InTimezone("+06:00"), te).OptArgs(r.BetweenOpts{Index: "b"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -494,11 +494,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #125 /* 3 */ var expected_ int = 3 - /* table_test_times_index.between(t1, r.expr(t4).in_timezone("+08:00"), index='b').count() */ + /* tbl.between(t1, r.expr(t4).in_timezone("+08:00"), index='b').count() */ - suite.T().Log("About to run line #125: table_test_times_index.Between(t1, r.Expr(t4).InTimezone('+08:00')).OptArgs(r.BetweenOpts{Index: 'b', }).Count()") + suite.T().Log("About to run line #125: tbl.Between(t1, r.Expr(t4).InTimezone('+08:00')).OptArgs(r.BetweenOpts{Index: 'b', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(t1, r.Expr(t4).InTimezone("+08:00")).OptArgs(r.BetweenOpts{Index: "b"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(t1, r.Expr(t4).InTimezone("+08:00")).OptArgs(r.BetweenOpts{Index: "b"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -509,11 +509,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #129 /* 3 */ var expected_ int = 3 - /* table_test_times_index.between(r.expr(t1).in_timezone("Z"), t4, right_bound='closed', index='b').count() */ + /* tbl.between(r.expr(t1).in_timezone("Z"), t4, right_bound='closed', index='b').count() */ - suite.T().Log("About to run line #129: table_test_times_index.Between(r.Expr(t1).InTimezone('Z'), t4).OptArgs(r.BetweenOpts{RightBound: 'closed', Index: 'b', }).Count()") + suite.T().Log("About to run line #129: tbl.Between(r.Expr(t1).InTimezone('Z'), t4).OptArgs(r.BetweenOpts{RightBound: 'closed', Index: 'b', }).Count()") - runAndAssert(suite.Suite, expected_, table_test_times_index.Between(r.Expr(t1).InTimezone("Z"), t4).OptArgs(r.BetweenOpts{RightBound: "closed", Index: "b"}).Count(), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Between(r.Expr(t1).InTimezone("Z"), t4).OptArgs(r.BetweenOpts{RightBound: "closed", Index: "b"}).Count(), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -538,11 +538,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #142 /* 1 */ var expected_ int = 1 - /* table_test_times_index.insert([{'id':oldtime}])['inserted'] */ + /* tbl.insert([{'id':oldtime}])['inserted'] */ - suite.T().Log("About to run line #142: table_test_times_index.Insert([]interface{}{map[interface{}]interface{}{'id': oldtime, }}).AtIndex('inserted')") + suite.T().Log("About to run line #142: tbl.Insert([]interface{}{map[interface{}]interface{}{'id': oldtime, }}).AtIndex('inserted')") - runAndAssert(suite.Suite, expected_, table_test_times_index.Insert([]interface{}{map[interface{}]interface{}{"id": oldtime}}).AtIndex("inserted"), suite.session, r.RunOpts{ + runAndAssert(suite.Suite, expected_, tbl.Insert([]interface{}{map[interface{}]interface{}{"id": oldtime}}).AtIndex("inserted"), suite.session, r.RunOpts{ GeometryFormat: "raw", GroupFormat: "map", }) @@ -553,11 +553,11 @@ func (suite *TimesIndexSuite) TestCases() { // times/index.yaml line #148 /* ("PTYPE