Update #2 =)
This actually returns an array of hashes representing the results of the a
query.
DB.execute('select * from SomneTable', server: :some_server) {|result|
result.to_a }
It seems really ugly though. Am I doing this right? Is there a simpler way
to just execute some raw sql (including calling stored procs)? What am I
missing?
Trevor
On Monday, July 29, 2013 1:49:55 PM UTC-4, Trevor Little wrote:
>
> I just realized that I can pass in a :server option to execute, so that
> should solve my sharding problem, but I still can seem to get results back,
> even from a simple select:
>
> irb(main):003:0> DB.execute('select * from SomeTable', server: :config,
> return: :each)
> => []
>
> Any ideas?
>
> On Monday, July 29, 2013 1:25:41 PM UTC-4, Trevor Little wrote:
>>
>> I'm having a little trouble getting this to work and I'm hoping you all
>> can help me. We're using Sequel 3.44.0 with sharding and TinyTDS to
>> interact with our MS SQL Server database. I can't figure out how I'm
>> supposed to call stored procs. It seems like I'm going to have to do
>> something like:
>>
>> result = DB.execute("EXEC proc_Name", return: :each)
>>
>> but I can't get that to work and I'm not sure how I would specify a shard
>> name.
>>
>> I'd really appreciate any light you could shed. This is the first thing
>> I've come across that looks pretty easy in AR but has me stumped in Sequel.
>>
>> Trevor
>>
>
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/groups/opt_out.