| Ocalt Query Language
Pricing Dashboard ocalt.com v1.0

Introduction

OQL (Ocalt Query Language) is a compiled, verb-first, server-side language. Every statement begins with a verb. No objects. No dot notation. No framework. One fetch() call — or one .oql file — is your entire backend.

How it works

OQL runs inside the Ocalt runtime. You send a query over HTTPS. The runtime compiles it into an execution graph and runs it. The result comes back as JSON.

EMIT "Hello, World!"
Try it ›

The only client code you write

From JavaScript, Python, PHP, or any HTTP client — your entire backend is one POST request:

fetch('https://oql.ocalt.com/v1/query', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ auth: { username: 'username_or_email_or_phone', password: 'your_ocalt_password' }, query: 'EMIT "Hello"' }) })

No framework. No middleware. No server configuration. The OQL runtime is the backend.

Language properties

PropertyWhat it means
VERB-FIRSTEvery statement: VERB operand [modifiers] [SET ?var]
COMPILEDQueries compile to an execution graph before running. No interpreted loop.
DETERMINISTICSame inputs always produce the same output.
SANDBOXEDEach account has an isolated /root/ filesystem and daily quota.
ASYNC-NATIVEAND is true parallel execution. AFTER is sequential. OR is fallback.
COMPLETE BACKENDNo framework required. OQL is the server.

Site Mode

For full websites: place an index.oql file in /root/sites/{subdomain}/. Every HTTP request to that subdomain runs through it.

IF !REQUEST(path) IS EQUAL TO "/" OPEN NEST EMIT "<h1>Welcome</h1>" CLOSE NEST ELSE IF !REQUEST(path) IS EQUAL TO "/api/hello" OPEN NEST HEADER "Content-Type" AS "application/json" AFTER EMIT `{"message":"Hello from OQL"}` CLOSE NEST ELSE OPEN NEST STATUS 404 AFTER EMIT "Not found" CLOSE NEST

A taste of OQL

Transform text, measure it, and emit a report — in one sequential pipeline:

UPPER "engineering magic" SET ?u AFTER LENGTH ?u SET ?len AFTER EMIT ?u & " (" & ?len & " chars)"
Try it ›

Fetch two APIs simultaneously and combine results:

FETCH "https://httpbin.org/uuid" SET ?a AND FETCH "https://httpbin.org/uuid" SET ?b AFTER EMIT ?a(uuid) & " | " & ?b(uuid)
Try it ›

Feature overview

CategoryVerbs
StringsUPPER LOWER UCWORDS TRIM STRING REPLACE SPLIT JOIN LENGTH PAD SLICE MATCH CONTAINS STARTS ENDS INDEX REPLICATE CHARS WORDS REVERSE STRING
ArraysNEW ARRAY · ENLIST · APPEND · SORT · REVERSE · UNIQUE · FLATTEN · FIRST · LAST · PLUCK · SLICE · LENGTH · COLLAPSE
ComputeCALCULATE CAST UUID HASH ENCRYPT DECRYPT SIGN VERIFY COMPARE RANDOM
DatabaseCREATE DATABASE · CREATE TABLE · INSERT · QUERY · UPDATE · PURGE · FLUSH TABLE · DELETE TABLE · DELETE DATABASE · DATABASE LIST · TABLE LIST
FilesystemWRITE READ LIST STAT EXISTS COPY MOVE REMOVE MKDIR COMPRESS DECOMPRESS SHARE UNSHARE SEARCH CLEAR FILE SELECT
NetworkFETCH GET POST PUT DELETE PING RESOLVE DOWNLOAD UPLOAD CONNECT SUBSCRIBE PUBLISH
AuthREGISTER LOGIN LOGOUT SESSION REFRESH REVOKE CONFIRM COMPARE — per-namespace user account system for your end-users
EmailEMAIL · NOTIFY (web push) · WEBHOOK
ImageIMAGE LOAD · RESIZE · CROP · ROTATE · FLIP · FILTER · WATERMARK · THUMBNAIL · COMPOSITE · HISTOGRAM · RAW IMAGE CREATE
Audio / VideoTRANSCODE · TRIM VIDEO · TRIM AUDIO · SPLICE · CONCAT MEDIA · EXTRACT FRAME · EXTRACT AUDIO · OVERLAY · SUBTITLE · TEXT ON VIDEO · BLUR VIDEO · COLOR GRADE · MIRROR VIDEO · REVERSE VIDEO · SPEED VIDEO · LOOP VIDEO · BOOMERANG VIDEO · FREEZE FRAME · GREEN SCREEN · SPLIT SCREEN · TRANSITION VIDEO · STABILIZE VIDEO · FADE VIDEO · FADE AUDIO · MIX AUDIO · NORMALIZE AUDIO · PITCH AUDIO · SET VOLUME · MUTE VIDEO · REPLACE AUDIO · PROBE MEDIA · INSERT FRAME · INSERT CLIP · REPLACE FRAME · REPLACE CLIP
Maps & DocsMAP GEOCODE · MAP RENDER · MAP ROUTE · MAP DISTANCE · MAP SEARCH · MAP REVERSE · MAP CLUSTER · MAP BOUNDS · DOC CREATE · HTML construction · CONVERT
Real-timeSTREAM BROADCAST WATCH CRON GATHER WebRTC DIRECTIVE
Site ModeFull websites from a single index.oql file — !REQUEST !GET !POST !COOKIE HEADER STATUS REDIRECT COOKIE

Getting started

  1. Create a free account at accounts.ocalt.com.
  2. Open the Live Editor to run your first query.
  3. Read Syntax & Variables to understand the language model.
  4. Browse the Verb Index for a full reference of all verbs and modifiers.