( row: CoreRow<"plugin_storage">, where: Readonly<Record<string, unknown>> | undefined, )
| 884 | }; |
| 885 | |
| 886 | const rowMatchesPluginStorageWhere = ( |
| 887 | row: CoreRow<"plugin_storage">, |
| 888 | where: Readonly<Record<string, unknown>> | undefined, |
| 889 | ): boolean => { |
| 890 | if (!where) return true; |
| 891 | for (const [field, condition] of Object.entries(where)) { |
| 892 | const value = pluginStorageDataField(row.data, field); |
| 893 | if (isPluginStorageWhereFilter(condition)) { |
| 894 | if (!matchesWhereOperators(value, condition)) return false; |
| 895 | } else if (comparePluginStorageValues(value, condition) !== 0) { |
| 896 | return false; |
| 897 | } |
| 898 | } |
| 899 | return true; |
| 900 | }; |
| 901 | |
| 902 | const makePluginStorageFacade = (input: { |
| 903 | readonly core: CoreDb; |
no test coverage detected