| 1 | package sessioncatalog |
| 2 | |
| 3 | import ( |
| 4 | "context" |
| 5 | "reasonix/internal/projectiondb" |
| 6 | ) |
| 7 | |
| 8 | func openCatalogProjection(ctx context.Context, opts Options) (*projectiondb.Handle, error) { |
| 9 | openProjection := projectiondb.Open |
| 10 | if opts.DeferredMetadataIntegrity { |
| 11 | openProjection = projectiondb.OpenAdvisory |
| 12 | } |
| 13 | return openProjection(ctx, projectiondb.OpenOptions{ |
| 14 | Path: opts.Path, |
| 15 | MemoryName: "session-catalog", |
| 16 | Migrations: sessionMigrations(), |
| 17 | InMemory: opts.InMemory, |
| 18 | MaxOpenConns: 4, |
| 19 | Now: opts.Now, |
| 20 | }) |
| 21 | } |
| 22 |