ECSQLOPTIONS or OPTIONS clause
ECSQLOPTIONS (or OPTIONS for short) specifies flags that affect processing of the ECSQL statement.
Syntax: <select-stmt> OPTIONS 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.
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:
SELECT $ FROM [BisCore].[Element] OPTIONS USE_JS_PROP_NAMES
/*
$
--------------------
{
"id":"0x1",
"className":"BisCore.Subject",
"model":{
"id":"0x1",
"relClassName":"BisCore.ModelContainsElements"
},
"lastMod":"2023-12-06T15:24:45.785Z",
"codeSpec":{
"id":"0x1f",
"relClassName":"BisCore.CodeSpecSpecifiesCode"
},
"codeScope":{
"id":"0x1",
"relClassName":"BisCore.ElementScopesCode"
},
"codeValue":"Subject of this imodel",
"description":""
}
*/
Last Updated: 02 October, 2026
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.