Msdata.SystInstanceContexts (mscmp_syst_instance v0.1.0)

Defines the data structure of the Application Context.

Applications are written with certain security and connection characteristics in mind which correlate to database roles used by the application for establishing connections. This data type defines the datastore contexts the application is expecting so that Instance records can be validated against the application expectations.

Defined in MscmpSystInstance.

Summary

Functions

Validates update Instance Context parameters for use in updating an existing Instance Context record.

Types

t()

@type t() :: %Msdata.SystInstanceContexts{
  __meta__: Ecto.Schema.Metadata.t(),
  application_context:
    Msdata.SystApplicationContexts.t() | Ecto.Association.NotLoaded.t() | nil,
  application_context_id: Ecto.UUID.t() | nil,
  context_code: binary() | nil,
  db_pool_size: non_neg_integer() | nil,
  diag_role_created: String.t() | nil,
  diag_role_modified: String.t() | nil,
  diag_row_version: integer() | nil,
  diag_timestamp_created: DateTime.t() | nil,
  diag_timestamp_modified: DateTime.t() | nil,
  diag_update_count: integer() | nil,
  diag_wallclock_modified: DateTime.t() | nil,
  id: Ecto.UUID.t() | nil,
  instance: Msdata.SystInstances.t() | Ecto.Association.NotLoaded.t() | nil,
  instance_id: Ecto.UUID.t() | nil,
  internal_name: MscmpSystInstance.Types.instance_context_name() | nil,
  start_context: boolean() | nil
}

Functions

update_changeset(instance_context, update_params \\ %{}, opts \\ [])

Validates update Instance Context parameters for use in updating an existing Instance Context record.

Parameters

  • application_context: The existing Instance Context struct to be updated.

  • update_params: A map containing the parameters for updating the Instance Context.

  • opts: Optional keyword list of validation options.

Options

  • :min_context_code_length (non_neg_integer/0) - Minimum length for context codes The default value is 8.

  • :max_context_code_length (pos_integer/0) - Maximum length for context codes The default value is 64.

Returns

An Ecto.Changeset struct representing the validation result.