Crates.io | joker_query |
lib.rs | joker_query |
version | 1.0.0 |
source | src |
created_at | 2023-11-17 22:04:10.231045 |
updated_at | 2023-12-07 16:13:22.804911 |
description | The joker_query is most sugared query builder of Rust |
homepage | https://github.com/Rustixir/joker_query |
repository | https://github.com/Rustixir/joker_query |
max_upload_size | |
id | 1039654 |
size | 204,501 |
The joker_query is most sugared query builder of Rust, with joker_query can implement most complex queries with sugar syntax
− (Operator) - fully implemented ( Select, Insert, Update, Delete ) query operations
− (SubQuery) - can use subquery for operators ( IN, EXISTs, <, >, <= >=, Any )
also can use sub-query for data source for example select * from (...)
Select::
cols(vec!["id", "age", "fullname"])
.distinct()
.from("customer")
.inner_join("merchant").on("customer.id", "customer_id")
.left_join("product").on("customer.id", "customer_id")
.where_by("age", op::between(10, 25))
.and("fullname", op::like("full%"))
.or("fullname", op::not_in(vec!["danyal", "danyalmh", "danyalai"]))
.group_by(vec!["merchant_id"])
.having(&Func::count("id"), op::eq(2025))
.order_by("fullname")
.order_by_desc("age")
.limit(10)
.offset(5)
.build();
See the complete examples here.
almost all complex queries run under 5us
joker_query = "1.0.0"