Skip to content

Method slug_read

marufcetin edited this page Sep 1, 2026 · 1 revision

Method: slug_read()

Turkce Dokumantasyon | English Documentation

Category: Query & Search Methods
Submodule: AmberDB
Entry Type: URL Slug Resolution


1. Definition and Overview

slug_read() resolves an SEO-friendly URL slug (e.g. "wireless-noise-canceling-headphones") to its underlying Primary Key ID using the bidirectional slug map index (_1.slg).


2. Syntax and Signature

my $record_id = $adb->slug_read($table_id, $slug_text);

3. Practical Code Example

# Web routing controller
my $slug = "ergonomic-mesh-office-chair";
my $product_id = $adb->slug_read("catalog_product", $slug);

if ($product_id) {
    my @product = $adb->read_id("catalog_product", $product_id);
    # Render product details page
}

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