Skip to content

Commit eca597f

Browse files
claudehyperpolymath
authored andcommitted
refactor(clients): VCL rename stage B (2/5) — Rust/Zig/Julia/Elixir SDKs
Second sub-stage of #84. Updates the four non-ReScript client SDKs to the renamed wire contract from PR #144 (server route /api/v1/vcl/execute). - connectors/clients/rust/src/vql.rs -> vcl.rs (mod vcl, execute_vcl, Vcl{Request,Response,Result,ParseError,ExecutionError}) - connectors/clients/zig/src/vql.zig -> vcl.zig - connectors/clients/julia/src/vql.jl -> vcl.jl - connectors/clients/elixir/lib/verisim_client/vcl.ex + types.ex - all four now POST /api/v1/vcl/execute Verified: grep-to-zero leaves no vql/VQL/Vql token in the four client trees; endpoint updated in every SDK; symmetric 99/99 diff. Rust client compiles on CI (cargo); Zig/Julia/Elixir renames are mechanical (string + symbol). Refs #84. https://claude.ai/code/session_01W9Voe3JceP66Bna9FT4jME
1 parent 89f1f95 commit eca597f

17 files changed

Lines changed: 99 additions & 99 deletions

File tree

connectors/clients/elixir/lib/verisim_client.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defmodule VeriSimClient do
77
88
Holds connection configuration (base URL, authentication, timeout) and
99
provides low-level HTTP helpers that the domain modules (`Octad`, `Search`,
10-
`Drift`, `Provenance`, `Vql`, `Federation`) delegate to.
10+
`Drift`, `Provenance`, `Vcl`, `Federation`) delegate to.
1111
1212
## Quick Start
1313

connectors/clients/elixir/lib/verisim_client/types.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,13 @@ defmodule VeriSimClient.Types do
247247
}
248248

249249
# ---------------------------------------------------------------------------
250-
# VqlResponse
250+
# VclResponse
251251
# ---------------------------------------------------------------------------
252252

