Skip to content

Commit

Permalink
Bump prql (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspermarstal authored Jul 14, 2024
1 parent 0ecf9ce commit 46e7691
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 35 deletions.
77 changes: 50 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ opt-level = 3
lto = "fat"
codegen-units = 1
strip = "debuginfo"

[workspace.dependencies]
pgrx = "=0.11.4"
pgrx-tests = "=0.11.4"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ For more information on PRQL, visit the PRQL [website](https://prql-lang.org/),
> PRQL supports `select` statements only. `insert`, `update`, and `delete` statements, and your other database code, will continue to live in vanilla SQL, ORMs, or other database frameworks.
## Getting Started
The following installation guides works on Debian.
The following installation guides work on Ubuntu and Debian.

### Quickstart
Run these commands to install PL/PRQL and its dependencies for PostgreSQL 16:
Run these commands to install PL/PRQL and all of its dependencies for PostgreSQL 16:

```cmd
sudo apt-get update && apt-get upgrade
Expand Down
4 changes: 2 additions & 2 deletions plprql-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ pg16 = ["pgrx/pg16", "pgrx-tests/pg16"]
pg_test = []

[dependencies]
pgrx = "=0.11.4"
pgrx = { workspace = true }
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.118"

[dev-dependencies]
pgrx-tests = "=0.11.4"
pgrx-tests = { workspace = true }
6 changes: 3 additions & 3 deletions plprql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ pg16 = ["pgrx/pg16", "pgrx-tests/pg16"]
pg_test = []

[dependencies]
pgrx = { version = "=0.11.4" }
prqlc = { version = "0.11.3", features = ["postgres"] }
pgrx = { workspace = true }
prqlc = { version = "0.12.2", features = ["postgres"] }
thiserror = "1.0.61"

[dev-dependencies]
pgrx-tests = "=0.11.4"
pgrx-tests = { workspace = true }
3 changes: 2 additions & 1 deletion plprql/src/plprql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::call::{call_scalar, call_setof_iterator, call_table_iterator};
use crate::err::{PlprqlError, PlprqlResult};
use crate::fun::{Function, Return};
use pgrx::prelude::*;
use prqlc::{compile, sql::Dialect, Options, Target};
use prqlc::{compile, sql::Dialect, DisplayOptions, Options, Target};

#[pg_extern]
pub fn prql_to_sql(prql: &str) -> PlprqlResult<String> {
Expand All @@ -11,6 +11,7 @@ pub fn prql_to_sql(prql: &str) -> PlprqlResult<String> {
target: Target::Sql(Some(Dialect::Postgres)),
signature_comment: false,
color: false,
display: DisplayOptions::Plain,
};

compile(prql, opts).map_err(PlprqlError::PrqlError)
Expand Down

0 comments on commit 46e7691

Please sign in to comment.