Skip to content

BlockSuite API Documentation / @blocksuite/blocks / DatabaseBlockDataSource

Class: DatabaseBlockDataSource

Extends

  • DataSourceBase

Constructors

new DatabaseBlockDataSource()

new DatabaseBlockDataSource(model): DatabaseBlockDataSource

Parameters

model: DatabaseBlockModel

Returns

DatabaseBlockDataSource

Overrides

DataSourceBase.constructor

Defined in

packages/blocks/src/database-block/data-source.ts:100

Properties

context

context: Map<symbol, unknown>

Inherited from

DataSourceBase.context

Defined in

packages/affine/data-view/dist/core/data-source/base.d.ts:57


featureFlags$

featureFlags$: ReadonlySignal<DatabaseFlags>

Overrides

DataSourceBase.featureFlags$

Defined in

packages/blocks/src/database-block/data-source.ts:59


properties$

properties$: ReadonlySignal<string[]>

Overrides

DataSourceBase.properties$

Defined in

packages/blocks/src/database-block/data-source.ts:67


readonly$

readonly$: ReadonlySignal<boolean>

Overrides

DataSourceBase.readonly$

Defined in

packages/blocks/src/database-block/data-source.ts:71


rows$

rows$: ReadonlySignal<string[]>

Overrides

DataSourceBase.rows$

Defined in

packages/blocks/src/database-block/data-source.ts:77


viewConverts

viewConverts: ViewConvertConfig[] = databaseBlockViewConverts

Overrides

DataSourceBase.viewConverts

Defined in

packages/blocks/src/database-block/data-source.ts:81


viewDataList$

viewDataList$: ReadonlySignal<DefaultViewDataType[]>

Overrides

DataSourceBase.viewDataList$

Defined in

packages/blocks/src/database-block/data-source.ts:83


viewManager

viewManager: ViewManager

Overrides

DataSourceBase.viewManager

Defined in

packages/blocks/src/database-block/data-source.ts:87


viewMetas

viewMetas: ViewMeta[] = databaseBlockViews

Overrides

DataSourceBase.viewMetas

Defined in

packages/blocks/src/database-block/data-source.ts:89

Accessors

doc

get doc(): Doc

Returns

Doc

Defined in

packages/blocks/src/database-block/data-source.ts:91


propertyMetas

get propertyMetas(): PropertyMetaConfig<any, any, any>[]

Returns

PropertyMetaConfig<any, any, any>[]

Overrides

DataSourceBase.propertyMetas

Defined in

packages/blocks/src/database-block/data-source.ts:96

Methods

cellValueChange()

cellValueChange(rowId, propertyId, value): void

Parameters

rowId: string

propertyId: string

value: unknown

Returns

void

Overrides

DataSourceBase.cellValueChange

Defined in

packages/blocks/src/database-block/data-source.ts:130


cellValueGet()

cellValueGet(rowId, propertyId): unknown

Parameters

rowId: string

propertyId: string

Returns

unknown

Overrides

DataSourceBase.cellValueGet

Defined in

packages/blocks/src/database-block/data-source.ts:161


cellValueGet$()

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

Parameters

rowId: string

propertyId: string

Returns

ReadonlySignal<unknown>

Inherited from

DataSourceBase.cellValueGet$

Defined in

packages/affine/data-view/dist/core/data-source/base.d.ts:70


contextGet()

contextGet<T>(key): T

Type Parameters

T

Parameters

key: DataViewContextKey<T>

Returns

T

Inherited from

DataSourceBase.contextGet

Defined in

packages/affine/data-view/dist/core/data-source/base.d.ts:71


contextSet()

contextSet<T>(key, value): void

Type Parameters

T

Parameters

key: DataViewContextKey<T>

value: T

Returns

void

Inherited from

DataSourceBase.contextSet

Defined in

packages/affine/data-view/dist/core/data-source/base.d.ts:72


propertyAdd()

