Skip to content
Search
DSL · Pg query

conditions

Definition

/**
 * Create a condition builder for fluent condition composition.
 *
 * This builder allows incremental condition building with a fluent API:
 *
 * ```php
 * $builder = conditions();
 *
 * if ($hasFilter) {
 *     $builder = $builder->and(eq(col('status'), literal('active')));
 * }
 *
 * if (!$builder->isEmpty()) {
 *     $query = select()->from(table('users'))->where($builder);
 * }
 * ```
 */
conditions() : ConditionBuilder

Contributors

Built in the open.

Join us on GitHub
scroll back to top