# Class PipeDataSource<Source, Target>

#### Type Parameters

- Source = any
- Target = Source

#### Hierarchy (View Summary)

- BaseDataSource<Target>
  - PipeDataSource

#### Implements

- OnDestroy

- Defined in packages/angular/data-source/src/lib/pipe.data-source.ts:50

#####
Index

### Constructors

constructor

### Properties

__id
_connectedViewer
_connectedViewerTeardown
_data?
_data$
_initialised
_lastRefreshed
_retry$
_viewerIds
change$
dataSource
destroyed$
error$
hasError?
hasError$
initialised$
interceptors
loading?
loading$
metadata
destroyed$
initialised$
instances

### Accessors

data
hasConnections
id
lastRefreshed
operations

### Methods

_connect
_disconnect
applyMetadata
attach
connect
derive
destroy
disconnect
genericRetryFunction
getMetadata
getViewerId
handelError
init
isConnected
ngOnDestroy
refresh
reset
retry
setOperations
toJSON
toPromise
viewerToOperations
add
remove

##
Constructors

### constructor

- new PipeDataSource<Source = any, Target = Source>(
  dataSource: BaseDataSource<Source>,
  operation?: null | OperatorFunction<Source, any>,
  ...operations: (PipeDataSourceMetadata | OperatorFunction<any, any>)[],
  ): PipeDataSource<Source, Target>

  #### Type Parameters

  - Source = any
  - Target = Source

  #### Parameters

  - dataSource: BaseDataSource<Source>
  - operation: null | OperatorFunction<Source, any> = null
  - ...operations: (PipeDataSourceMetadata | OperatorFunction<any, any>)[]

  #### Returns PipeDataSource<Source, Target>

  Overrides BaseDataSource.constructor

  - Defined in packages/angular/data-source/src/lib/pipe.data-source.ts:56

##
Properties

### `Internal`__id

__id: string = ...

unique internal id

Inherited from BaseDataSource.__id

- Defined in packages/angular/definition/src/lib/definition.ts:61

### `Protected`_connectedViewer

_connectedViewer: Map<string, Observable<Target>> = ...

Inherited from BaseDataSource._connectedViewer

- Defined in packages/angular/data-source/src/lib/base.data-source.ts:78

### `Protected`_connectedViewerTeardown

_connectedViewerTeardown: Map<string, TeardownLogic> = ...

Inherited from BaseDataSource._connectedViewerTeardown

- Defined in packages/angular/data-source/src/lib/base.data-source.ts:79

### `Protected` `Optional`_data

_data?: Target

Inherited from BaseDataSource._data

- Defined in packages/angular/data-source/src/lib/base.data-source.ts:104

### `Protected`_data$

_data$: Observable<Target> = EMPTY

Inherited from BaseDataSource._data$

- Defined in packages/angular/data-source/src/lib/base.data-source.ts:83

### `Protected`_initialised

_initialised: boolean = false

Inherited from BaseDataSource._initialised

- Defined in packages/angular/definition/src/lib/definition.ts:62

### `Protected`_lastRefreshed

_lastRefreshed: null | Date = null

Inherited from BaseDataSource._lastRefreshed

- Defined in packages/angular/data-source/src/lib/base.data-source.ts:77

### `Protected`_retry$

_retry$: Subject<void> = ...

Inherited from BaseDataSource._retry$

- Defined in packages/angular/data-source/src/lib/base.data-source.ts:90

### `Protected`_viewerIds

_viewerIds: Map<BaseDataSourceViewer<any>, string> = ...

a map of viewer to view id. Allows to create a view id from the viewer object reference

Inherited from BaseDataSource._viewerIds

- Defined in packages/angular/data-source/src/lib/base.data-source.ts:89

### `Readonly` change$

change$: Subject<Target> = ...

Inherited from BaseDataSource.change$

- Defined in packages/angular/data-source/src/lib/base.data-source.ts:67

### `Readonly` dataSource

dataSource: BaseDataSource<Source>

- Defined in packages/angular/data-source/src/lib/pipe.data-source.ts:57

### `Readonly` destroyed$

destroyed$: undefined | Subject<void> = ...

Emits if the data source is destroyed

Inherited from BaseDataSource.destroyed$

- Defined in packages/angular/definition/src/lib/definition.ts:48

### `Readonly` error$

error$: ReplaySubject<Error> = ...

Inherited from BaseDataSource.error$

- Defined in packages/angular/data-source/src/lib/base.data-source.ts:73

### `Optional` hasError

hasError?: Signal<boolean>

Inherited from BaseDataSource.hasError

- Defined in packages/angular/data-source/src/lib/base.data-source.ts:94

### `Readonly` hasError$

hasError$: ToggleSubject = ...

Inherited from BaseDataSource.hasError$

- Defined in packages/angular/data-source/src/lib/base.data-source.ts:72

### `Readonly` initialised$

