Skip to content

BlockSuite API Documentation / @blocksuite/data-view / DataSourceBase

Class: abstract DataSourceBase

Defined in: packages/affine/data-view/src/core/data-source/base.ts:94

Extended by

Implements

Constructors

new DataSourceBase()

new DataSourceBase(): DataSourceBase

Returns

DataSourceBase

Properties

allPropertyMetas$

abstract allPropertyMetas$: ReadonlySignal<PropertyMetaConfig[]>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:112

Implementation of

DataSource.allPropertyMetas$


context

context: Map<symbol, unknown>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:104


featureFlags$

abstract featureFlags$: ReadonlySignal<DatabaseFlags>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:106

Implementation of

DataSource.featureFlags$


fixedProperties$

fixedProperties$: ReadonlySignal<string[]>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:248


fixedPropertySet

fixedPropertySet: ReadonlySignal<Set<string>>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:253


properties$

abstract properties$: ReadonlySignal<string[]>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:108

Implementation of

DataSource.properties$


propertyMetas$

abstract propertyMetas$: ReadonlySignal<PropertyMetaConfig[]>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:110

Implementation of

DataSource.propertyMetas$


readonly$

abstract readonly$: ReadonlySignal<boolean>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:114

Implementation of

DataSource.readonly$


rows$

abstract rows$: ReadonlySignal<string[]>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:116

Implementation of

DataSource.rows$


viewConverts

abstract viewConverts: ViewConvertConfig[]

Defined in: packages/affine/data-view/src/core/data-source/base.ts:118

Implementation of

DataSource.viewConverts


viewDataList$

abstract viewDataList$: ReadonlySignal<DefaultViewDataType[]>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:120

Implementation of

DataSource.viewDataList$


viewManager

abstract viewManager: ViewManager

Defined in: packages/affine/data-view/src/core/data-source/base.ts:122

Implementation of

DataSource.viewManager


viewMetas

abstract viewMetas: ViewMeta[]

Defined in: packages/affine/data-view/src/core/data-source/base.ts:124

Implementation of

DataSource.viewMetas

Methods

cellValueChange()

Call Signature

abstract cellValueChange(rowId, propertyId, value): void

Defined in: packages/affine/data-view/src/core/data-source/base.ts:126

Parameters
rowId

string

propertyId

string

value

unknown

Returns

void

Implementation of

DataSource.cellValueChange

Call Signature

abstract cellValueChange(rowId, propertyId, value): void

Defined in: packages/affine/data-view/src/core/data-source/base.ts:132

Parameters
rowId

string

propertyId

string

value

unknown

Returns

void

Implementation of

DataSource.cellValueChange


cellValueGet()

abstract cellValueGet(rowId, propertyId): unknown

Defined in: packages/affine/data-view/src/core/data-source/base.ts:138

Parameters

rowId

string

propertyId

string

Returns

unknown

Implementation of

DataSource.cellValueGet


cellValueGet$()

cellValueGet$(rowId, propertyId): ReadonlySignal<unknown>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:140

Parameters

rowId

string

propertyId

string

Returns

ReadonlySignal<unknown>

Implementation of

DataSource.cellValueGet$


contextGet()

contextGet<T>(key): T

Defined in: packages/affine/data-view/src/core/data-source/base.ts:147

Type Parameters

T

T

Parameters

key

DataViewContextKey<T>

Returns

T

Implementation of

DataSource.contextGet


contextSet()

contextSet<T>(key, value): void

Defined in: packages/affine/data-view/src/core/data-source/base.ts:151

Type Parameters

T

T

Parameters

key

DataViewContextKey<T>

value

T

Returns

void


getNormalPropertyAndIndex()

abstract protected getNormalPropertyAndIndex(propertyId): undefined | { column: Column<Record<string, unknown>>; index: number; }

Defined in: packages/affine/data-view/src/core/data-source/base.ts:257

Parameters

propertyId

string

Returns

undefined | { column: Column<Record<string, unknown>>; index: number; }


isFixedProperty()

isFixedProperty(propertyId): boolean

Defined in: packages/affine/data-view/src/core/data-source/base.ts:264

Parameters

propertyId

string

Returns

boolean


propertyAdd()

abstract propertyAdd(insertToPosition, type?): undefined | string

Defined in: packages/affine/data-view/src/core/data-source/base.ts:155

Parameters

insertToPosition

