Re: How to handle boolean in literal where clauses with squel 5.28

2020-01-15 Thread Jeremy Evans
On Wednesday, January 15, 2020 at 1:14:50 AM UTC-8, Bernhard Weichel wrote:
>
> in https://github.com/oneclick/rubyinstaller2/issues/108 I found a 
> solution by using another ADO provider. 
>
> replace
>
>provider  = "Microsoft.Jet.OLEDB.4.0"
>
> with 
>
> provider  = "Microsoft.ACE.OLEDB.12.0"
>
>
> It really seems to be that simple :-) triggering the question, if sequel 
> could raise a warning in this case.
>

I'm glad the fix was that simple.

I don't think Sequel could raise a warning.  How would Sequel know that you 
specified the wrong provider?  Specifying the correct provider is and 
should be the responsibility of the user.

Thanks,
Jeremy

-- 
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 sequel-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/5c7d4705-fde4-45d8-98a7-5a2a06e1e59a%40googlegroups.com.


Re: Asynchronous query to ODBC-compliant database, without waiting for results - possible?

2020-01-15 Thread Rebecca Paz
Mason, Jeremy,

All this makes sense - I'll talk to my team about our options here. Sidekiq 
is also an attractive option since we do have Sidekiq workers already, so 
that might be our best bet if we can't get `ruby-odbc` to play nice with 
us. Thanks everyone!

Rebecca

On Tuesday, January 14, 2020 at 2:12:45 PM UTC-5, Jeremy Evans wrote:
>
> On Tuesday, January 14, 2020 at 10:21:28 AM UTC-8, Rebecca Paz wrote:
>>
>> Hello,
>>
>> We are interested in using Sequel to interface with Snowflake 
>> , which is ODBC-compliant and can be 
>> connected to as such:
>>
>> require 'odbc'
>> require 'sequel'
>> db = Sequel.odbc('SnowflakeDsnGoesHere')
>>
>> db.run('select 1;')
>>
>> db.disconnect
>>
>>
>> We have a need to issue queries to Snowflake without waiting for the 
>> query to complete, and therefore we have no need of the immediate results. 
>> This is because we're depending on some Snowflake commands that allow us to 
>> store the results of a query as a CSV in an S3 bucket, which run the query 
>> asynchronously of the caller/requester. For this purpose, Snowflake's 
>> SnowSQL  
>> client provides a `results=False` option when issuing a query, allowing the 
>> system call to immediately return once the query has been submitted to the 
>> database. I'm hoping to find a similar option as we try using Sequel for 
>> our purposes.
>>
>> I took a look through the Sequel documentation and I don't believe I see 
>> any options to make queries submitted to an ODBC database asynchronous, or 
>> at least not try to wait for the query to complete before returning. Is 
>> this something Sequel can do, via ODBC or otherwise? I can provide more 
>> information if necessary.
>>
>
> Sequel's API was designed for synchronous behavior.  So if you want 
> asynchronous behavior, you need to a separate thread or process. If the 
> ruby ODBC driver supports asynchronous behavior, you can drop down to the 
> connection level using `db.synchronize` and use the ruby ODBC driver API to 
> perform asynchronous queries.  You do lose a lot of Sequel's benefits with 
> that approach, though.
>
> Thanks,
> Jeremy
>

-- 
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 sequel-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/8cef08b4-5106-41ab-baa5-9f59ea8da472%40googlegroups.com.


Re: How to handle boolean in literal where clauses with squel 5.28

2020-01-15 Thread 'Bernhard Weichel' via sequel-talk


Am Mittwoch, 15. Januar 2020 01:37:21 UTC+1 schrieb Jeremy Evans:
>
> could it be that ruby 1.9.3 is 32 bit while 2.6.0 is 64 bit? But then it 
>> should not handle select statements without the where clause either.
>>
>
> Could be, it's hard to say.  It does appear to be an issue with Ruby and 
> not a Sequel-specific issue, though.
>
> Thanks,
> Jeremy
>

were you able to run my example?


in https://github.com/oneclick/rubyinstaller2/issues/108 I found a solution 
by using another ADO provider. 

replace

   provider  = "Microsoft.Jet.OLEDB.4.0"

with 

provider  = "Microsoft.ACE.OLEDB.12.0"


It really seems to be that simple :-) triggering the question, if sequel 
could raise a warning in this case.

Nevertheless thank you very much for sequel and for your help.

Bernhard
 

-- 
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 sequel-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/c174daf9-70d3-494c-b778-0e77f165928d%40googlegroups.com.