• Stars
    star
    194
  • Rank 194,277 (Top 4 %)
  • Language
    Rust
  • License
    MIT License
  • Created about 3 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

typed-sql

Latest Version Rust Documentation LICENSE

use typed_sql::{Query, Table, ToSql};

#[derive(Table)]
struct User {
    id: i64,
    name: String
}

let stmt = User::table()
    .select()
    .filter(|user| user.id.neq(6).and(user.id.gt(3)))
    .group_by(|user| user.name)
    .order_by(|user| user.name.then(user.id.ascending()))
    .limit(5);

assert_eq!(
    stmt.to_sql(),
    "SELECT * FROM users \
    WHERE users.id != 6 AND users.id > 3 \
    GROUP BY users.name \
    ORDER BY users.name,users.id ASC \
    LIMIT 5;"
);

More Repositories

1

staff

Music theory and score rendering library with midi, notes, chords, scales, and more.
Rust
207
star
2

futures-codec

Utilities for encoding and decoding frames with async/await
Rust
73
star
3

viewbuilder

Cross-platform user interface framework for Rust.
Rust
68
star
4

conduct

A cross-platform UI framework for Haskell
Haskell
39
star
5

engrave

Browser based code editor
Rust
28
star
6

embedded-flight

Rust
26
star
7

lookbook

Rust
25
star
8

async-hal

Rust
25
star
9

bevy-compose

Rust
21
star
10

hoot

Opinionated package manager for haskell (WIP)
Haskell
17
star
11

dioxus-spring

Rust
14
star
12

dioxus-lazy

Virtualized components for Dioxus
Rust
13
star
13

dioxus-material

Rust
12
star
14

dotfiler

A templating system for unix configuration files
Rust
11
star
15

dioxus-use-gesture

Rust
9
star
16

text-svg

Rust
7
star
17

uring-rs

A pure Rust library for io_uring
Rust
6
star
18

dioxus-tray

System-tray applications with Dioxus
Rust
6
star
19

dotfiles

A collection of my linux configuration files
Nix
5
star
20

woofer

Rust
4
star
21

dioxus-use-mounted

Rust
3
star
22

ws-frame

Rust
3
star
23

iso-tp

Rust
3
star
24

quickmaths

A collection of algorithms for generic mathematics in Rust
Rust
3
star
25

scripting

Rust
3
star
26

async-native-timer

Async/await Timers with native implementations
Rust
2
star
27

permissions

Rust
1
star
28

sys-call-rs

System call macro for Rust
Rust
1
star
29

crates

Rust
1
star
30

snowman-rs

Asynchronously generate Twitter snowflake ids in rust
Rust
1
star
31

tide-cors

Cross-origin resource sharing (CORS) middleware for Tide applications
Rust
1
star
32

circus-rs

Quantum circuit simulator in Rust
Rust
1
star
33

flex

Haskell
1
star
34

advent-of-code-2022

Haskell
1
star
35

stream-reduce

reduce() for streams in Rust
Rust
1
star
36

async-codec

Rust
1
star
37

campus-texter

Sends graded assignments from Infinite Campus with SMS
Python
1
star
38

into-future-rs

Rust
1
star
39

xilem-material

Material You components for xilem
Rust
1
star
40

car-api

Rust
1
star
41

dioxus-menu

Rust
1
star
42

web-slinger

HTML
1
star
43

visualizer

Rust
1
star