InsertToPosition

type?

string

Returns

undefined | string

Implementation of

DataSource.propertyAdd


propertyCanDelete()

propertyCanDelete(propertyId): boolean

Defined in: packages/affine/data-view/src/core/data-source/base.ts:101

Parameters

propertyId

string

Returns

boolean

Implementation of

DataSource.propertyCanDelete


propertyCanDuplicate()

propertyCanDuplicate(propertyId): boolean

Defined in: packages/affine/data-view/src/core/data-source/base.ts:98

Parameters

propertyId

string

Returns

boolean

Implementation of

DataSource.propertyCanDuplicate


propertyDataGet()

abstract propertyDataGet(propertyId): Record<string, unknown>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:160

Parameters

propertyId

string

Returns

Record<string, unknown>

Implementation of

DataSource.propertyDataGet


propertyDataGet$()

propertyDataGet$(propertyId): ReadonlySignal<undefined | Record<string, unknown>>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:162

Parameters

propertyId

string

Returns

ReadonlySignal<undefined | Record<string, unknown>>

Implementation of

DataSource.propertyDataGet$


propertyDataSet()

abstract propertyDataSet(propertyId, data): void

Defined in: packages/affine/data-view/src/core/data-source/base.ts:168

Parameters

propertyId

string

data

Record<string, unknown>

Returns

void

Implementation of

DataSource.propertyDataSet


propertyDataTypeGet()

abstract propertyDataTypeGet(propertyId): undefined | TypeInstance

Defined in: packages/affine/data-view/src/core/data-source/base.ts:173

Parameters

propertyId

string

Returns

undefined | TypeInstance

Implementation of

DataSource.propertyDataTypeGet


propertyDataTypeGet$()

propertyDataTypeGet$(propertyId): ReadonlySignal<undefined | TypeInstance>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:175

Parameters

propertyId

string

Returns

ReadonlySignal<undefined | TypeInstance>

Implementation of

DataSource.propertyDataTypeGet$


propertyDelete()

abstract propertyDelete(id): void

Defined in: packages/affine/data-view/src/core/data-source/base.ts:181

Parameters

id

string

Returns

void

Implementation of

DataSource.propertyDelete


propertyDuplicate()

abstract propertyDuplicate(propertyId): undefined | string

Defined in: packages/affine/data-view/src/core/data-source/base.ts:183

Parameters

propertyId

string

Returns

undefined | string

Implementation of

DataSource.propertyDuplicate


propertyMetaGet()

abstract propertyMetaGet(type): undefined | PropertyMetaConfig

Defined in: packages/affine/data-view/src/core/data-source/base.ts:185

Parameters

type

string

Returns

undefined | PropertyMetaConfig

Implementation of

DataSource.propertyMetaGet


propertyNameGet()

abstract propertyNameGet(propertyId): string

Defined in: packages/affine/data-view/src/core/data-source/base.ts:187

Parameters

propertyId

string

Returns

string

Implementation of

DataSource.propertyNameGet


propertyNameGet$()

propertyNameGet$(propertyId): ReadonlySignal<undefined | string>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:189

Parameters

propertyId

string

Returns

ReadonlySignal<undefined | string>

Implementation of

DataSource.propertyNameGet$


propertyNameSet()

abstract propertyNameSet(propertyId, name): void

Defined in: packages/affine/data-view/src/core/data-source/base.ts:193

Parameters

propertyId

string

name

string

Returns

void

Implementation of

DataSource.propertyNameSet


propertyReadonlyGet()

propertyReadonlyGet(_propertyId): boolean

Defined in: packages/affine/data-view/src/core/data-source/base.ts:195

Parameters

_propertyId

string

Returns

boolean

Implementation of

DataSource.propertyReadonlyGet


propertyReadonlyGet$()

propertyReadonlyGet$(propertyId): ReadonlySignal<boolean>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:199

Parameters

propertyId

string

Returns

ReadonlySignal<boolean>

Implementation of

DataSource.propertyReadonlyGet$


propertyTypeCanSet()

propertyTypeCanSet(propertyId): boolean

Defined in: packages/affine/data-view/src/core/data-source/base.ts:95

Parameters

propertyId

string

Returns

boolean

Implementation of

DataSource.propertyTypeCanSet


propertyTypeGet()

abstract propertyTypeGet(propertyId): undefined | string

Defined in: packages/affine/data-view/src/core/data-source/base.ts:203

Parameters

propertyId

string

Returns

undefined | string

Implementation of

DataSource.propertyTypeGet


propertyTypeGet$()

propertyTypeGet$(propertyId): ReadonlySignal<undefined | string>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:205

Parameters

propertyId

string

Returns

ReadonlySignal<undefined | string>

Implementation of

DataSource.propertyTypeGet$


propertyTypeSet()

abstract propertyTypeSet(propertyId, type): void

Defined in: packages/affine/data-view/src/core/data-source/base.ts:209

Parameters

propertyId

string

type

string

Returns

void

Implementation of

DataSource.propertyTypeSet


rowAdd()

abstract rowAdd(InsertToPosition): string

Defined in: packages/affine/data-view/src/core/data-source/base.ts:211

Parameters

InsertToPosition

number | InsertToPosition

Returns

string

Implementation of

DataSource.rowAdd


rowDelete()

abstract rowDelete(ids): void

Defined in: packages/affine/data-view/src/core/data-source/base.ts:213

Parameters

ids

string[]

Returns

void

Implementation of

DataSource.rowDelete


rowMove()

abstract rowMove(rowId, position): void

Defined in: packages/affine/data-view/src/core/data-source/base.ts:215

Parameters

rowId

string

position

InsertToPosition

Returns

void

Implementation of

DataSource.rowMove


viewDataAdd()

abstract viewDataAdd(viewData): string

Defined in: packages/affine/data-view/src/core/data-source/base.ts:217

Parameters

viewData

DefaultViewDataType

Returns

string

Implementation of

DataSource.viewDataAdd


viewDataDelete()

abstract viewDataDelete(viewId): void

Defined in: packages/affine/data-view/src/core/data-source/base.ts:219

Parameters

viewId

string

Returns

void

Implementation of

DataSource.viewDataDelete


viewDataDuplicate()

abstract viewDataDuplicate(id): string

Defined in: packages/affine/data-view/src/core/data-source/base.ts:221

Parameters

id

string

Returns

string

Implementation of

DataSource.viewDataDuplicate


viewDataGet()

abstract viewDataGet(viewId): undefined | DefaultViewDataType

Defined in: packages/affine/data-view/src/core/data-source/base.ts:223

Parameters

viewId

string

Returns

undefined | DefaultViewDataType

Implementation of

DataSource.viewDataGet


viewDataGet$()

viewDataGet$(viewId): ReadonlySignal<undefined | DefaultViewDataType>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:225

Parameters

viewId

string

Returns

ReadonlySignal<undefined | DefaultViewDataType>

Implementation of

DataSource.viewDataGet$


viewDataMoveTo()

abstract viewDataMoveTo(id, position): void

Defined in: packages/affine/data-view/src/core/data-source/base.ts:229

Parameters

id

string

position

InsertToPosition

Returns

void

Implementation of

DataSource.viewDataMoveTo


viewDataUpdate()

abstract viewDataUpdate<ViewData>(id, updater): void

Defined in: packages/affine/data-view/src/core/data-source/base.ts:231

Type Parameters

ViewData

ViewData extends DefaultViewDataType

Parameters

id

string

updater

(data) => Partial<ViewData>

Returns

void

Implementation of

DataSource.viewDataUpdate


viewMetaGet()

abstract viewMetaGet(type): ViewMeta

Defined in: packages/affine/data-view/src/core/data-source/base.ts:236

Parameters

type

string

Returns

ViewMeta

Implementation of

DataSource.viewMetaGet


viewMetaGet$()

viewMetaGet$(type): ReadonlySignal<undefined | ViewMeta>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:238

Parameters

type

string

Returns

ReadonlySignal<undefined | ViewMeta>

Implementation of

DataSource.viewMetaGet$


viewMetaGetById()

abstract viewMetaGetById(viewId): undefined | ViewMeta

Defined in: packages/affine/data-view/src/core/data-source/base.ts:242

Parameters

viewId

string

Returns

undefined | ViewMeta

Implementation of

DataSource.viewMetaGetById


viewMetaGetById$()

viewMetaGetById$(viewId): ReadonlySignal<undefined | ViewMeta>

Defined in: packages/affine/data-view/src/core/data-source/base.ts:244

Parameters

viewId

string

Returns

ReadonlySignal<undefined | ViewMeta>

Implementation of

DataSource.viewMetaGetById$