Skip to main content

AdminForthDataSource

AdminForthDataSource = object

Data source describes database connection which will be used to fetch data for resources. Each resource should use one data source.

Properties

connectionRecovery?

optional connectionRecovery?: boolean

Controls how the connector reacts to a dropped database connection. Currently honored by the PostgreSQL connector.

  • true (default): self-heal mode. The connection pool recovers automatically — when an idle connection dies (DB restart, failover, network blip, etc.) it is dropped and a fresh one is opened on the next query, so the app keeps working without a manual restart.
  • false: legacy mode. On a connection error the pool is destroyed and recreated after 1s. If the outage outlasts that retry the app can be left with a permanently dead pool and require a manual restart. Kept only for backward compatibility.

id

id: string

ID of datasource which you will use in resources to specify from which database to fetch data from


url

url: string

URL to database. Examples:

  • MongoDB: mongodb://<user>:<password>@<host>:<port>/<database>
  • PostgreSQL: postgresql://<user>:<password>@<host>:<port>/<database>
  • SQLite: sqlite://<path>