Can provideTags be used with queryFn - redux-toolkit

Can providesTags (https://redux-toolkit.js.org/rtk-query/api/createApi#providestags) be used with queryFn or with query only?

Yes, providesTags can be used with queryFn.

Related

TYPO3 queryBuilder: How to work with BINARY in where() clause?

I just have a short question.
There's no description in the following API overview of TYPO3 how to use a "BINARY" in where() clause: https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/Database/QueryBuilder/Index.html#expr
What I want to achieve? this one:
WEHRE BINARY `buyer_code` = "f#F67d";
Actually I can only do the following:
->where(
$queryBuilder->expr()->eq('buyer_code', 'f#F67d')
);
But in this case I don't get a satisfying result for myself because I need case-sensitive here :-)
An another buyer_code exists "f#F67D" (the last char is uppercase) but I do need to look for the other one.
Thanks for helping.
Since TYPO3 is using Doctrine API here, you could try to do
->where('BINARY `buyer_code` = ' . $queryBuilder->createNamedParameter('f#F67d'))
Please keep in mind, that this query now only works for database backends, supporting the BINARY keyword!
Please have a look at Doctrine2 case-sensitive query The thread is a bit older, but seems to cover background and solution for your problem.

Difference between SDO_CONTAINS and SDO_RELATE with MASK=CONTAINS?

What is the difference between following oracle spatial query? Does both function return same result? I am confused with MASK=CONTAINS
SDO_CONTAINS (col1_geometry,col2_geometry )='TRUE'
SDO_RELATE (col1_geometry,col2_geometry ,'MASK=CONTAINS')='TRUE'
They are exactly the same. SDO_CONTAINS is just simpler to write.

Multiples document s types refinementfilters

i am using rest api search to get documents with certain extensions types.
I am having this code:
&refinementfilters=or'(fileExtension:equals("aspx"),fileExtension:equals("wmv"))'
The whole code is:
https://myUrl/_api/search/query?selectproperties='Path,Url,Title,Size,IsDocument,PictureUrl,LastModifiedTime'&querytext='wildlife'&refinementfilters= '(fileExtension:equals("aspx"))'
i would like to use rest api refinementfilters fileExtension using or, but the syntax with the OR condition doesn' t work, can you halp me point out
where the problem can be ?
Cheers
To apply multiple filters via refinementfilters property, replace
refinementfilters='(fileExtension:equals("aspx"))'
with
refinementfilters='fileExtension:or("aspx","wmv")'
Example
/_api/search/query?selectproperties='Path,Url,Title,Size,IsDocument,PictureUrl,LastModifiedTime'&querytext='*'&refinementfilters= 'fileExtension:or("docx","pdf")'
As far as general syntax, the quotes for the OR are in the wrong place:
Original version:
&refinementfilters=or'(fileExtension:equals("aspx"),fileExtension:equals("wmv"))'
Corrected version:
&refinementfilters='or(fileExtension:equals("aspx"),fileExtension:equals("wmv"))'

How can I add FOR UPDATE to a cakephp3 query?

Is there a way to add FOR UPDATE to a find (SELECT) query in cakephp3?
I found this hack: http://bakery.cakephp.org/2012/04/14/SELECT-FOR-UPDATE-hack-kind-of-ugly-but-it-works-PostgreSQL-and-MySql.html but it does not work since the limit value must contain only of a number.
Another discussion on a similar topic can be found under https://github.com/cakephp/cakephp/issues/3136#event-213462937.
You can do it with Query::epilog()
$selectQuery->...->epilog('FOR UPDATE');
I opened a ticket for this for cakephp3 https://github.com/cakephp/cakephp/issues/6772#issuecomment-110530303.
The solution is to use the epilog method from the Query class:
$article->find('first')->epilog('FOR UPDATE');

Zend_Db_Table_Abstract - How to do a SUM?

I can't find here: http://framework.zend.com/manual/en/zend.db.select.html
any reference to SUM using mysql.
How can we perform a simple:
SELECT SUM(mark) as total_mark FROM `student`
Using Zend_Db_Table_Abstract ?
Tried:
this->select(SUM ('myintcolumn'))->from('mytable');
No luck. :(
Thanks,
MEM
did you try
this->select()->from('mytable', array('sum(myintcolumn) as sum'));
This is another less hardcoded way:
$this->select()->from($this, new Zend_Db_Expr("SUM(myintcolumn)"));
$select->from($this->_name, array('mytable'=> new Zend_Db_Expr('SUM(myintcolumn)')));