Function
fromRecord
(migrations: Record<string, Effect.Effect<void, unknown, Client.SqlClient>>)
Source from the content-addressed store, hash-verified
| 336 | * @category loaders |
| 337 | */ |
| 338 | export const fromRecord = (migrations: Record<string, Effect.Effect<void, unknown, Client.SqlClient>>): Loader => |
| 339 | pipe( |
| 340 | Object.keys(migrations), |
| 341 | Arr.filterMap((_) => Option.fromNullable(_.match(/^(\d+)_(.+)$/))), |
| 342 | Arr.map( |
| 343 | ([key, id, name]): ResolvedMigration => [ |
| 344 | Number(id), |
| 345 | name, |
| 346 | Effect.succeed(migrations[key]) |
| 347 | ] |
| 348 | ), |
| 349 | Arr.sort(migrationOrder), |
| 350 | Effect.succeed |
| 351 | ) |
Callers
nothing calls this directly
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…