BlockSuite API Documentation / @blocksuite/blocks / DatabaseBlockDataSource
Class: DatabaseBlockDataSource
Extends
DataSourceBase
Constructors
new DatabaseBlockDataSource()
new DatabaseBlockDataSource(
model
):DatabaseBlockDataSource
Parameters
model
Returns
Overrides
DataSourceBase.constructor
Defined in
packages/blocks/src/database-block/data-source.ts:103
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:60
properties$
properties$:
ReadonlySignal
<string
[]>
Overrides
DataSourceBase.properties$
Defined in
packages/blocks/src/database-block/data-source.ts:68
readonly$
readonly$:
ReadonlySignal
<boolean
>
Overrides
DataSourceBase.readonly$
Defined in
packages/blocks/src/database-block/data-source.ts:72
rows$
rows$:
ReadonlySignal
<string
[]>
Overrides
DataSourceBase.rows$
Defined in
packages/blocks/src/database-block/data-source.ts:80
viewConverts
viewConverts:
ViewConvertConfig
[] =databaseBlockViewConverts
Overrides
DataSourceBase.viewConverts
Defined in
packages/blocks/src/database-block/data-source.ts:84
viewDataList$
viewDataList$:
ReadonlySignal
<DefaultViewDataType
[]>
Overrides
DataSourceBase.viewDataList$
Defined in
packages/blocks/src/database-block/data-source.ts:86
viewManager
viewManager:
ViewManager
Overrides
DataSourceBase.viewManager
Defined in
packages/blocks/src/database-block/data-source.ts:90
viewMetas
viewMetas:
ViewMeta
[] =databaseBlockViews
Overrides
DataSourceBase.viewMetas
Defined in
packages/blocks/src/database-block/data-source.ts:92
Accessors
doc
Get Signature
get doc():
Doc
Returns
Defined in
packages/blocks/src/database-block/data-source.ts:94
propertyMetas
Get Signature
get propertyMetas():
PropertyMetaConfig
<any
,any
,any
>[]
Returns
PropertyMetaConfig
<any
, any
, any
>[]
Overrides
DataSourceBase.propertyMetas
Defined in
packages/blocks/src/database-block/data-source.ts:99
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:133
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:164
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:180
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:193
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:199
propertyDataTypeGet()
propertyDataTypeGet(
propertyId
):undefined
|TypeInstance
Parameters
propertyId
string
Returns
undefined
| TypeInstance
Overrides
DataSourceBase.propertyDataTypeGet
Defined in
packages/blocks/src/database-block/data-source.ts:206
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:218
propertyDuplicate()
propertyDuplicate(
propertyId
):string
Parameters
propertyId
string
Returns
string
Overrides
DataSourceBase.propertyDuplicate
Defined in
packages/blocks/src/database-block/data-source.ts:228
propertyMetaGet()
propertyMetaGet(
type
):PropertyMetaConfig
Parameters
type
string
Returns
PropertyMetaConfig
Overrides
DataSourceBase.propertyMetaGet
Defined in
packages/blocks/src/database-block/data-source.ts:252
propertyNameGet()
propertyNameGet(
propertyId
):string
Parameters
propertyId
string
Returns
string
Overrides
DataSourceBase.propertyNameGet
Defined in
packages/blocks/src/database-block/data-source.ts:256
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:265
propertyReadonlyGet()
propertyReadonlyGet(
propertyId
):boolean
Parameters
propertyId
string
Returns
boolean
Overrides
DataSourceBase.propertyReadonlyGet
Defined in
packages/blocks/src/database-block/data-source.ts:271
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:276
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:285
rowAdd()
rowAdd(
insertPosition
):string
Parameters
insertPosition
number
| InsertToPosition
Returns
string
Overrides
DataSourceBase.rowAdd
Defined in
packages/blocks/src/database-block/data-source.ts:319
rowDelete()
rowDelete(
ids
):void
Parameters
ids
string
[]
Returns
void
Overrides
DataSourceBase.rowDelete
Defined in
packages/blocks/src/database-block/data-source.ts:328
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:339
viewDataAdd()
viewDataAdd(
viewData
):string
Parameters
viewData
DefaultViewDataType
Returns
string
Overrides
DataSourceBase.viewDataAdd
Defined in
packages/blocks/src/database-block/data-source.ts:351
viewDataDelete()
viewDataDelete(
viewId
):void
Parameters
viewId
string
Returns
void
Overrides
DataSourceBase.viewDataDelete
Defined in
packages/blocks/src/database-block/data-source.ts:359
viewDataDuplicate()
viewDataDuplicate(
id
):string
Parameters
id
string
Returns
string
Overrides
DataSourceBase.viewDataDuplicate
Defined in
packages/blocks/src/database-block/data-source.ts:364
viewDataGet()
viewDataGet(
viewId
):DefaultViewDataType
Parameters
viewId
string
Returns
DefaultViewDataType
Overrides
DataSourceBase.viewDataGet
Defined in
packages/blocks/src/database-block/data-source.ts:368
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:372
viewDataUpdate()
viewDataUpdate<
ViewData
>(id
,updater
):void
Type Parameters
• ViewData extends DefaultViewDataType
Parameters
id
string
updater
(data
) => Partial
<ViewData
>
Returns
void
Overrides
DataSourceBase.viewDataUpdate
Defined in
packages/blocks/src/database-block/data-source.ts:376
viewMetaGet()
viewMetaGet(
type
):ViewMeta
Parameters
type
string
Returns
ViewMeta
Overrides
DataSourceBase.viewMetaGet
Defined in
packages/blocks/src/database-block/data-source.ts:383
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:387
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