ECSQLOPTIONS or OPTIONS clause
ECSQLOPTIONS (or OPTIONS for short) specifies flags that affect processing of the ECSQL statement.
Syntax: <select-stmt> OPTIONS option[=val] [option[=val] ...]
Supported options include:
USE_JS_PROP_NAMESformats JSON from the instance accessor using JavaScript property names and class-name values.DO_NOT_TRUNCATE_BLOBreturns the full blob instead of truncating it when using the instance accessor.ENABLE_EXPERIMENTAL_FEATURESenables experimental features.NAV_REL_CLASSID_FALLBACKtreats an end-table navigation property with a non-nullIdand nullRelECClassIdas an instance of the relationship declared by the navigation property. It affects relationship class queries andECVLib.Relations(), but does not change the stored navigation property'sRelECClassId.
NAV_REL_CLASSID_FALLBACK is intended for legacy data that omitted the relationship class id. It adds an OR ... IS NULL predicate and an IFNULL projection, which may result in less efficient query plans. Enable it only for queries that need the compatibility behavior.
USE_JS_PROP_NAMES controls the JSON produced by the $ instance accessor and is distinct from reader formatting. The similarly named reader option QueryRowFormat.UseJsPropertyNames, which controls the surrounding query-row representation, is deprecated. See ECSQL row formats.
Get an instance as JSON with iTwin.js property names:
Last Updated: 28 October, 2026