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

WATCH

Register event-driven triggers that fire an OQL block when a condition changes. WATCH is poll-based for external sources (weather, currency) and inotify-based for filesystem changes.

SourceSyntax
FilesystemWATCH "fs:/root/uploads/" ON "create" OPEN NEST ... CLOSE NEST
Weather changeWATCH "weather:Cape Town" ON "change" OPEN NEST ... CLOSE NEST
Currency changeWATCH "currency:USD/ZAR" ON "change" OPEN NEST ... CLOSE NEST
Stream eventWATCH "stream:channel_name" ON "message" OPEN NEST ... CLOSE NEST

Watch for file uploads

WATCH "fs:/root/uploads/" ON "create" OPEN NEST EMIT "New file: " & !EVENT(path) AFTER OCR !EVENT(path) SET ?text AFTER INSERT ?text_record INTO "documents" FROM "app" CLOSE NEST

Watch for currency movement

WATCH "currency:USD/ZAR" ON "change" OPEN NEST EMAIL "USD/ZAR changed to " & !EVENT(value) TO "trader@example.com" WITH "FX Alert" CLOSE NEST

Event object fields

Source!EVENT fields
Filesystempath, event (create|modify|delete)
Weather / Currencytype ("change"), value (new), prev (old)
Streamchannel, message (the streamed value)

Manage watches

LIST WATCHES SET ?watches AFTER EMIT ?watches DELETE WATCH "currency:USD/ZAR"