Files
2026-04-17 14:55:32 -04:00

2.0 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
DataPRO/Modules/PreviousDBVersions/Version57/DatabaseExport/SettingsDB/Setting.cs
DataPRO/Modules/PreviousDBVersions/Version57/DatabaseExport/SettingsDB/GlobalSetting.cs
DataPRO/Modules/PreviousDBVersions/Version57/DatabaseExport/SettingsDB/SettingsDB.cs
2026-04-17T15:55:29.267823+00:00 zai-org/GLM-5-FP8 1 08773b944623c2c5

SettingsDB Module Documentation

1. Purpose

This module provides a singleton-based mechanism for storing and retrieving application settings from a database. It implements a cached settings layer where global configuration values are read from the database on first access and cached in memory. The module is part of a legacy database version (Version57) and supports string, integer, and boolean setting types. It assumes an existing database connection has been established via DbOperations.


2. Public Interface

Setting (Abstract Base Class)

Constructor:

public Setting(string id, PropertyTypes type, string defaultPropertyValue, string userId)

Initializes a new setting with the given ID, type, default value, and user ID. Calls GetPropertyValue(defaultPropertyValue) during construction.

Properties:

  • public string PropertyId — Read-only accessor for the setting's string identifier.
  • public string PropertyValue — Read-only accessor for the setting's string value.

Enum:

public enum PropertyTypes
{
    User = 1 << 0,    // Value: 1
    Global = 1 << 1   // Value: 2
}

Methods:

  • protected abstract void GetPropertyValue(string defaultValue) — Abstract method that derived classes must implement to retrieve the property value (typically from database).
  • public void SetValue(string value) — Sets _propertyValue to the provided string.

GlobalSetting (Concrete Class)

Inherits from Setting.

Constructor:

public GlobalSetting(string id, string defaultPropertyValue)
``