diff --git a/Cargo.lock b/Cargo.lock index 079887e5..5a24c011 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -232,7 +232,7 @@ dependencies = [ [[package]] name = "gitql" -version = "0.5.0" +version = "0.6.0" dependencies = [ "git2", "gitql-ast", @@ -243,14 +243,14 @@ dependencies = [ [[package]] name = "gitql-ast" -version = "0.1.0" +version = "0.2.0" dependencies = [ "lazy_static", ] [[package]] name = "gitql-cli" -version = "0.3.0" +version = "0.4.0" dependencies = [ "clap", "gitql-ast", @@ -262,7 +262,7 @@ dependencies = [ [[package]] name = "gitql-engine" -version = "0.3.0" +version = "0.4.0" dependencies = [ "git2", "gitql-ast", @@ -271,7 +271,7 @@ dependencies = [ [[package]] name = "gitql-parser" -version = "0.2.0" +version = "0.3.0" dependencies = [ "gitql-ast", "lazy_static", diff --git a/Cargo.toml b/Cargo.toml index 4623c7c9..a9eff678 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "gitql" authors = ["AmrDeveloper"] -version = "0.5.0" +version = "0.6.0" edition = "2021" description = "A SQL like query language to perform queries on .git files" license = "MIT" @@ -21,8 +21,8 @@ members = [ ] [dependencies] -gitql-ast = { path = "./crates/gitql-ast", version = "0.1.0" } -gitql-parser = { path = "./crates/gitql-parser", version = "0.2.0" } -gitql-engine = { path = "./crates/gitql-engine", version = "0.3.0" } -gitql-cli = { path = "./crates/gitql-cli", version = "0.3.0" } +gitql-ast = { path = "./crates/gitql-ast", version = "0.2.0" } +gitql-parser = { path = "./crates/gitql-parser", version = "0.3.0" } +gitql-engine = { path = "./crates/gitql-engine", version = "0.4.0" } +gitql-cli = { path = "./crates/gitql-cli", version = "0.4.0" } git2 = { version = "0.17.1", default-features = false } diff --git a/README.md b/README.md index cb9f6965..d6ff70a3 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,10 @@ GQL is a query language with a syntax very similar to SQL with a tiny engine to ### Samples ```sql +SELECT 1 +SELECT 1 + 2 +SELECT LEN("Git Query Language") + SELECT name, COUNT(name) AS commit_num FROM commits GROUP BY name ORDER BY commit_num DESC LIMIT 10 SELECT commit_count FROM branches WHERE commit_count BETWEEN 0 .. 10 @@ -46,6 +50,7 @@ SELECT * FROM branches SELECT * FROM branches WHERE is_head = true SELECT * FROM branches WHERE name ends_with "master" SELECT * FROM branches WHERE name contains "origin" +SELECT name, LEN(name) FROM branches SELECT * FROM tags SELECT * FROM tags OFFSET 1 LIMIT 1 diff --git a/crates/gitql-ast/Cargo.toml b/crates/gitql-ast/Cargo.toml index 8395e3b9..cd9f4552 100644 --- a/crates/gitql-ast/Cargo.toml +++ b/crates/gitql-ast/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "gitql-ast" authors = ["AmrDeveloper"] -version = "0.1.0" +version = "0.2.0" edition = "2021" description = "GitQL Abstract syntax tree (AST)" repository = "https://github.com/amrdeveloper/gql/tree/main/crates/gitql-ast" diff --git a/crates/gitql-cli/Cargo.toml b/crates/gitql-cli/Cargo.toml index e9368928..ae71dc5d 100644 --- a/crates/gitql-cli/Cargo.toml +++ b/crates/gitql-cli/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "gitql-cli" authors = ["AmrDeveloper"] -version = "0.3.0" +version = "0.4.0" edition = "2021" description = "GitQL Command line interface (CLI) components" repository = "https://github.com/amrdeveloper/gql/tree/main/crates/gitql-cli" license = "MIT" [dependencies] -gitql-ast = { path = "../gitql-ast", version = "0.1.0" } -gitql-parser = { path = "../gitql-parser", version = "0.2.0" } +gitql-ast = { path = "../gitql-ast", version = "0.2.0" } +gitql-parser = { path = "../gitql-parser", version = "0.3.0" } prettytable-rs = "^0.10" textwrap = "0.16.0" termcolor = "1.2.0" diff --git a/crates/gitql-engine/Cargo.toml b/crates/gitql-engine/Cargo.toml index ce8a3e60..b9af49af 100644 --- a/crates/gitql-engine/Cargo.toml +++ b/crates/gitql-engine/Cargo.toml @@ -1,14 +1,13 @@ [package] name = "gitql-engine" authors = ["AmrDeveloper"] -version = "0.3.0" +version = "0.4.0" edition = "2021" description = "GitQL Engine" repository = "https://github.com/amrdeveloper/gql/tree/main/crates/gitql-engine" license = "MIT" - [dependencies] -gitql-ast = { path = "../gitql-ast", version = "0.1.0" } +gitql-ast = { path = "../gitql-ast", version = "0.2.0" } git2 = { version = "0.17.1", default-features = false } regex = "1.8.4" diff --git a/crates/gitql-parser/Cargo.toml b/crates/gitql-parser/Cargo.toml index fb37e969..79e5152e 100644 --- a/crates/gitql-parser/Cargo.toml +++ b/crates/gitql-parser/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "gitql-parser" authors = ["AmrDeveloper"] -version = "0.2.0" +version = "0.3.0" edition = "2021" description = "GitQL parser" repository = "https://github.com/amrdeveloper/gql/tree/main/crates/gitql-parser" license = "MIT" [dependencies] -gitql-ast = { path = "../gitql-ast", version = "0.1.0" } +gitql-ast = { path = "../gitql-ast", version = "0.2.0" } lazy_static = "1.4.0"