Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using schema-qualified names in Dataset#graph #769

Merged
merged 2 commits into from Feb 25, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/sequel/dataset/graph.rb
Expand Up @@ -54,7 +54,9 @@ def graph(dataset, join_conditions = nil, options = OPTS, &block)
when Symbol
table = dataset
dataset = @db[dataset]
table_alias ||= table
# let alias be the same as the table name (sans any optional schema)
# unless alias explicitly given in the symbol using ___ notation
table_alias ||= split_symbol(table).compact.last.to_sym
when ::Sequel::Dataset
if dataset.simple_select_all?
table = dataset.opts[:from].first
Expand Down