VERSION()

All functions > METADATA > VERSION()

Returns registry version; reload time is set only on a dev workstation.

Signatures

Returns: Registry version; reloaded_at is set on a dev workstation only

VERSION() → ROW(version VARCHAR, reloaded_at VARCHAR)
sql
ParameterTypeRequiredDescription

Notes

  • Always returns a row with version (currently 0.4.1)
  • reloaded_at (UTC ISO-8601 worker ready time) is set on a dev workstation only; NULL on hosted tiers
  • A compile-time value (it changes with each deploy and worker reload): use it inside metaprogramming, e.g. RETURN V := @eval_as_literal(VERSION()[reloaded_at]); a direct call raises UE/FUNCTION-NOT-SUPPORTED, like CURRENT_TIMESTAMP()
  • reloaded_at changes when the API worker restarts (uvicorn hot reload)
  • Compare with SQLVERSION(), which reports the backend database dialect and engine version
  • Part of the FeatureMesh constant functions

Examples

VERSION() through @eval_as_literal()

FeatureQL
RETURN
    has_registry_version := LENGTH(@eval_as_literal(VERSION()[version])) > 0
;
Result
HAS_REGISTRY_VERSION BOOLEAN
true