JSBaseSqlRecord

Overview

JSBaseSQLRecord serves as the foundational type for records in SQL-based foundsets, such as those in JSFoundSet or ViewFoundSet. It extends JSBaseRecord, inheriting its base functionality while introducing features tailored to SQL data handling. The exception property handles errors at the record level, while foundset links the record to its originating dataset. Additionally, recordMarkers facilitates the attachment of metadata or annotations directly to records.

Key methods include createMarkers, which generates detailed annotations for a record, and getChangedData, which retrieves altered data within a record. The getPKs method identifies associated primary keys, while hasChangedData confirms if modifications exist. Editing states are managed through isEditing, which checks if a record is in edit mode, and isNew, which identifies newly created records. Relationship management is supported by isRelatedFoundSetLoaded, ensuring related datasets are loaded. The revertChanges method enables rolling back unsaved modifications.

Extends

JSBaseRecord

Properties Summarized

Methods Summarized

Properties Detailed

exception

Type Exception

foundset

Type JSFoundSet

recordMarkers

Type JSRecordMarkers

Methods Detailed

createMarkers()

Returns: JSRecordMarkers

getChangedData()

Returns: JSDataSet

getDataSource()

Returns: String

getPKs()

Returns: Array

hasChangedData()

Returns: Boolean

isEditing()

Returns: Boolean

isNew()

Returns: Boolean

isRelatedFoundSetLoaded(relationName)

Parameters

Returns: Boolean

revertChanges()

Returns: void


Last updated