joker_query 1.0.0

The joker_query is most sugared query builder of Rust
Documentation
  • Coverage
  • 0%
    0 out of 194 items documented0 out of 117 items with examples
  • Size
  • Source code size: 204.16 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 5.23 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • Rustixir/joker_query
    10 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Rustixir

joker_query

joker_query

The joker_query is most sugared query builder of Rust, with joker_query can implement most complex queries with sugar syntax

Features

− (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 (...)

Example

NewVersion from 1.0.0

Select

    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();

Examples

  • See the complete examples here.

Benchmark

  • almost all complex queries run under 5us

Crates

joker_query = "1.0.0"