Download the PHP package pdombrovsky/dyna-exp without Composer

On this page you can find all versions of the php package pdombrovsky/dyna-exp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dyna-exp

DynaExp

Build DynamoDB expressions (ConditionExpression, FilterExpression, KeyConditionExpression, UpdateExpression, ProjectionExpression) with a small set of typed helpers. DynaExp keeps the verbose string juggling out of your application code while staying close to native DynamoDB semantics.

Requirements

Installation

⚠️ The library is currently in alpha. Interfaces may change between releases until we hit the stable 1.x line.

Overview

Quick Start

The builders never mutate state after build time, so the same nodes can be reused in different expressions.

Evaluation Pipeline

Validation Scope

DynaExp validates local expression-builder invariants: path syntax, path segments, empty builders, and collection node shape. It does not validate your table schema, request shape, key role semantics, or every DynamoDB grammar rule. For example, the package does not know which attributes are partition or sort keys, whether an ADD action targets a valid DynamoDB type, or whether a final set of expressions is valid for a specific DynamoDB operation.

Factories

Attribute

Attribute is the main fluent helper for attribute access in filters, projections, conditions, and updates. Under the hood it wraps an immutable DynaExp\Nodes\Path, validates every segment, and keeps DynamoDB-specific metadata such as deterministic string representations, searchExpression() output, and stable aliased evaluation output.

A single Attribute object can be reused across the whole expression: the helper methods mixed in from ConditionTrait and OperationTrait let you create equality/range/containment checks, attribute existence/type predicates, arithmetic updates, list append/prepend operations, if_not_exists, size(), and more – all off the same root path.

Examples:

Notes:

Key

Description:

Examples:

Notes:

AttributeSize (via Attribute)

Description:

Examples:

Notes:

DefaultValue (via Attribute)

Description:

Examples:

Notes:

Builders

ConditionBuilder

Description:

Examples:

Notes:

KeyConditionBuilder

Description:

Examples:

This shape can be used for DynamoDB multi-attribute GSI key conditions, as well as the traditional partition-key plus sort-key form.

Notes:

ProjectionBuilder

Description:

Examples:

Notes:

UpdateBuilder

Description:

Examples:

Nested operations for SET

Notes:

Complex nested update

ExpressionBuilder

Description:

Examples:

Notes:

Advanced Customization

ExpressionPreprocessorInterface

ExpressionPreprocessorInterface is an advanced hook for local node rewrites before rendering.

Use it only when the expression tree is valid as-is, but you still need a small amount of application-specific preprocessing before aliases are allocated and strings are rendered.

Typical cases:

Important rules:

Prefer the regular builders whenever the expression can already be modeled directly. A preprocessor is an edge-case extension point, not the default way to build expressions.

Example: rewrite one IN (...) condition into smaller chunks

DynamoDB allows at most 100 operands in a single IN condition. You can technically rewrite a larger input into multiple IN (...) groups joined with OR, but this does not remove DynamoDB's overall size limits: each individual expression string is limited to 4 KB, and the total size of expression substitution variables is limited to 2 MB. A preprocessor can help with the IN <= 100 rule, but it is not a general escape hatch for oversized expressions.

This example is intentionally more advanced: it shows that a preprocessor can perform a structural rewrite, not just tweak a scalar value.

Use a preprocessor when:

Do not use a preprocessor when:

The builder creates a fresh evaluator on every build() call, so alias state does not leak between independent compilations.

Supporting Types

Deterministic String Conversion (debug/tests)

Nodes that implement Stringable or contain arrays/objects use a deterministic conversion in NodesToStringTrait:

Note: these conversions are intended for debugging, tests and logs only. Do not use them to build wire payloads for DynamoDB; use the evaluator output and, if needed, marshal values with your SDK/adapter.

⚠️ Recursive references and cyclic structures are not supported. Debug string conversion may fail or produce unusable output for cyclic graphs. Keep arrays and objects finite and acyclic when relying on __toString().

Attribute value aliases

Errors from Attribute::fromString / Path::fromString

Parser provides specific messages with processed prefix for:


All versions of dyna-exp with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2.0
ext-ctype Version *
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pdombrovsky/dyna-exp contains the following files

Loading the files please wait ...