Member Junction
    Preparing search index...

    Function GetReadOnlyDataSource

    • Returns the read-only data source if it exists, otherwise returns the read-write data source if options is not provided or if options.allowFallbackToReadWrite is true.

      Parameters

      • dataSources: DataSourceInfo[]
      • Optionaloptions: { allowFallbackToReadWrite: boolean }

      Returns ConnectionPool & { query: (sql: string, params?: any) => Promise<any[]> }