Embedding
Use Ferret as a library inside your Go application. The host application controls which functions, parameters, modules, and capabilities are available to scripts at runtime.
Introduction
Overview
Understand the Engine, Plan, and Session lifecycle and when embedding makes sense.
First steps
Getting Started
Install the library, run your first query from Go, and handle the result.
Runtime modules
Modules
Install, configure, register, and manage modules in an embedded runtime.
Host functions
Custom Functions
Register host-defined functions and namespaces that scripts can call.
Go types
Host Values
Implement Go types that FQL scripts can hold, access, iterate, query, and dispatch to.
Input data
Parameters
Pass data into queries at engine and session level.
Runtime setup
Configuration
Control the standard library, logging, encoding, concurrency, and file system access.
Encoding
Value Encoders
Understand how output values are encoded and implement custom codecs.
Artifacts
Programs
Compile queries to binary artifacts, load pre-compiled programs, and work with the artifact format.