Skip to content

Method table_attr

marufcetin edited this page Sep 1, 2026 · 1 revision

Method: table_attr()

Turkce Dokumantasyon | English Documentation

Category: Core Table Methods
Submodule: AmberDB::Base
Entry Type: Runtime Schema Mutation


1. Definition and Overview

table_attr() inspects or dynamically alters table schema attributes in-memory at runtime without modifying schema files on disk or running migrations. If path-influencing properties (such as language, section, year, path) are updated, it automatically recalculates internal file paths safely.


2. Syntax and Signature

# 1. Single attribute getter
my $val = $adb->table_attr($table_id, $attribute_key);

# 2. Bulk attribute getter (returns shallow copy of table metadata)
my $meta = $adb->table_attr($table_id);

# 3. Key-Value setter (supports method chaining)
$adb->table_attr($table_id, keep_deleted => 1, id_type => "ascii");

# 4. Hashref setter
$adb->table_attr($table_id, { search_block => [ 1, 4, 8 ], use_cache => 2 });

3. Practical Code Example

# Dynamically enable soft-delete archive for the active session
$adb->table_attr("catalog_product", keep_deleted => 1);

4. 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