Ragex. Dllb. ProjectManager
(Ragex v0.25.0)
View Source
Manages per-project dllb database instances and connection pools.
When :dllb_mode is set to :per_project (or :dllb_instance_per_project is true),
Ragex automatically spawns and manages a dedicated dllb-server OS process
and client connection pool for each project directory.
The internal project info (documents, graphs, vector embeddings, code metrics)
is stored inside <project_path>/.ragex/dllb.redb.
Configuration
config :ragex,
store_backend: :dllb,
dllb_mode: :per_project, # :global (default) or :per_project
dllb_server_bin: nil # Path to dllb-server executable (optional)
Summary
Functions
Returns the pool name or pid for the active project (or default Dllb.Pool).
Returns the active project path.
Executes batch queries against the active project's pool.
Executes batch transaction against the active project's pool.
Returns a specification to start this module under a supervisor.
Ensures a dllb-server process and connection pool exist for project_path.
Locates the dllb-server executable binary path.
Returns the active dllb mode: :per_project or :global.
Returns true if per-project dllb mode is enabled.
Executes a query against the active project's pool.
Sets the active project, spawning or activating its dllb instance.
Starts the ProjectManager GenServer.
Stops the per-project dllb instance for a given path.
Functions
Returns the pool name or pid for the active project (or default Dllb.Pool).
@spec active_project() :: String.t() | nil
Returns the active project path.
@spec batch([String.t()], Keyword.t()) :: [ok: Dllb.Result.t(), error: term()]
Executes batch queries against the active project's pool.
@spec batch_transaction([String.t()], Keyword.t()) :: {:ok, Dllb.Result.t()} | {:error, term()}
Executes batch transaction against the active project's pool.
Returns a specification to start this module under a supervisor.
See Supervisor.
Ensures a dllb-server process and connection pool exist for project_path.
@spec find_dllb_binary() :: String.t() | nil
Locates the dllb-server executable binary path.
@spec mode() :: :per_project | :global
Returns the active dllb mode: :per_project or :global.
@spec per_project_enabled?() :: boolean()
Returns true if per-project dllb mode is enabled.
@spec query(String.t(), Keyword.t()) :: {:ok, Dllb.Result.t()} | {:error, term()}
Executes a query against the active project's pool.
Sets the active project, spawning or activating its dllb instance.
Starts the ProjectManager GenServer.
@spec stop_instance(String.t()) :: :ok
Stops the per-project dllb instance for a given path.