docs.rs failed to build rayforce-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
rayforce-rs
Rust bindings for RayforceDB - a high-performance time-series database.
Features
- Complete Type System: Full support for all Rayforce types including scalars (I64, F64, Symbol, Date, Time, Timestamp, GUID), containers (List, Vector, Dict), and Table.
- Query Builder: Fluent API for building SELECT, UPDATE, INSERT, and UPSERT queries.
- Expression Builder: Type-safe expression construction for WHERE clauses and computed columns.
- IPC Support: Connect to remote Rayforce servers.
- Automatic Build: Automatically clones and builds the Rayforce C library from source.
Installation
Add to your Cargo.toml:
[]
= "0.1"
Build Requirements
- Clang/LLVM: Required for bindgen
- Git: For cloning Rayforce sources
- Make: For building the C library
- C compiler (gcc or clang)
On Ubuntu/Debian:
On macOS:
Quick Start
use ;
Type System
Scalar Types
use ;
use ;
use Uuid;
let i = I64new;
let f = F64new;
let b = B8new;
let sym = new;
// Temporal types
let date = from_naive_date;
let time = from_ms; // 12:00:00
let ts = from_nanos;
// GUID
let guid = GUIDrandom;
let guid2 = GUIDparse?;
Container Types
use ;
// Vectors (homogeneous)
let ints: = from_iter;
let floats: = from_iter;
let symbols = from_iter;
// Lists (heterogeneous)
let mut list = new;
list.push;
list.push;
// Dictionaries
let dict = from_pairs?;
Tables
use ;
// Create from dictionary
let table = from_dict?;
// Reference a named table
let table_ref = from_name;
// Access columns
let cols = table.columns?;
let row_count = table.len?;
Query Builder
SELECT
let result = table
.select
.columns
.where_cond
.group_by
.execute?;
UPDATE
let updated = table
.update
.set
.where_cond
.execute?;
INSERT
let inserted = table
.insert
.values
.execute?;
UPSERT
let upserted = table
.upsert // match by first 1 column(s)
.values
.execute?;
Joins
// Inner join
let result = table1.inner_join?;
// Left join
let result = table1.left_join?;
IPC (Remote Connection)
use hopen;
let conn = hopen?;
let result = conn.execute?;
conn.close?;
Expression Builder
use Column;
let col = new;
// Comparisons
let expr1 = col.gt; // price > 100
let expr2 = col.le; // price <= 200
let expr3 = col.eq; // price == 150
// Combine with AND/OR
let combined = col.gt.and;
// Aggregations
let sum_expr = col.sum;
let avg_expr = col.avg;
let count_expr = col.count;
Environment Variables
RAYFORCE_GITHUB: Override the Rayforce repository URL (default:https://github.com/RayforceDB/rayforce.git)
License
MIT License - see LICENSE for details.
See Also
- RayforceDB - The Rayforce database
- rayforce-py - Official Python bindings