小编And*_*w B的帖子

How to test an NGRX effect that uses a store selector?

I have an @Effect that uses a MemoizedSelector to grab an item from the redux store and mergeMap it with the payload of an Action. The effect works just fine, however setting up the Jest tests for this has proven difficult as I cannot seem to mock the return value of the selector due to select being a declared function that's imported (from '@ngrx/store') and used in the effect and the selector itself being an imported function as well. …

rxjs ngrx ngrx-effects angular

7
推荐指数
1
解决办法
1413
查看次数

为什么这个SQL连接按顺序工作而不是另一个?

我这里有2个SQL连接,一个返回好结果,另一个返回0结果集.为什么是这样?除了join/column/table命令之外,它们非常相似.(顺便说一句,我在这里使用MySQL)

工作加入(返回超过240,000行的良好数据)

SELECT 
   t1.email AS "email", 
   t1.record_id AS "record_id", 
   t2.status AS "status",
   t3.item_record_id AS "item_record_id",
   t1.ordered_at AS "started_at"

FROM `rs_orders` t1 

INNER JOIN `cb_all_transactions` t2 
ON t1.record_id = CONCAT('cb_sl_', t2.receipt) 

INNER JOIN `rs_order_items` t3
ON t1.record_id = t3.order_record_id

WHERE t2.recurring = 'true' 

ORDER BY t1.ordered_at ASC
Run Code Online (Sandbox Code Playgroud)

非工作连接(返回0行)

SELECT 
   t1.email AS "email", 
   t1.record_id AS "record_id",
   t1.ordered_at AS "started_at",
   t2.item_record_id AS "item_record_id",
   t3.status AS "status"

FROM rs_orders t1

INNER JOIN rs_order_items t2
ON t1.record_id = t2.order_record_id

INNER JOIN cb_all_transactions t3 …
Run Code Online (Sandbox Code Playgroud)

mysql sql

2
推荐指数
1
解决办法
51
查看次数

标签 统计

angular ×1

mysql ×1

ngrx ×1

ngrx-effects ×1

rxjs ×1

sql ×1