Ok, the mssql adapter is working when I uncomment the require 'odbc'
and add that fetch_rows patch. Here is an example:
>> require 'sequel/adapters/odbc-mssql'
=> true
>> require 'fetch_rows_patch'
=> true
>> DB = Sequel::ODBC::MSSQL::Database.new(:database => "test", :user => "test",
>> :password => "test")
=> #<Sequel::ODBC::MSSQL::Database:0x129a10c @logger=nil,
@single_threaded=false,
@opts={:user=>"test", :password=>"test", :database=>"test"},
@pool=#<Sequel::ConnectionPool:0x129a058 @created_count=0,
@mutex=#<Mutex:0x129a01c>, @allocated={}, @max_size=4,
@available_connections=[], @connection_proc=#<Proc:0x012f9c60@/Library/
Ruby/Gems/1.8/gems/sequel-0.4.1.1/lib/sequel/adapters/../../sequel/
database.rb:27>>>
>> DB[:"master..sysprocesses"].filter('blocked != 0').sql
=> "SELECT * FROM master..sysprocesses WHERE blocked != 0"
>> DB[:"master..sysprocesses"].filter('blocked != 0').limit(1).sql
=> "SELECT TOP 1 * FROM master..sysprocesses WHERE blocked != 0"
>> DB[:"master..sysprocesses"].filter('blocked != 0').limit(1).nolock.sql
=> "SELECT TOP 1 * WITH (NOLOCK) FROM master..sysprocesses WHERE
blocked != 0"
I'll see if I can add some more useful stuff to the mssql adapter.
I'll attach some patches for the stuff I've changed in another
message.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---