Gitbook: https://tigercosmos.github.io/lets-build-dbms/

I am thinking what is the next step. Probably looks like:

!FILENAME sql/parser.rs

1
2
3
4
5
6
7
8
9
10
11
12
fn parse(&self) {
let mut iter = self.tokens.iter();
let category = iter.next().unwrap().token;

match category {
Token::CreateDatabase => {}
Token::CreateTable => {}
// ...
// ...
_ => {}
}
}

!FILENAME sql/create.rs

1
2
3
4
5
6
7
struct CreateDatabase {
// ...
}

struct CreateTable {
// ...
}