singlestore-labs / singlestoredb-laravel-driver

The official SingleStore Laravel driver.
https://github.com/singlestore-labs/singlestore-laravel-driver
Apache License 2.0
222 stars 22 forks source link

Support OPTION for specifying a resource pool per query #61

Closed aymericauberger closed 1 year ago

aymericauberger commented 1 year ago

Hello, I'm trying to replicate the /*+ MAX_EXECUTION_TIME(15000) */ behavior from MySQL, and the option that was recommended to me is to create a resource pool with a query timeout and use it for specific queries:

CREATE RESOURCE POOL my_pool WITH QUERY_TIMEOUT = 15;

SELECT * FROM <table> OPTION (resource_pool=my_pool);

Unfortunately I can't find a way to append OPTION (resource_pool=my_pool) to a query built with Eloquent.

Could you please add a method to support this? I can try to make a pull request but I'm not completely familiar with Eloquent's way of building queries yet so it may not be perfect.

AdalbertMemSQL commented 1 year ago

Hey @aymericauberger Thanks for reaching out! It sounds like a reasonable feature request. I created an internal ticket to add this functionality.