FrameworkJavaScript
Database row block: properties and page body
An internal block tool that stores a single database row. Not user-insertable — rows are created and managed by the parent Database block. Each row stores property values conforming to the parent database schema and a position string for ordering.
Import
TypeScript
import { DatabaseRow } from '@bloklabs/core/tools';Save Data
TypeScript
interface DatabaseRowData {
properties: Record<string, PropertyValue>; // Column values keyed by property ID
position: string; // Fractional index for ordering
}
// PropertyValue = string | number | boolean | string[] | OutputData | nullJSON
{
"id": "row001",
"type": "database-row",
"data": {
"properties": {
"prop1": "My Task",
"prop2": "In Progress"
},
"position": "a0"
}
}Usage Example
TypeScript
// DatabaseRow is not inserted directly — it is created by the Database tool.
// Access row data via the saved output:
import { Database, DatabaseRow } from '@bloklabs/core/tools';
const editor = new Blok({
holder: 'editor',
tools: {
database: { class: Database },
'database-row': { class: DatabaseRow },
},
});