SeaQL / sea-query

🔱 A dynamic SQL query builder for MySQL, Postgres and SQLite
https://www.sea-ql.org
Other
1.12k stars 182 forks source link

Add support for `Arc<str>` value #738

Open stepantubanov opened 7 months ago

stepantubanov commented 7 months ago

Motivation

It's a performance optimization. Currently strings are represented by sea_query::Value::String(Box<String>) which requires a clone if the value is still needed after the query, which means the entire string will be copied. For large values it adds up to significant overhead.

Proposed Solutions

Add enum variant RcString(SeaRc<str>) to sea_query::Value.