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 the exception associated with this record, or null if no exception exists.

foundset

Type JSFoundSet the foundset to which this record belongs.

recordMarkers

Type JSRecordMarkers the record markers associated with this record.

Methods Detailed

createMarkers()

Returns: JSRecordMarkers newly created record markers for this record.

getChangedData()

Returns: JSDataSet a dataset containing the changed data for this record.

getDataSource()

Returns: String the data source associated with this record.

getPKs()

Returns: Array an array of primary key values associated with this record.

hasChangedData()

Returns: Boolean true if the record has modified data; false otherwise.

isEditing()

Returns: Boolean true if the record is in edit mode; false otherwise.

isNew()

Returns: Boolean true if the record is newly created and not yet saved; false otherwise.

isRelatedFoundSetLoaded(relationName)

Parameters

Returns: Boolean true if the related foundset for the given relation name is loaded; false otherwise.

revertChanges()

Returns: void


Last updated

Was this helpful?