Skip to content

Method set_datadir

marufcetin edited this page Sep 1, 2026 · 1 revision

Method: set_datadir()

Turkce Dokumantasyon | English Documentation

Category: Core Methods
Submodule: AmberDB::Base
Entry Type: Path Configuration


1. Definition and Overview

set_datadir() dynamically updates the root database directory (dbase_dir) of the active AmberDB instance. It automatically recalculates all internal subdirectory paths (schema/, tables/, backup/, buffer/, txn/, cache/) and safely resets open physical connection handles.


2. Syntax and Signature

$adb->set_datadir($directory_path);

3. Practical Code Example

# Switch database store to a separate mounted data volume
$adb->set_datadir("/mnt/nvme_storage/amber_dbstore");

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