Kysoql
Reference

Salesforce reference map

Map Kysoql builders to the official Salesforce SOQL and REST API documentation.

Kysoql deliberately uses Salesforce terminology rather than inventing a second query language. Use this page when you know the SOQL feature you need and want the corresponding typed builder API.

SOQL SELECT

Salesforce documents a SELECT statement as a field list plus optional clauses such as WHERE, GROUP BY, and ORDER BY. Kysoql exposes those concepts as builder methods and validates them against generated Describe metadata.

Salesforce conceptKysoql guideOfficial Salesforce documentation
SOQL overview and SELECT syntaxMental modelSalesforce Object Query Language (SOQL)
Field lists and FIELDS()Selecting fieldsSELECT
WHERE conditionsFiltering recordsWHERE
ORDER BY, LIMIT, and OFFSETOrdering and paginationORDER BY and OFFSET
Parent and child relationshipsRelationships and joinsRelationship queries
Aggregate functions and GROUP BYCounts and aggregate reportsAggregate functions and GROUP BY
Date functions and literalsDate functions and literalsDate functions and date formats/literals
SOQL select functionsLabels, currency, and formattingSOQL SELECT functions

REST query execution

Kysoql's native REST executor targets Salesforce's Query and QueryAll resources. The executor follows Salesforce query locators internally for both root results and selected parent-to-child subqueries, including nested subqueries, rather than pretending OFFSET is a cursor or making applications handle nextRecordsUrl.

Salesforce API conceptKysoql guideOfficial Salesforce documentation
Execute a SOQL queryNative REST executionQuery resource
Retrieve additional pagesNative REST executionExecute a SOQL query
Include deleted recordsNative REST executionWorking with searches and queries

Compare equivalent queries

Salesforce's reference commonly starts from raw SOQL. The equivalent Kysoql builder keeps the same concepts visible:

Salesforce SOQL
SELECT Id, Name, BillingCity
FROM Account
WHERE Name LIKE 'A%'
ORDER BY Name DESC NULLS LAST
LIMIT 25
Kysoql
import { db } from "./db";

const query = db
  .selectFrom("Account")
  .select(["Id", "Name", "BillingCity"])
  .where("Name", "like", "A%")
  .orderBy("Name", "desc", "last")
  .limit(25);

query.compile().soql;

The builder does not replace Salesforce documentation for server-side limits, permissions, API-version behaviour, or feature availability. Treat Salesforce's reference as authoritative for the platform and these docs as authoritative for Kysoql's typed API.

On this page