#database-client #edge-db #protocols #low-level #applications #model #type

edgedb-protocol

Low-level protocol implemenentation for EdgeDB database client. Use edgedb-tokio for applications instead

7 releases (breaking)

0.6.1 May 9, 2024
0.6.0 Jun 22, 2023
0.5.0 May 15, 2023
0.4.0 Jul 26, 2022
0.1.0 Oct 23, 2020

#636 in Database interfaces

Download history 111/week @ 2024-07-22 85/week @ 2024-07-29 78/week @ 2024-08-05 161/week @ 2024-08-12 105/week @ 2024-08-19 230/week @ 2024-08-26 86/week @ 2024-09-02 63/week @ 2024-09-09 89/week @ 2024-09-16 217/week @ 2024-09-23 122/week @ 2024-09-30 152/week @ 2024-10-07 154/week @ 2024-10-14 67/week @ 2024-10-21 52/week @ 2024-10-28 156/week @ 2024-11-04

441 downloads per month
Used in 10 crates (9 directly)

MIT/Apache

340KB
9K SLoC

EdgeDB Rust Binding: Protocol Crate

This crate contains data model types and internal protocol implementation for the EdgeDB client.

License

Licensed under either of

at your option.


lib.rs:

(Website reference) The EdgeDB protocol for Edgedb-Rust.

EdgeDB types used for data modeling can be seen on the model crate, in which the Value enum provides the quickest overview of all the possible types encountered using the client. Many of the variants hold Rust standard library types while others contain types defined in this protocol. Some types such as Duration appear to be standard library types but are unique to the EdgeDB protocol.

Other parts of this crate pertain to the rest of the EdgeDB protocol (e.g. client + server message formats), plus various traits for working with the client such as:

The Value enum:

pub enum Value {
Nothing,
Uuid(Uuid),
Str(String),
Bytes(Bytes),
Int16(i16),
Int32(i32),
Int64(i64),
Float32(f32),
Float64(f64),
BigInt(BigInt),
ConfigMemory(ConfigMemory),
Decimal(Decimal),
Bool(bool),
Datetime(Datetime),
LocalDatetime(LocalDatetime),
LocalDate(LocalDate),
LocalTime(LocalTime),
Duration(Duration),
RelativeDuration(RelativeDuration),
DateDuration(DateDuration),
Json(Json),
Set(Vec<Value>),
Object {
shape: ObjectShape,
fields: Vec<Option<Value>>,
},
SparseObject(SparseObject),
Tuple(Vec<Value>),
NamedTuple {
shape: NamedTupleShape,
fields: Vec<Value>,
},
Array(Vec<Value>),
Enum(EnumValue),
Range(Range<Box<Value>>),
}

Dependencies

~0.8–2MB
~39K SLoC