Expand description
§ekoDB Client Library
Official Rust client for ekoDB - A high-performance database with intelligent caching, real-time capabilities, and automatic optimization.
§Features
- Async/Await: Built on Tokio for high-performance async operations
- Type-Safe: Strong typing with Rust’s type system
- Auto-Retry: Automatic retry with exponential backoff for transient failures
- Connection Pooling: Efficient connection management
- WebSocket Support: Real-time subscriptions and updates
- Batch Operations: Efficient bulk inserts, updates, and deletes
- Query Builder: Fluent API for building complex queries
§Quick Start
use ekodb_client::{Client, Record};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create a client
let client = Client::builder()
.base_url("https://api.ekodb.net")
.api_key("your-api-key")
.build()?;
// Insert a record
let mut record = Record::new();
record.insert("name", "John Doe");
record.insert("age", 30);
let result = client.insert("users", record).await?;
println!("Inserted: {:?}", result);
Ok(())
}
Structs§
- Batch
Builder - Builder for batch operations
- Chat
Message Request - Request to send a message in an existing session
- Chat
Request - Request to send a chat message
- Chat
Response - Response from a chat request
- Chat
Session - Chat session details
- Chat
Session Response - Response containing chat session information
- Chat
Text Search Options - Text search options for chat context retrieval
- Client
- ekoDB client
- Client
Builder - Builder for creating a Client
- Collection
Config - Configuration for searching a specific collection
- Collection
Metadata - Collection metadata with analytics
- Context
Snippet - Context snippet from search results
- Create
Chat Session Request - Request to create a new chat session
- Field
Search Options - Field-specific search options
- Field
Type Schema - Field type schema with constraints
- GetMessages
Query - Query parameters for getting messages
- GetMessages
Response - Response containing messages with pagination metadata
- Join
Config - Configuration for joining collections
- List
Sessions Query - Query parameters for listing sessions
- List
Sessions Response - Response containing list of chat sessions
- Merge
Sessions Request - Request to merge multiple chat sessions
- Models
- Available LLM models from different providers
- Query
- Query for finding records
- Query
Builder - Builder for constructing complex queries
- Rate
Limit Info - Rate limit information from the server
- Record
- A record in ekoDB
- Schema
- Collection schema
- Search
Query - Search query for full-text and vector search
- Search
Response - Search response containing results and metadata
- Search
Result - Search result with score and matched fields
- Toggle
Forgotten Request - Request to toggle message forgotten status
- Token
Usage - Token usage information from LLM providers
- Update
Message Request - Request to update a message
- Update
Session Request - Request to update session metadata
- WebSocket
Client - WebSocket client for real-time communication with persistent connection
Enums§
- Distance
Metric - Distance metric for vector similarity
- Error
- Errors that can occur when using the ekoDB client
- Field
Type - Field type representing all supported data types in ekoDB
- Index
Config - Index configuration for a field
- Merge
Strategy - Merge strategy for combining chat sessions
- Number
Value - Flexible numeric value that can be Integer, Float, or Decimal
- Query
Operator - Query operators for filtering
- Sort
Order - Sort order for query results
- Vector
Index Algorithm - Vector index algorithm
Constants§
- VERSION
- Client version
Type Aliases§
- Result
- Result type alias for ekoDB client operations