Class BaseBindCommandAbstract

An abstract class that defines a binding command. This class manages the execution of bind commands and related actions.

Hierarchy (view full)

Constructors

Properties

_guid: string

Unique identifier of the object (GUID). Uniquely identifies the object.

_name: string

The name of the element, which acts as a unique identifier for the MetaElement.

Collection that stores output results.

_type: Function

The generator function of the object. The function used when the object was created.

bind: MetaView

Bind target MetaView object.

cbBegin: ((cmd: BaseBindCommand) => void)

The callback function that is called at the start of execution.

Type declaration

    • (cmd): void
    • Parameters

      Returns void

cbBind: ((bind: MetaView, cmd: BaseBindCommand, setup: object) => void)

Callback function called before bind.

Type declaration

    • (bind, cmd, setup): void
    • Parameters

      • bind: MetaView

        object 'MetaView' to be transmitted.

      • cmd: BaseBindCommand

        current bind command object.

      • setup: object

        setting object.

      Returns void

cbEnd: ((status: object, cmd: BaseBindCommand, response: object) => void)

Callback function called after execution is complete.

Type declaration

    • (status, cmd, response): void
    • Parameters

      • status: object

        Status information.

      • cmd: BaseBindCommand

        current bind command object.

      • response: object

        response object.

      Returns void

cbOutput: ((views: MetaViewCollection, cmd: BaseBindCommand, response: object) => void)

A callback function that outputs binding results. It is mainly used for the output of lists.

Type declaration

    • (views, cmd, response): void
    • Parameters

      Returns void

cbResult: ((data: object, cmd: BaseBindCommand, response: object) => object)

A callback function that handles binding results. It is mainly used for processing result data.

Type declaration

    • (data, cmd, response): object
    • Parameters

      • data: object

        Bind result data.

      • cmd: BaseBindCommand

        current bind command object.

      • response: object

        response object.

      Returns object

      Processed result data.

cbValid: ((valid: MetaView, cmd: BaseBindCommand) => boolean)

Callback function called before valid.

Type declaration

    • (valid, cmd): boolean
    • Parameters

      Returns boolean

      A boolean value indicating the result of the examination.

output: MetaView

Dynamic added output MetaView object.

outputOptions: object

Output attribute options.

  • 0: Except
  • 1: Import rows of all columns
  • 2: Import only rows of existing columns
  • 3: Import only the row of existing curums, set value
valid: MetaView

MetaView object to be examined.

_NS: string

Indicates the namespace.

'Meta'
_PARAM: []

List of parameters used for the constructor.

['name']
_UNION: []

List of implemented interfaces.

[IElement]

Methods

  • Adds a column and maps it to the specified view.

    Parameters

    • column: string | MetaColumn

      This column object is to be registered. It could be a string or 'MetaColumn' object.

    • views: string | string[]

      The name of the view entity to be added; it can be a string or an array of strings.

    • OptionalbTable: string | MetaTable

      (Optional) Default table object or table name to be mapped.

    Returns void

  • Add columns and values and map them to the specified view.

    Parameters

    • name: string

      The name of the column.

    • value: any

      column value.

    • Optionalviews: string | string[]

      (Optional) Name of the view entity to be added.

    • OptionalbTable: string | MetaTable

      (Optional) Default table object or table name to be mapped.

    Returns void

  • Replicate the current object.

    Parameters

    • Rest...args: any[]

      Additional argument to be used for replication.

    Returns this

    Returns a replicated object.

  • Compare the current object with the specified object.

    Parameters

    • target: object

      the object to be compared to.

    Returns boolean

    Returns whether the two objects are the same.

  • Returns the current object as a serialized object. Serialization replaces cyclic references with values of '$ref', and depending on the serialization options, you can select reference structures, redundant structures, and non-contrast structures.

    Parameters

    • OptionalvOpt: number

      Serialization option. Default is '0'.

      • 0: Reference structure (_guid: Yes, $ref: Yes)
      • 1: Redundant structure (_guid: Yes, $ref: Yes)
      • 2: Non-tidal rescue (_guid: no, $ref: no)
    • Optionalowned: object | object[]

    Returns object

    serialized object.

    const serializedObj = element.getObject(2);
    console.log(serializedObj); // serialized object output
  • Returns the creators of the current object and all the creators of the prototype chain to the array.

    Returns Function[]

    Returns the array of generator functions.

    const types = obj.getTypes();
    console.log(types); // [Function: MetaObject]
  • Verify that the current object is an instance of the specified type (including _UNION)

    Parameters

    • target: string | object

      The type of object to be checked (object or string).

    Returns boolean

    Returns whether it is an instance of the specified type.

  • Adds a view entity to use for the output. The default name is 'output' + _outputs.count.

    Parameters

    • Optionalname: string

      (Optional) The name of the view to be referenced additionally.

    Returns void

  • Release the column from the target entity.

    Parameters

    • name: string | string[]

      The column name or array of names to release.

    • views: string | string[]

      The name or array of view entities to be disabled.

    Returns void

  • Delete the output view.

    Parameters

    • name: string

      Name of the view to delete.

    Returns boolean

    A boolean value indicating successful deletion.

  • Set the column.

    Parameters

    • name: string | string[]

      column name or array of names.

    • views: string | string[]

      An array of view names or names to set.

    Returns void

    e.read.setColumn(['idx', 'addr'], 'valid');
    
  • Initialize the current object using the serialized object. In this process, the object is initialized, and the state of the object is restored based on the serialized object (oGuid).

    Parameters

    • oGuid: object

      serialized object.

    • Optionalorigin: object

      Original object. Default is 'oGuid'.

    Returns any