Created
June 18, 2015 14:40
-
-
Save mrbrdo/b1db4991d7e40db2f620 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NoMethodError: undefined method `[]' for nil:NilClass | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/jdbc.rb:751:in `type_convertor' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/jdbc.rb:777:in `process_result_set' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/jdbc.rb:775:in `times' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/jdbc.rb:775:in `process_result_set' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/jdbc.rb:714:in `fetch_rows' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/jdbc.rb:251:in `execute' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/jdbc.rb:651:in `statement' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/jdbc.rb:246:in `execute' | |
/path/gems/sequel-4.23.0/lib/sequel/connection_pool/threaded.rb:103:in `hold' | |
/path/gems/sequel-4.23.0/lib/sequel/database/connecting.rb:255:in `synchronize' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/jdbc.rb:245:in `execute' | |
/path/gems/sequel-4.23.0/lib/sequel/dataset/actions.rb:921:in `execute' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/jdbc.rb:714:in `fetch_rows' | |
/path/gems/sequel-4.23.0/lib/sequel/dataset/actions.rb:139:in `each' | |
/path/gems/sequel-4.23.0/lib/sequel/dataset/actions.rb:390:in `map' | |
/path/gems/sequel-4.23.0/lib/sequel/dataset/actions.rb:390:in `map' | |
/path/gems/sequel-4.23.0/lib/sequel/dataset/actions.rb:848:in `_select_map_multiple' | |
/path/gems/sequel-4.23.0/lib/sequel/dataset/actions.rb:881:in `_select_map' | |
/path/gems/sequel-4.23.0/lib/sequel/dataset/actions.rb:617:in `select_map' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/shared/postgres.rb:709:in `convert_named_procs_to_procs' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/shared/postgres.rb:570:in `add_named_conversion_procs' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/shared/postgres.rb:943:in `get_conversion_procs' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/shared/postgres.rb:424:in `reset_conversion_procs' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/shared/postgres.rb:985:in `initialize_postgres_adapter' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/jdbc/postgresql.rb:49:in `extended' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/jdbc/postgresql.rb:10:in `extend' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/jdbc/postgresql.rb:10:in `JDBC' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/jdbc.rb:359:in `call' | |
/path/gems/sequel-4.23.0/lib/sequel/adapters/jdbc.rb:359:in `adapter_initialize' | |
/path/gems/sequel-4.23.0/lib/sequel/database/misc.rb:142:in `initialize' | |
/path/gems/sequel-4.23.0/lib/sequel/database/connecting.rb:66:in `connect' | |
/path/gems/sequel-4.23.0/lib/sequel/core.rb:95:in `connect' | |
# Convert the hash of named conversion procs into a hash a oid conversion procs. | |
def convert_named_procs_to_procs(named_procs) | |
h = {} | |
# <- HERE | |
from(:pg_type).where(:typtype=>['b', 'e'], :typname=>named_procs.keys.map(&:to_s)).select_map([:oid, :typname]).each do |oid, name| | |
# <- HERE | |
h[oid.to_i] = named_procs[name.untaint.to_sym] | |
end | |
h | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment