# Data 360 and query options (/docs/core/advanced/data-360)



Kysoql codegen recognises Data Lake Objects (`__dll`) and Data Model Objects
(`__dlm`) and records the `SET OPTIONS` capability on each generated object.
Use the object and field names from your own org.

## Data Lake Objects [#data-lake-objects]

DLO queries can supply a dataspace and opt into empty-string handling:

```ts
import { db } from "./db";

const rows = db
  .selectFrom("ContactPoint__dll")
  .select(["Id", "EmailOptIn__c"])
  .setOptions({
    dataspace: "default",
    honorEmptyStrings: true,
  });
```

When you call `setOptions()` on a DLO, `dataspace` is required and must be
non-empty. Kysoql does not choose a dataspace for you.

## Data Model Objects [#data-model-objects]

DMO record queries can enable `honorEmptyStrings`:

```ts
import { db } from "./db";

const rows = db
  .selectFrom("UnifiedIndividual__dlm")
  .select("Id")
  .setOptions({ honorEmptyStrings: true });
```

Ordinary CRM objects do not expose these Data 360 options. Generated metadata
also lets Kysoql catch several Data 360-specific grouping, `HAVING`, relationship,
and semi-join restrictions before execution.

<SalesforceReference title="SET OPTIONS" href="https://developer.salesforce.com/docs/platform/salesforce-soql-sosl/guide/sforce-api-calls-soql-select-set-options.html" />

## Managed dynamic Apex options [#managed-dynamic-apex-options]

A bound `Database.QueryOptions` value is a different feature from the object-shaped
Data 360 options:

```ts
import { apexBind, type ApexDatabaseQueryOptions } from "@kysoql/core";
import { db } from "./db";

const compiled = db
  .selectFrom("Account")
  .select(["Id", "Name"])
  .dynamicApex()
  .setOptions(apexBind<ApexDatabaseQueryOptions>("queryOptions"))
  .compile();
```

`ApexDatabaseQueryOptions` is a type marker for the Apex value supplied by your
caller. Kysoql does not create that Apex object or execute the query.

Use `dynamicApex()` for this overload. It is not available through normal REST,
JSforce, or static `.apex()` queries.
