Revert "Merge pull request #10043 from cconstantine/master"

This reverts commit 521035af, reversing
changes made to 222011db.

Reason: This broke the tests
上级 be4ccae9
......@@ -44,21 +44,6 @@ def pp(result)
end
end
# Inserts the given fixture into the table.
def insert_fixture(fixture, table_name)
columns = schema_cache.columns_hash(table_name)
key_list = []
value_list = fixture.map do |name, value|
key_list << quote_column_name(name)
[columns[name], value]
end
insert_statement = "INSERT INTO #{quote_table_name(table_name)} (#{key_list.join(", ")}) VALUES (#{key_list.count.times.map{|i| "$#{i+1}" }.join(", ")})"
exec_insert(insert_statement, 'Fixture Insert', value_list)
end
# Executes a SELECT query and returns an array of rows. Each row is an
# array of field values.
def select_rows(sql, name = nil)
......
......@@ -81,12 +81,6 @@ def test_contains_nils
assert_cycle(['1',nil,nil])
end
def test_insert_fixture
tag_values = ["val1", "val2", "val3_with_quote_'_char"]
@connection.insert_fixture({"tags" => ["val1", "val2", "val3_with_quote_'_char"]}, "pg_arrays" )
assert_equal(PgArray.last.tags, tag_values)
end
private
def assert_cycle array
# test creation
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册