Skip to content

Commit a3eb43d

Browse files
committed
Add field references, hooks, and join strategies to schema
Introduces support for field references in filter operators, adds Hook and HookEvent schemas and documentation, and implements join strategy options for joins. Aggregation nodes now support filter clauses. Updates documentation and JSON schemas to reflect these enhancements, and extends PluginContext and Manifest with driver and function contributions.
1 parent 4559cff commit a3eb43d

26 files changed

+847
-10
lines changed

content/docs/references/data/filter/ComparisonOperator.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: ComparisonOperator Schema Reference
77

88
| Property | Type | Required | Description |
99
| :--- | :--- | :--- | :--- |
10-
| **$gt** | `number \| string` | optional | |
11-
| **$gte** | `number \| string` | optional | |
12-
| **$lt** | `number \| string` | optional | |
13-
| **$lte** | `number \| string` | optional | |
10+
| **$gt** | `number \| string \| object` | optional | |
11+
| **$gte** | `number \| string \| object` | optional | |
12+
| **$lt** | `number \| string \| object` | optional | |
13+
| **$lte** | `number \| string \| object` | optional | |

content/docs/references/data/filter/FieldOperators.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ description: FieldOperators Schema Reference
99
| :--- | :--- | :--- | :--- |
1010
| **$eq** | `any` | optional | |
1111
| **$ne** | `any` | optional | |
12-
| **$gt** | `number \| string` | optional | |
13-
| **$gte** | `number \| string` | optional | |
14-
| **$lt** | `number \| string` | optional | |
15-
| **$lte** | `number \| string` | optional | |
12+
| **$gt** | `number \| string \| object` | optional | |
13+
| **$gte** | `number \| string \| object` | optional | |
14+
| **$lt** | `number \| string \| object` | optional | |
15+
| **$lte** | `number \| string \| object` | optional | |
1616
| **$in** | `any[]` | optional | |
1717
| **$nin** | `any[]` | optional | |
1818
| **$between** | `any[]` | optional | |
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: FieldReference
3+
description: FieldReference Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **$field** | `string` || Field Reference/Column Name |
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Hook
3+
description: Hook Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Hook unique name (snake_case) |
11+
| **label** | `string` | optional | Description of what this hook does |
12+
| **object** | `string \| string[]` || Target object(s) |
13+
| **events** | `Enum<'beforeFind' \| 'afterFind' \| 'beforeFindOne' \| 'afterFindOne' \| 'beforeCount' \| 'afterCount' \| 'beforeAggregate' \| 'afterAggregate' \| 'beforeInsert' \| 'afterInsert' \| 'beforeUpdate' \| 'afterUpdate' \| 'beforeDelete' \| 'afterDelete'>[]` || Lifecycle events |
14+
| **handler** | `string` | optional | Function handler name (e.g. "my_plugin.validate_account") |
15+
| **script** | `string` | optional | Inline script body |
16+
| **priority** | `number` | optional | Execution priority |
17+
| **async** | `boolean` | optional | Run specifically as fire-and-forget |
18+
| **onError** | `Enum<'abort' \| 'log'>` | optional | Error handling strategy |
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: HookEvent
3+
description: HookEvent Schema Reference
4+
---
5+
6+
## Allowed Values
7+
8+
* `beforeFind`
9+
* `afterFind`
10+
* `beforeFindOne`
11+
* `afterFindOne`
12+
* `beforeCount`
13+
* `afterCount`
14+
* `beforeAggregate`
15+
* `afterAggregate`
16+
* `beforeInsert`
17+
* `afterInsert`
18+
* `beforeUpdate`
19+
* `afterUpdate`
20+
* `beforeDelete`
21+
* `afterDelete`
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"title": "Hook"
3+
}

content/docs/references/data/meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"dataset",
66
"field",
77
"filter",
8+
"hook",
89
"mapping",
910
"object",
1011
"query",

content/docs/references/data/query/AggregationNode.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ description: AggregationNode Schema Reference
1111
| **field** | `string` | optional | Field to aggregate (optional for COUNT(*)) |
1212
| **alias** | `string` || Result column alias |
1313
| **distinct** | `boolean` | optional | Apply DISTINCT before aggregation |
14+
| **filter** | `any` | optional | Filter/Condition to apply to the aggregation (FILTER WHERE clause) |

content/docs/references/data/query/JoinNode.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ description: JoinNode Schema Reference
88
| Property | Type | Required | Description |
99
| :--- | :--- | :--- | :--- |
1010
| **type** | `Enum<'inner' \| 'left' \| 'right' \| 'full'>` || Join type |
11+
| **strategy** | `Enum<'auto' \| 'database' \| 'hash' \| 'loop'>` | optional | Execution strategy hint |
1112
| **object** | `string` || Object/table to join |
1213
| **alias** | `string` | optional | Table alias |
1314
| **on** | `any` || Join condition |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: JoinStrategy
3+
description: JoinStrategy Schema Reference
4+
---
5+
6+
## Allowed Values
7+
8+
* `auto`
9+
* `database`
10+
* `hash`
11+
* `loop`

0 commit comments

Comments
 (0)