Skip to content

Method config

marufcetin edited this page Sep 1, 2026 · 1 revision

Method: config()

Turkce Dokumantasyon | English Documentation

Category: Core Methods
Submodule: AmberDB
Entry Type: Configuration Management


1. Definition and Overview

config() is AmberDB's deterministic configuration getter and setter. It enables inspecting or mutating engine configuration flags at runtime with automatic hook and side-effect dispatching (such as reloading locale dictionaries when language changes or invalidating cached table paths).


2. Syntax and Signature

# 1. Single scalar getter
my $val = $adb->config($key);

# 2. Bulk getter (returns shallow copy of all configuration key-values)
my $cfg = $adb->config();

# 3. Key-Value setter (supports method chaining)
$adb->config( language => 'de', no_write => 1 );

# 4. Hashref setter
$adb->config({ simple => 1, cache_size => '512M' });

3. Supported Flags

See the detailed dedicated wiki entries for all supported configuration flags:


4. Practical Code Example

# Switch language to German and activate read-only mode dynamically
$adb->config( language => 'de', no_write => 1 );

# Inspect active language
my $current_lang = $adb->config('language'); # 'de'

5. See Also

AmberDB Encyclopedia

Home · A-Z Index


Getting Started & Guides


Core Concepts


Core CRUD Methods


Query, Search & Facets


Transactions & Locks


Cache, Buffer & Low-Level


Locale & Helpers


Maintenance & Tools


Configuration Flags


File Formats


Language

Clone this wiki locally