This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const entryByIdSelector = (state) => state.todos.entrybyId | |
const recentIdsSelector = (state) => state.todos.recentIds | |
const entrySelector = _.memoize( | |
(id) => createSelector( | |
entryByIdSelector, | |
(entryById) => entryById[id] | |
) | |
) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION mergeArrays (a1 ANYARRAY, a2 ANYARRAY) RETURNS ANYARRAY AS $$ | |
SELECT ARRAY_AGG(x ORDER BY x) | |
FROM ( | |
SELECT DISTINCT UNNEST($1 || $2) AS x | |
) s; | |
$$ LANGUAGE SQL STRICT; |