Skip to content

Commit 5a8e9ab

Browse files
balegasclaude
andauthored
Research and document electric feature flags (#3666)
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 78fc0ae commit 5a8e9ab

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

website/docs/api/config.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,44 @@ The amount of time a consumer process remains active without receiving transacti
307307

308308
</EnvVarConfig>
309309

310+
## Feature Flags
311+
312+
Feature flags enable experimental or advanced features that are not yet enabled by default in production.
313+
314+
### ELECTRIC_FEATURE_FLAGS
315+
316+
<EnvVarConfig
317+
name="ELECTRIC_FEATURE_FLAGS"
318+
defaultValue=""
319+
example="allow_subqueries,tagged_subqueries">
320+
321+
**Available flags:**
322+
323+
- `allow_subqueries` - Enables subquery support in shape WHERE clauses
324+
- `tagged_subqueries` - Enables improved multi-level dependency handling
325+
326+
</EnvVarConfig>
327+
328+
### allow_subqueries
329+
330+
Enables support for subqueries in the WHERE clause of [shape](/docs/guides/shapes) definitions. When enabled, you can use queries in the form:
331+
332+
```sql
333+
WHERE id IN (SELECT user_id FROM memberships WHERE org_id = 'org_123')
334+
```
335+
336+
This allows creating shapes that filter based on related data in other tables, enabling more complex data synchronization patterns.
337+
338+
**Status:** Experimental. Disabled by default in production.
339+
340+
### tagged_subqueries
341+
342+
Subqueries create dependency trees between shapes. Without this flag, when data moves into or out of a dependent shape, the shape is invalidated (returning a 409). With this flag enabled, move operations are handled correctly without invalidation.
343+
344+
See [discussion #2931](https://github.com/electric-sql/electric/discussions/2931) for more details about this feature.
345+
346+
**Status:** Experimental. Disabled by default in production. Requires `allow_subqueries` to be enabled.
347+
310348
## Caching
311349

312350
### ELECTRIC_CACHE_MAX_AGE

0 commit comments

Comments
 (0)