openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
3 lines • 809 B
JavaScript
import{v as peekSqliteDatabaseAdmissionForPath}from"./sqlite-database-admission-B3KDkUt-.mjs";import{t as postgresPhysicalFactsKey}from"./physical-facts-contract-CxKeFgnM.mjs";import{t as listDatabaseEngineStores}from"./registry-ByN-O5dB.mjs";import{r as preparePostgresBridge}from"./bridge-prestart-ChzIkXKR.mjs";
//!src/infra/database-engine/bridge-prestart.ts
function prepareAdmittedPostgresBridge(e,t,n){if(!t?.postgres)return;const r=peekSqliteDatabaseAdmissionForPath(e,postgresPhysicalFactsKey);if(!r)return;const i=listDatabaseEngineStores().find(({id:e})=>e.replaceAll(`-`,`_`)===r.store);if(!i||t.effectiveEngines[i.id]!==`postgres`)return;return preparePostgresBridge({url:t.postgres.connection,schema:r.namespace,storeId:r.storeId,reuse:n?.reuse},n?.signal)}export{prepareAdmittedPostgresBridge};