Loading documentation…
Loading documentation…
This page lists the 12 functions of the database family. Taxonomy/source: Database functions. The formula function contract has every family, the engine builds, and the evaluation limits.
All functions
| Function (aliases) | Engine | Contract |
|---|---|---|
DAVERAGE | Full only | |
DCOUNT | Full only | |
DCOUNTA | Full only | |
DGET | Full only | |
DMAX | Full only | |
DMIN | Full only | |
DPRODUCT | Full only | |
DSTDEV | Full only | |
DSTDEVP | Full only | |
DSUM | Full only | |
DVAR | Full only | |
DVARP | Full only |
Argument order, required/default state, accepted shapes, repetition, and return shape come directly from the inventory.
Return shape: scalar.
| Argument | Required | Default | Accepts | Repetition |
|---|---|---|---|---|
database | yes | none | range, reference | once |
field | yes | none | scalar, reference | once |
criteria | yes | none | range, reference | once |
These values are normative for the listed Sheetwrite subset. function-defined and contextual are explicit limitations: consult the formula guides' function-specific sections rather than assuming another spreadsheet's edge behavior.
| Dimension | Contract |
|---|---|
| shape | scalar: accepted range: accepted array: accepted broadcast: none result: scalar |
| coercion | blank: function-defined text: function-defined boolean: function-defined error: function-defined |
| text | case: insensitive wildcard: supported |
| environment | locale: invariant dateSystem: not-applicable |
| numeric | tolerance: binary64 domain: function-defined iteration: kind: none maximum: none |
| calculation | dependencies: tracked lazy: eager spill: scalar fill: relative-reference-rewrite copy: relative-reference-rewrite structuralRewrite: ast-reference-rewrite |
| persistence | snapshot: formula-source history: formula-source collaboration: formula-source xlsxSource: rewrite-on-structural-edit |
| Dialect | Status |
|---|---|
| Microsoft Excel | documented |
| Google Sheets | unverified |
| OpenFormula | unverified |
Limitations: Available only in the optional @sheetwrite/formulas analysis build; default @sheetwrite/wasm returns #NAME?. Database criteria use header names, AND across columns, and OR across rows. Custom formula predicates under headers that are not database fields are not supported.
| Layer | Status and source/evidence |
|---|---|
| Parser | implementedpackages/wasm/src/calc.rs |
| Evaluator | implementedpackages/wasm/src/eval/analysis/database.rs |
| Formula assist | implementedpackages/core/src/formula-assist.ts |
| Evidence | source-linkedscripts/formula-contract.test.ts |