Core types for the surreal-sync framework.
This crate provides the foundational types used across the sync framework, including:
- [
Type] - Universal type representation for all supported databases - [
Value] - Raw generated values before type conversion - [
TypedValue] - Values with type information for conversion - [
Row] - Intermediate row representation - [
Schema] - Schema definitions loaded from YAML
Architecture
The surreal-sync-core crate sits at the foundation of the sync framework:
surreal-sync-core (this crate)
│
├─── loadtest-generator (depends on surreal-sync-core for types)
│
├─── surreal-sync-mysql (implements From/Into for MySQL)
├─── surreal-sync-postgresql::types (implements From/Into for PostgreSQL)
├─── mongodb-types (implements From/Into for MongoDB)
├─── surrealdb-types (implements From/Into for SurrealDB)
└─── surreal-sync-json::types (implements From/Into for JSON/CSV)
Example
use Type;
use ;
// Create a typed value using factory methods
let value = int32;
// For dynamic types (e.g., from schema), use try_with_type for validation:
let dynamic_value = try_with_type.expect;
// Type-specific crates implement From<TypedValue> for their native types:
// let mysql_value: MySQLValue = value.into();