Jeremy Evans wrote:
> * Database#<< now always returns nil.  Before, the return value was
>   adapter dependent.

I was going to ask why not return self, like other #<< in ruby, but then 
I ran into this with Database#<< :

The Sequel docs have this example:

   DB << "create table t (a text, b text)"
   DB << "insert into t values ('a', 'b')"

But:

   db = Sequel.sqlite :memorySequel::DatabaseConnectionError: TypeError 
can't convert Symbol into String
         from 
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/driver/native/driver.rb:76:in
 
`sqlite3_open'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/driver/native/driver.rb:76:in
 
`send'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/driver/native/driver.rb:76:in
 
`open'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/database.rb:76:in
 
`initialize'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/adapters/sqlite.rb:31:in
 
`new'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/adapters/sqlite.rb:31:in
 
`connect'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/database.rb:92:in 
`initialize'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/connection_pool.rb:169:in
 
`call'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/connection_pool.rb:169:in
 
`make_new'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/connection_pool.rb:156:in
 
`available'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/connection_pool.rb:147:in
 
`acquire'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/connection_pool.rb:146:in
 
`synchronize'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/connection_pool.rb:146:in
 
`acquire'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/connection_pool.rb:102:in
 
`hold'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/database.rb:481:in 
`synchronize'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/adapters/sqlite.rb:93:in
 
`_execute'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/adapters/sqlite.rb:68:in
 
`execute_dui'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/database.rb:305:in 
`execute_ddl'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/database.rb:437:in 
`run'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/database.rb:240:in 
`<<'

   db << "select * from t;"

raises this error:

Sequel::DatabaseConnectionError: TypeError can't convert Symbol into String
         from 
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/driver/native/driver.rb:76:in
 
`sqlite3_open'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/driver/native/driver.rb:76:in
 
`send'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/driver/native/driver.rb:76:in
 
`open'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.5/lib/sqlite3/database.rb:76:in
 
`initialize'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/adapters/sqlite.rb:31:in
 
`new'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/adapters/sqlite.rb:31:in
 
`connect'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/database.rb:92:in 
`initialize'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/connection_pool.rb:169:in
 
`call'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/connection_pool.rb:169:in
 
`make_new'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/connection_pool.rb:156:in
 
`available'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/connection_pool.rb:147:in
 
`acquire'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/connection_pool.rb:146:in
 
`synchronize'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/connection_pool.rb:146:in
 
`acquire'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/connection_pool.rb:102:in
 
`hold'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/database.rb:481:in 
`synchronize'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/adapters/sqlite.rb:93:in
 
`_execute'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/adapters/sqlite.rb:68:in
 
`execute_dui'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/database.rb:305:in 
`execute_ddl'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/database.rb:437:in 
`run'
         from 
/usr/local/lib/ruby/gems/1.8/gems/sequel-3.4.0/lib/sequel/database.rb:240:in 
`<<'


-- 
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to