Introduction
The DataRow API provides a comprehensive toolkit for working with DataRows, the fundamental building blocks of our data structures.
DataRows are used to represent individual records within a larger dataset, allowing for efficient data handling and manipulation.
DataRow Structure
A DataRow has the following attributes:
- ID (String): A unique identifier for the record.
- Name (String): The name or label of the record.
- Data (Object): The actual data being stored in the record.
- Timestamp (Date): The date and time the record was created.
- Parent ID (String): The ID of the parent record.
DataRow Methods
Some key methods:
- get(ID): Retrieve a DataRow by its ID.
- set(Name, Data): Set the name and data of a DataRow.
- delete(ID): Delete a DataRow.
- update(ID, Data): Update a DataRow with new data.
- getParent(ID): Retrieve the parent ID.
Example
Let's create a simple DataRow:
import { DataRow } from './DataRow';
const myDataRow = DataRow({
ID: '12345',
Name: 'John Doe',
Data: {
Description: 'My first DataRow',
Value: 123
},
Timestamp: new Date(),
ParentID: '123'
});
Example Usage
Link to Documentation
The `DataRow` object contains the essential attributes to represent a single data point.