BlockSuite API Documentation / @blocksuite/blocks / DatabaseService
Class: DatabaseService<TextAttributes>
Extends
Type parameters
• TextAttributes extends AffineTextAttributes
= AffineTextAttributes
Constructors
new DatabaseService(options)
new DatabaseService<
TextAttributes
>(options
):DatabaseService
<TextAttributes
>
Parameters
• options: BlockServiceOptions
Returns
DatabaseService
<TextAttributes
>
Inherited from
Source
packages/framework/block-std/dist/service/index.d.ts:16
Properties
databaseViewInitEmpty()
databaseViewInitEmpty: (
model
,viewMeta
) =>void
Parameters
• model: DatabaseBlockModel
• viewMeta: ViewMeta
Returns
void
Source
packages/blocks/src/database-block/database-service.ts:36
disposables
readonly
disposables:DisposableGroup
Inherited from
Source
packages/framework/block-std/dist/service/index.d.ts:14
flavour
readonly
flavour:string
Inherited from
Source
packages/framework/block-std/dist/service/index.d.ts:13
inlineManager
readonly
inlineManager:InlineManager
<TextAttributes
>
Source
packages/blocks/src/database-block/database-service.ts:21
referenceNodeConfig
readonly
referenceNodeConfig:ReferenceNodeConfig
Source
packages/blocks/src/database-block/database-service.ts:22
specSlots
readonly
specSlots:BlockSpecSlots
Inherited from
Source
packages/framework/block-std/dist/service/index.d.ts:15
std
readonly
std:BlockStdScope
Inherited from
Source
packages/framework/block-std/dist/service/index.d.ts:12
viewPresets
viewPresets:
object
kanbanViewConfig
kanbanViewConfig:
object
kanbanViewConfig.model
model:
DataViewConfig
<KanbanViewData
>
kanbanViewConfig.renderer
renderer:
DataViewRendererConfig
kanbanViewConfig.type
type:
"kanban"
tableViewConfig
tableViewConfig:
object
tableViewConfig.model
model:
DataViewConfig
<TableViewData
>
tableViewConfig.renderer
renderer:
DataViewRendererConfig
tableViewConfig.type
type:
"table"
Source
packages/blocks/src/database-block/database-service.ts:37
Accessors
collection
get
collection():DocCollection
Returns
Source
packages/framework/block-std/dist/service/index.d.ts:17
doc
get
doc():Doc
Returns
Source
packages/framework/block-std/dist/service/index.d.ts:18
host
get
host():HTMLElement
Returns
HTMLElement
Source
packages/framework/block-std/dist/service/index.d.ts:19
selectionManager
get
selectionManager():SelectionManager
Returns
Source
packages/framework/block-std/dist/service/index.d.ts:20
uiEventDispatcher
get
uiEventDispatcher():UIEventDispatcher
Returns
Source
packages/framework/block-std/dist/service/index.d.ts:21
Methods
bindHotKey()
bindHotKey(
keymap
,options
?):void
Parameters
• keymap: Record
<string
, UIEventHandler
>
• options?
• options.global?: boolean
Returns
void
Inherited from
Source
packages/framework/block-std/dist/service/index.d.ts:28
dispose()
dispose():
void
Returns
void
Inherited from
Source
packages/framework/block-std/dist/service/index.d.ts:22
handleEvent()
handleEvent(
name
,fn
,options
?):void
Parameters
• name: "click"
| "doubleClick"
| "tripleClick"
| "pointerDown"
| "pointerMove"
| "pointerUp"
| "pointerOut"
| "dragStart"
| "dragMove"
| "dragEnd"
| "keyDown"
| "keyUp"
| "selectionChange"
| "compositionStart"
| "compositionUpdate"
| "compositionEnd"
| "cut"
| "copy"
| "paste"
| "beforeInput"
| "blur"
| "focus"
| "drop"
| "contextMenu"
| "wheel"
• fn: UIEventHandler
• options?
• options.global?: boolean
Returns
void
Inherited from
Source
packages/framework/block-std/dist/service/index.d.ts:25
initDatabaseBlock()
initDatabaseBlock(
doc
,model
,databaseId
,viewMeta
,isAppendNewRow
):void
Parameters
• doc: Doc
• model: BlockModel
<object
>
• databaseId: string
• viewMeta: ViewMeta
• isAppendNewRow: boolean
= true
Returns
void
Source
packages/blocks/src/database-block/database-service.ts:39
mounted()
mounted():
void
Returns
void
Overrides
Source
packages/blocks/src/database-block/database-service.ts:24
unmounted()
unmounted():
void
Returns
void
Inherited from
Source
packages/framework/block-std/dist/service/index.d.ts:24