提交 497218d5 编写于 作者: A Aaron Patterson

adding bind value substitution

上级 ef0cf143
......@@ -97,6 +97,12 @@ def quote_table_name(name)
quote_column_name(name)
end
# Returns a bind substitution value given a +column+ and list of current
# +bind_values+
def substitute_for(column, bind_values)
Arel.sql '?'
end
# REFERENTIAL INTEGRITY ====================================
# Override to turn off referential integrity while executing <tt>&block</tt>.
......
......@@ -51,6 +51,15 @@ def test_encoding
:timeout => 100
assert_equal 'UTF-8', conn.encoding
end
def test_bind_value_substitute
conn = Base.sqlite3_connection :database => ':memory:',
:adapter => 'sqlite3',
:timeout => 100
bind_param = conn.substitute_for('foo', [])
assert_equal Arel.sql('?'), bind_param
end
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册