mirror of
https://github.com/lloeki/rebel.git
synced 2025-12-06 10:04:39 +01:00
Replace '*' by :*
This commit is contained in:
parent
cfe0851f04
commit
02043ec233
2 changed files with 2 additions and 2 deletions
|
|
@ -288,7 +288,7 @@ module Rebel
|
|||
def name(name = nil)
|
||||
super() if name.nil? # workaround for pry and introspection
|
||||
return name if name.is_a?(Raw)
|
||||
return raw('*') if name == '*'
|
||||
return raw('*') if name == :*
|
||||
|
||||
raw(name.to_s.split('.').map { |e| "#{@identifier_quote}#{e}#{@identifier_quote}" }.join('.'))
|
||||
end
|
||||
|
|
|
|||
|
|
@ -44,6 +44,6 @@ class TestExec < Minitest::Test
|
|||
def test_select
|
||||
create_table :foo, id: 'INT', col: 'VARCHAR(255)'
|
||||
insert_into :foo, id: 1, col: 'whatevs'
|
||||
assert_equal(select('*', from: :foo), [[1, 'whatevs']])
|
||||
assert_equal(select(:*, from: :foo), [[1, 'whatevs']])
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue