Expand description
Type definitions for libsql-orm
This module contains core type definitions used throughout the library, including database values, operators, sort orders, and aggregate functions.
§Core Types
Value
- Represents any database value with automatic type conversionRow
- Type alias for a database row (HashMap of column names to values)SortOrder
- Ascending or descending sort orderAggregate
- SQL aggregate functions (COUNT, SUM, AVG, etc.)JoinType
- SQL join types (INNER, LEFT, RIGHT, FULL)Operator
- SQL comparison operators
§Examples
use libsql_orm::{Value, SortOrder, Aggregate};
// Creating values
let text_value = Value::from("hello");
let int_value = Value::from(42i64);
let bool_value = Value::from(true);
// Using in queries
let sort = SortOrder::Desc;
let agg = Aggregate::Count;
Enums§
- Aggregate
- Aggregate functions
- Join
Type - Join types for queries
- Operator
- SQL operator types
- Sort
Order - Sort order for queries
- Value
- Represents a database value that can be serialized/deserialized
Functions§
- deserialize_
bool - Custom deserializer for boolean fields that handles SQLite integer conversion
Type Aliases§
- Row
- Represents a database row as a map of column names to values