propertyAdd(insertToPosition, type?): string

Parameters

insertToPosition: InsertToPosition

type?: string

Returns

string

Overrides

DataSourceBase.propertyAdd

Defined in

packages/blocks/src/database-block/data-source.ts:177


propertyDataGet()

propertyDataGet(propertyId): Record<string, unknown>

Parameters

propertyId: string

Returns

Record<string, unknown>

Overrides

DataSourceBase.propertyDataGet

Defined in

packages/blocks/src/database-block/data-source.ts:190


propertyDataGet$()

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

Parameters

propertyId: string

Returns

ReadonlySignal<undefined | Record<string, unknown>>

Inherited from

DataSourceBase.propertyDataGet$

Defined in

packages/affine/data-view/dist/core/data-source/base.d.ts:75


propertyDataSet()

propertyDataSet(propertyId, data): void

Parameters

propertyId: string

data: Record<string, unknown>

Returns

void

Overrides

DataSourceBase.propertyDataSet

Defined in

packages/blocks/src/database-block/data-source.ts:196


propertyDataTypeGet()

propertyDataTypeGet(propertyId): undefined | TypeInstance

Parameters

propertyId: string

Returns

undefined | TypeInstance

Overrides

DataSourceBase.propertyDataTypeGet

Defined in

packages/blocks/src/database-block/data-source.ts:203


propertyDataTypeGet$()

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

Parameters

propertyId: string

Returns

ReadonlySignal<undefined | TypeInstance>

Inherited from

DataSourceBase.propertyDataTypeGet$

Defined in

packages/affine/data-view/dist/core/data-source/base.d.ts:78


propertyDelete()

propertyDelete(id): void

Parameters

id: string

Returns

void

Overrides

DataSourceBase.propertyDelete

Defined in

packages/blocks/src/database-block/data-source.ts:215


propertyDuplicate()

propertyDuplicate(propertyId): string

Parameters

propertyId: string

Returns

string

Overrides

DataSourceBase.propertyDuplicate

Defined in

packages/blocks/src/database-block/data-source.ts:225


propertyMetaGet()

propertyMetaGet(type): PropertyMetaConfig

Parameters

type: string

Returns

PropertyMetaConfig

Overrides

DataSourceBase.propertyMetaGet

Defined in

packages/blocks/src/database-block/data-source.ts:249


propertyNameGet()

propertyNameGet(propertyId): string

Parameters

propertyId: string

Returns

string

Overrides

DataSourceBase.propertyNameGet

Defined in

packages/blocks/src/database-block/data-source.ts:253


propertyNameGet$()

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

Parameters

propertyId: string

Returns

ReadonlySignal<undefined | string>

Inherited from

DataSourceBase.propertyNameGet$

Defined in

packages/affine/data-view/dist/core/data-source/base.d.ts:83


propertyNameSet()

propertyNameSet(propertyId, name): void

Parameters

propertyId: string

name: string

Returns

void

Overrides

DataSourceBase.propertyNameSet

Defined in

packages/blocks/src/database-block/data-source.ts:262


propertyReadonlyGet()

propertyReadonlyGet(propertyId): boolean

Parameters

propertyId: string

Returns

boolean

Overrides

DataSourceBase.propertyReadonlyGet

Defined in

packages/blocks/src/database-block/data-source.ts:268


propertyReadonlyGet$()

propertyReadonlyGet$(propertyId): ReadonlySignal<boolean>

Parameters

propertyId: string

Returns

ReadonlySignal<boolean>

Inherited from

DataSourceBase.propertyReadonlyGet$

Defined in

packages/affine/data-view/dist/core/data-source/base.d.ts:86


propertyTypeGet()

propertyTypeGet(propertyId): string

Parameters

propertyId: string

Returns

string

Overrides

DataSourceBase.propertyTypeGet

Defined in

packages/blocks/src/database-block/data-source.ts:273


propertyTypeGet$()

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

Parameters

propertyId: string

Returns

ReadonlySignal<undefined | string>

Inherited from

DataSourceBase.propertyTypeGet$

Defined in

packages/affine/data-view/dist/core/data-source/base.d.ts:88


propertyTypeSet()

propertyTypeSet(propertyId, toType): void

Parameters

propertyId: string

toType: string

Returns

void

Overrides

DataSourceBase.propertyTypeSet

Defined in

packages/blocks/src/database-block/data-source.ts:282


rowAdd()

rowAdd(insertPosition): string

Parameters

insertPosition: number | InsertToPosition

Returns

string

Overrides

DataSourceBase.rowAdd

Defined in

packages/blocks/src/database-block/data-source.ts:316


rowDelete()

rowDelete(ids): void

Parameters

ids: string[]

Returns

void

Overrides

DataSourceBase.rowDelete

Defined in

packages/blocks/src/database-block/data-source.ts:325


rowMove()

rowMove(rowId, position): void

Parameters

rowId: string

position: InsertToPosition

Returns

void

Overrides

DataSourceBase.rowMove

Defined in

packages/blocks/src/database-block/data-source.ts:336


viewDataAdd()

viewDataAdd(viewData): string

Parameters

viewData: DefaultViewDataType

Returns

string

Overrides

DataSourceBase.viewDataAdd

Defined in

packages/blocks/src/database-block/data-source.ts:348


viewDataDelete()

viewDataDelete(viewId): void

Parameters

viewId: string

Returns

void

Overrides

DataSourceBase.viewDataDelete

Defined in

packages/blocks/src/database-block/data-source.ts:356


viewDataDuplicate()

viewDataDuplicate(id): string

Parameters

id: string

Returns

string

Overrides

DataSourceBase.viewDataDuplicate

Defined in

packages/blocks/src/database-block/data-source.ts:361


viewDataGet()

viewDataGet(viewId): DefaultViewDataType

Parameters

viewId: string

Returns

DefaultViewDataType

Overrides

DataSourceBase.viewDataGet

Defined in

packages/blocks/src/database-block/data-source.ts:365


viewDataGet$()

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

Parameters

viewId: string

Returns

ReadonlySignal<undefined | DefaultViewDataType>

Inherited from

DataSourceBase.viewDataGet$

Defined in

packages/affine/data-view/dist/core/data-source/base.d.ts:97


viewDataMoveTo()

viewDataMoveTo(id, position): void

Parameters

id: string

position: InsertToPosition

Returns

void

Overrides

DataSourceBase.viewDataMoveTo

Defined in

packages/blocks/src/database-block/data-source.ts:369


viewDataUpdate()

viewDataUpdate<ViewData>(id, updater): void

Type Parameters

ViewData extends DefaultViewDataType

Parameters

id: string

updater

Returns

void

Overrides

DataSourceBase.viewDataUpdate

Defined in

packages/blocks/src/database-block/data-source.ts:373


viewMetaGet()

viewMetaGet(type): ViewMeta

Parameters

type: string

Returns

ViewMeta

Overrides

DataSourceBase.viewMetaGet

Defined in

packages/blocks/src/database-block/data-source.ts:380


viewMetaGet$()

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

Parameters

type: string

Returns

ReadonlySignal<undefined | ViewMeta>

Inherited from

DataSourceBase.viewMetaGet$

Defined in

packages/affine/data-view/dist/core/data-source/base.d.ts:101


viewMetaGetById()

viewMetaGetById(viewId): ViewMeta

Parameters

viewId: string

Returns

ViewMeta

Overrides

DataSourceBase.viewMetaGetById

Defined in

packages/blocks/src/database-block/data-source.ts:384


viewMetaGetById$()

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

Parameters

viewId: string

Returns

ReadonlySignal<undefined | ViewMeta>

Inherited from

DataSourceBase.viewMetaGetById$

Defined in

packages/affine/data-view/dist/core/data-source/base.d.ts:103