253253
@typedoc """
254-
Response from a VQL query execution or explain request.
254+
Response from a VCL query execution or explain request.
255255
"""
256-
@type vql_response :: %{
256+
@type vcl_response :: %{
257257
required(:success) => boolean(),
258258
required(:statement_type) => String.t(),
259259
required(:row_count) => non_neg_integer(),
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
11
# SPDX-License-Identifier: MPL-2.0
22
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
33

4-
defmodule VeriSimClient.Vql do
4+
defmodule VeriSimClient.Vcl do
55
@moduledoc """
6-
VeriSim Query Language (VQL) execution for VeriSimDB.
6+
VeriSim Query Language (VCL) execution for VeriSimDB.
77
8-
VQL is VeriSimDB's native query language, supporting SQL-like syntax extended
8+
VCL is VeriSimDB's native query language, supporting SQL-like syntax extended
99
with multi-modal operations (vector similarity, graph traversal, spatial
1010
predicates, drift thresholds, etc.). This module provides methods to execute
11-
VQL statements and retrieve explain / query plans.
11+
VCL statements and retrieve explain / query plans.
1212
1313
## Examples
1414
1515
{:ok, client} = VeriSimClient.new("http://localhost:8080")
1616
17-
{:ok, result} = VeriSimClient.Vql.execute(client, "SELECT * FROM octads WHERE drift > 0.5")
17+
{:ok, result} = VeriSimClient.Vcl.execute(client, "SELECT * FROM octads WHERE drift > 0.5")
1818
IO.puts("Rows returned: \#{result["row_count"]}")
1919
20-
{:ok, plan} = VeriSimClient.Vql.explain(client, "SELECT * FROM octads WHERE drift > 0.5")
20+
{:ok, plan} = VeriSimClient.Vcl.explain(client, "SELECT * FROM octads WHERE drift > 0.5")
2121
"""
2222

2323
alias VeriSimClient.Types
2424

2525
@doc """
26-
Execute a VQL statement against the VeriSimDB instance.
26+
Execute a VCL statement against the VeriSimDB instance.
2727
2828
Supports SELECT, INSERT, UPDATE, DELETE, and VeriSimDB-specific statements
2929
like `DRIFT CHECK`, `NORMALIZE`, and `FEDERATE`.
3030
3131
## Parameters
3232
3333
* `client` — A `VeriSimClient.t()` connection.
34-
* `query` — The VQL statement string.
34+
* `query` — The VCL statement string.
3535
"""
3636
@spec execute(VeriSimClient.t(), String.t()) ::
37-
{:ok, Types.vql_response()} | {:error, term()}
37+
{:ok, Types.vcl_response()} | {:error, term()}
3838
def execute(%VeriSimClient{} = client, query) when is_binary(query) do
3939
body = %{query: query}
40-
VeriSimClient.do_post(client, "/api/v1/vql/execute", body)
40+
VeriSimClient.do_post(client, "/api/v1/vcl/execute", body)
4141
end
4242

4343
@doc """
44-
Request an explain / query plan for a VQL statement without executing it.
44+
Request an explain / query plan for a VCL statement without executing it.
4545
4646
Useful for understanding which modalities, indices, and federation peers
4747
would be involved in a query.
4848
4949
## Parameters
5050
5151
* `client` — A `VeriSimClient.t()` connection.
52-
* `query` — The VQL statement string to explain.
52+
* `query` — The VCL statement string to explain.
5353
"""
5454
@spec explain(VeriSimClient.t(), String.t()) ::
55-
{:ok, Types.vql_response()} | {:error, term()}
55+
{:ok, Types.vcl_response()} | {:error, term()}
5656
def explain(%VeriSimClient{} = client, query) when is_binary(query) do
5757
body = %{query: query}
58-
VeriSimClient.do_post(client, "/api/v1/vql/explain", body)
58+
VeriSimClient.do_post(client, "/api/v1/vcl/explain", body)
5959
end
6060
end

connectors/clients/elixir/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ defmodule VeriSimClient.MixProject do
66
Mix project configuration for the VeriSimDB Elixir client SDK.
77
88
Provides octad entity management, multi-modal search (text, vector, spatial),
9-
drift detection, provenance chain operations, VQL query execution, and
9+
drift detection, provenance chain operations, VCL query execution, and
1010
federation across distributed VeriSimDB instances.
1111
"""
1212

connectors/clients/julia/src/VeriSimDBClient.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# VeriSimDB Julia Client — Main module.
55
#
66
# This is the top-level module for the VeriSimDB Julia client SDK. It aggregates
7-
# all submodules (types, error, client, octad, search, drift, provenance, vql,
7+
# all submodules (types, error, client, octad, search, drift, provenance, vcl,
88
# federation) and re-exports the public API.
99
#
1010
# Usage:
@@ -30,7 +30,7 @@ include("octad.jl")
3030
include("search.jl")
3131
include("drift.jl")
3232
include("provenance.jl")
33-
include("vql.jl")
33+
include("vcl.jl")
3434
include("federation.jl")
3535

3636
# --- Public exports ---
@@ -44,7 +44,7 @@ export GraphData, GraphEdge, VectorData, TensorData, DocumentContent, SpatialDat
4444
export DriftScore, DriftLevel, DriftStatusReport
4545
export ProvenanceEvent, ProvenanceChain, ProvenanceEventInput
4646
export PaginatedResponse, SearchResult
47-
export VqlResult, VqlExplanation
47+
export VclResult, VclExplanation
4848
export FederationPeer
4949

5050
# Octad CRUD
@@ -60,8 +60,8 @@ export get_drift_score, drift_status, normalize_drift
6060
# Provenance
6161
export get_provenance_chain, record_provenance, verify_provenance
6262

63-
# VQL
64-
export execute_vql, explain_vql
63+
# VCL
64+
export execute_vcl, explain_vcl
6565

6666
# Federation
6767
export register_peer, list_peers, federated_query

connectors/clients/julia/src/error.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ struct ProvenanceInvalidError <: VeriSimError
102102
message::String
103103
end
104104

105-
"""VQL syntax error."""
106-
struct VqlParseError <: VeriSimError
105+
"""VCL syntax error."""
106+
struct VclParseError <: VeriSimError
107107
query::String
108108
message::String
109109
end
110110

111-
"""VQL runtime error."""
112-
struct VqlExecutionError <: VeriSimError
111+
"""VCL runtime error."""
112+
struct VclExecutionError <: VeriSimError
113113
query::String
114114
message::String
115115
end

connectors/clients/julia/src/federation.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ JSON3.StructTypes.StructType(::Type{PeerRegistration}) = JSON3.StructTypes.Struc
2525
"""
2626
FederatedQueryRequest
2727
28-
Wraps a VQL query intended for federated execution across cluster peers.
28+
Wraps a VCL query intended for federated execution across cluster peers.
2929
"""
3030
struct FederatedQueryRequest
3131
query::String
@@ -53,7 +53,7 @@ Result from a single peer in a federated query.
5353
struct PeerQueryResult
5454
peer_id::String
5555
peer_name::String
56-
result::VqlResult
56+
result::VclResult
5757
elapsed_ms::Float64
5858
error::Union{String,Nothing}
5959
end
@@ -109,7 +109,7 @@ end
109109
"""
110110
federated_query(client, input) -> FederatedQueryResult
111111
112-
Execute a VQL query across one or more federation peers.
112+
Execute a VCL query across one or more federation peers.
113113
114114
If `peer_ids` is empty, the query is broadcast to all active peers. Results
115115
are aggregated with per-peer timing and error information.

connectors/clients/julia/src/types.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -372,36 +372,36 @@ end
372372
JSON3.StructTypes.StructType(::Type{SearchResult}) = JSON3.StructTypes.Struct()
373373

374374
# ---------------------------------------------------------------------------
375-
# VQL types
375+
# VCL types
376376
# ---------------------------------------------------------------------------
377377

378378
"""
379-
VqlResult
379+
VclResult
380380
381-
Result of a VQL query execution, containing columnar data and timing.
381+
Result of a VCL query execution, containing columnar data and timing.
382382
"""
383-
struct VqlResult
383+
struct VclResult
384384
columns::Vector{String}
385385
rows::Vector{Vector{String}}
386386
count::Int
387387
elapsed_ms::Float64
388388
end
389389

390-
JSON3.StructTypes.StructType(::Type{VqlResult}) = JSON3.StructTypes.Struct()
390+
JSON3.StructTypes.StructType(::Type{VclResult}) = JSON3.StructTypes.Struct()
391391

392392
"""
393-
VqlExplanation
393+
VclExplanation
394394
395-
Query execution plan for a VQL statement, showing cost estimates and warnings.
395+
Query execution plan for a VCL statement, showing cost estimates and warnings.
396396
"""
397-
struct VqlExplanation
397+
struct VclExplanation
398398
query::String
399399
plan::String
400400
cost::Float64
401401
warnings::Vector{String}
402402
end
403403

404-
JSON3.StructTypes.StructType(::Type{VqlExplanation}) = JSON3.StructTypes.Struct()
404+
JSON3.StructTypes.StructType(::Type{VclExplanation}) = JSON3.StructTypes.Struct()
405405

406406
# ---------------------------------------------------------------------------
407407
# Federation types
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# SPDX-License-Identifier: MPL-2.0
22
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
33
#
4-
# VeriSimDB Julia Client — VQL (VeriSimDB Query Language) operations.
4+
# VeriSimDB Julia Client — VCL (VeriSimDB Query Language) operations.
55
#
6-
# VQL is VeriSimDB's native query language for multi-modal queries that span
6+
# VCL is VeriSimDB's native query language for multi-modal queries that span
77
# graph traversals, vector similarity, spatial filters, and temporal constraints
88
# in a single statement. This file provides execution and explain functions.
99

1010
"""
11-
execute_vql(client, query; params=Dict()) -> VqlResult
11+
execute_vcl(client, query; params=Dict()) -> VclResult
1212
13-
Execute a VQL query and return the result set.
13+
Execute a VCL query and return the result set.
1414
15-
VQL queries can combine modalities — for example:
15+
VCL queries can combine modalities — for example:
1616
```
1717
FIND octads WHERE vector_similar(\$embedding, 0.8)
1818
AND spatial_within(51.5, -0.1, 10km)
@@ -21,46 +21,46 @@ FIND octads WHERE vector_similar(\$embedding, 0.8)
2121
2222
# Arguments
2323
- `client::Client` — The authenticated client.
24-
- `query::String` — The VQL query string.
24+
- `query::String` — The VCL query string.
2525
2626
# Keyword Arguments
2727
- `params::Dict{String,String}` — Named parameters for parameterised queries.
2828
2929
# Returns
30-
A `VqlResult` containing columns, rows, count, and execution time.
30+
A `VclResult` containing columns, rows, count, and execution time.
3131
"""
32-
function execute_vql(
32+
function execute_vcl(
3333
client::Client,
3434
query::String;
3535
params::Dict{String,String}=Dict{String,String}()
36-
)::VqlResult
36+
)::VclResult
3737
body = Dict("query" => query, "params" => params)
38-
resp = do_post(client, "/api/v1/vql/execute", body)
39-
return parse_response(VqlResult, resp)
38+
resp = do_post(client, "/api/v1/vcl/execute", body)
39+
return parse_response(VclResult, resp)
4040
end
4141

4242
"""
43-
explain_vql(client, query; params=Dict()) -> VqlExplanation
43+
explain_vcl(client, query; params=Dict()) -> VclExplanation
4444
45-
Return the query execution plan for a VQL statement without running it.
45+
Return the query execution plan for a VCL statement without running it.
4646
Useful for debugging and optimising queries.
4747
4848
# Arguments
4949
- `client::Client` — The authenticated client.
50-
- `query::String` — The VQL query string.
50+
- `query::String` — The VCL query string.
5151
5252
# Keyword Arguments
5353
- `params::Dict{String,String}` — Named parameters.
5454
5555
# Returns
56-
A `VqlExplanation` containing the plan, estimated cost, and warnings.
56+
A `VclExplanation` containing the plan, estimated cost, and warnings.
5757
"""
58-
function explain_vql(
58+
function explain_vcl(
5959
client::Client,
6060
query::String;
6161
params::Dict{String,String}=Dict{String,String}()
62-
)::VqlExplanation
62+
)::VclExplanation
6363
body = Dict("query" => query, "params" => params)
64-
resp = do_post(client, "/api/v1/vql/explain", body)
65-
return parse_response(VqlExplanation, resp)
64+
resp = do_post(client, "/api/v1/vcl/explain", body)
65+
return parse_response(VclExplanation, resp)
6666
end

connectors/clients/rust/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//!
66
//! A Rust client library for interacting with VeriSimDB — a multi-modal database
77
//! supporting octad entity management, drift detection, provenance tracking,
8-
//! VQL query execution, and federation across distributed instances.
8+
//! VCL query execution, and federation across distributed instances.
99
//!
1010
//! ## Quick Start
1111
//!
@@ -30,7 +30,7 @@
3030
//! - [`search`] — Text, vector, graph-relational, and spatial search operations.
3131
//! - [`drift`] — Drift score retrieval and normalization triggers.
3232
//! - [`provenance`] — Immutable provenance chain management.
33-
//! - [`vql`] — VeriSim Query Language execution and explain plans.
33+
//! - [`vcl`] — VeriSim Query Language execution and explain plans.
3434
//! - [`federation`] — Peer registration and federated cross-instance queries.
3535
//! - [`error`] — Error types and the crate-level `Result` alias.
3636
@@ -41,6 +41,6 @@ pub mod octad;
4141
pub mod search;
4242
pub mod drift;
4343
pub mod provenance;
44-
pub mod vql;
44+
pub mod vcl;
4545
pub mod federation;
4646
pub mod error;

0 commit comments

Comments
 (0)