initialised$: undefined | Subject<void> = ...

Emits if the data source is initialised

Inherited from BaseDataSource.initialised$

- Defined in packages/angular/definition/src/lib/definition.ts:52

### `Readonly` interceptors

interceptors: undefined | Set<Subject<any>> = ...

Inherited from BaseDataSource.interceptors

- Defined in packages/angular/definition/src/lib/definition.ts:53

### `Optional` loading

loading?: Signal<boolean>

Inherited from BaseDataSource.loading

- Defined in packages/angular/data-source/src/lib/base.data-source.ts:92

### loading$

loading$: Observable<boolean> = EMPTY

Indicates weather the data source is currently loading new data

Inherited from BaseDataSource.loading$

- Defined in packages/angular/data-source/src/lib/base.data-source.ts:71

### metadata

metadata: BaseDataSourceMetadata

Inherited from BaseDataSource.metadata

- Defined in packages/angular/definition/src/lib/definition.ts:44

### `Static` `Readonly` destroyed$

destroyed$: Subject<BaseDefinition<BaseDefinitionMetadata>> = ...

Emits when a new Definition instance is initialised

Inherited from BaseDataSource.destroyed$

- Defined in packages/angular/definition/src/lib/definition.ts:41

### `Static` `Readonly` initialised$

initialised$: Subject<BaseDefinition<BaseDefinitionMetadata>> = ...

Emits when a new Definition instance is initialised

Inherited from BaseDataSource.initialised$

- Defined in packages/angular/definition/src/lib/definition.ts:35

### `Static` `Readonly` instances

instances: Map<string, BaseDefinition<BaseDefinitionMetadata>> = ...

A map of active Definition instances

Inherited from BaseDataSource.instances

- Defined in packages/angular/definition/src/lib/definition.ts:27

##
Accessors

### data

- get data(): undefined | Data

  #### Returns undefined | Data

  Inherited from BaseDataSource.data

  - Defined in packages/angular/data-source/src/lib/base.data-source.ts:106

### hasConnections

- get hasConnections(): boolean

  #### Returns boolean

  Inherited from BaseDataSource.hasConnections

  - Defined in packages/angular/data-source/src/lib/base.data-source.ts:110

### id

- get id(): string

  #### Returns string

  Inherited from BaseDataSource.id

  - Defined in packages/angular/definition/src/lib/definition.ts:87

### lastRefreshed

- get lastRefreshed(): null | Date

  #### Returns null | Date

  Inherited from BaseDataSource.lastRefreshed

  - Defined in packages/angular/data-source/src/lib/base.data-source.ts:74

### `Protected` operations

- get operations(): OperatorFunction<any, any>[]

  #### Returns OperatorFunction<any, any>[]

  - Defined in packages/angular/data-source/src/lib/pipe.data-source.ts:79

##
Methods

### `Protected`_connect

- _connect(
  viewer: BaseDataSourceViewer,
  ): Observable<Target> | [Observable<Target>, TeardownLogic]

  #### Parameters

  - viewer: BaseDataSourceViewer

  #### Returns Observable<Target> | [Observable<Target>, TeardownLogic]

  Overrides BaseDataSource._connect

  - Defined in packages/angular/data-source/src/lib/pipe.data-source.ts:124

### `Protected`_disconnect

- _disconnect(viewerId: string): void

  #### Parameters

  - viewerId: string

  #### Returns void

  Inherited from BaseDataSource._disconnect

  - Defined in packages/angular/data-source/src/lib/base.data-source.ts:308

### applyMetadata

- applyMetadata(partialMetadata: Partial<BaseDataSourceMetadata>): void

  #### Parameters

  - partialMetadata: Partial<BaseDataSourceMetadata>

  #### Returns void

  Inherited from BaseDataSource.applyMetadata

  - Defined in packages/angular/definition/src/lib/definition.ts:111

### attach

- attach(viewerId: string): Observable<Target>

  #### Parameters

  - viewerId: string

  #### Returns Observable<Target>

  Inherited from BaseDataSource.attach

  - Defined in packages/angular/data-source/src/lib/base.data-source.ts:210

### connect

- connect(viewerOrString: string | BaseDataSourceViewer<any>): Observable<Target>

  #### Parameters

  - viewerOrString: string | BaseDataSourceViewer<any>

  #### Returns Observable<Target>

  Inherited from BaseDataSource.connect

  - Defined in packages/angular/data-source/src/lib/base.data-source.ts:124

### derive

- derive(
  id: string,
  metadata?: Partial<BaseDataSourceMetadata>,
  ): BaseDataSource<any>

  #### Parameters

  - id: string
  - metadata: Partial<BaseDataSourceMetadata> = ...

  #### Returns BaseDataSource<any>

  Inherited from BaseDataSource.derive

  - Defined in packages/angular/data-source/src/lib/base.data-source.ts:270

### destroy

- destroy(): void

  #### Returns void

  #### Deprecated

  use ngOnDestroy instead

  Inherited from BaseDataSource.destroy

  - Defined in packages/angular/definition/src/lib/definition.ts:118

### disconnect

- disconnect(viewerOrId: string | BaseDataSourceViewer<any>): void

  #### Parameters

  - viewerOrId: string | BaseDataSourceViewer<any>

  #### Returns void

  Inherited from BaseDataSource.disconnect

  - Defined in packages/angular/data-source/src/lib/base.data-source.ts:225

### `Protected` genericRetryFunction

- genericRetryFunction(error: any, retryCount: number): Observable<any>

  #### Parameters

  - error: any
  - retryCount: number

  #### Returns Observable<any>

  Inherited from BaseDataSource.genericRetryFunction

  - Defined in packages/angular/data-source/src/lib/base.data-source.ts:311

### getMetadata

- getMetadata(): null | BaseDataSourceMetadata

  #### Returns null | BaseDataSourceMetadata

  Inherited from BaseDataSource.getMetadata

  - Defined in packages/angular/definition/src/lib/definition.ts:107

### getViewerId

- getViewerId(viewer: BaseDataSourceViewer): string

  #### Parameters

  - viewer: BaseDataSourceViewer

  #### Returns string

  Inherited from BaseDataSource.getViewerId

  - Defined in packages/angular/data-source/src/lib/base.data-source.ts:114

### `Protected` handelError

- handelError(error: any): void

  #### Parameters

  - error: any

  #### Returns void

  Inherited from BaseDataSource.handelError

  - Defined in packages/angular/data-source/src/lib/base.data-source.ts:317

### init

- init(): void

  #### Returns void

  Inherited from BaseDataSource.init

  - Defined in packages/angular/definition/src/lib/definition.ts:127

### isConnected

- isConnected(viewerOrId: string | BaseDataSourceViewer<any>): boolean

  #### Parameters

  - viewerOrId: string | BaseDataSourceViewer<any>

  #### Returns boolean

  Inherited from BaseDataSource.isConnected

  - Defined in packages/angular/data-source/src/lib/base.data-source.ts:217

### ngOnDestroy

- ngOnDestroy(): void

  A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.

  #### Returns void

  Implementation of OnDestroy.ngOnDestroy

  Overrides BaseDataSource.ngOnDestroy

  - Defined in packages/angular/data-source/src/lib/pipe.data-source.ts:97

### refresh

- refresh(parent?: boolean): any

  #### Parameters

  - parent: boolean = ...

    true - call the refresh method of the parent data source

  #### Returns any

  Overrides BaseDataSource.refresh

  - Defined in packages/angular/data-source/src/lib/pipe.data-source.ts:105

### reset

- reset(): any

  #### Returns any

  Overrides BaseDataSource.reset

  - Defined in packages/angular/data-source/src/lib/pipe.data-source.ts:113

### retry

- retry(): any

  #### Returns any

  Inherited from BaseDataSource.retry

  - Defined in packages/angular/data-source/src/lib/base.data-source.ts:293

### setOperations

- setOperations(
  operation: OperatorFunction<Source, any>,
  ...operations: OperatorFunction<any, any>[],
  ): void

  #### Parameters

  - operation: OperatorFunction<Source, any>
  - ...operations: OperatorFunction<any, any>[]

  #### Returns void

  - Defined in packages/angular/data-source/src/lib/pipe.data-source.ts:83

### toJSON

- toJSON(): object

  #### Returns object

  Overrides BaseDataSource.toJSON

  - Defined in packages/angular/data-source/src/lib/pipe.data-source.ts:117

### toPromise

- toPromise(viewer: BaseDataSourceViewer): Promise<Target>

  Creates a connection to tha data source and converts the Observable into a promise and then disconnects the viewer

  #### Parameters

  - viewer: BaseDataSourceViewer

  #### Returns Promise<Target>

  Inherited from BaseDataSource.toPromise

  - Defined in packages/angular/data-source/src/lib/base.data-source.ts:264

### `Protected` viewerToOperations

- viewerToOperations(viewer: BaseDataSourceViewer): OperatorFunction<any, any>[]

  #### Parameters

  - viewer: BaseDataSourceViewer

  #### Returns OperatorFunction<any, any>[]

  - Defined in packages/angular/data-source/src/lib/pipe.data-source.ts:140

### `Static` add

- add(definition: BaseDefinition): void

  #### Parameters

  - definition: BaseDefinition

  #### Returns void

  Inherited from BaseDataSource.add

  - Defined in packages/angular/definition/src/lib/definition.ts:94

### `Static` remove

- remove(definition: BaseDefinition): void

  #### Parameters

  - definition: BaseDefinition

  #### Returns void

  Inherited from BaseDataSource.remove

  - Defined in packages/angular/definition/src/lib/definition.ts:102