build: Upgrade prqlc

We also changed the name of our library (though continue to publish to `prql-compiler` FWIW)
This commit is contained in:
Maximilian Roos 2024-02-29 17:49:42 -08:00
parent 891689a415
commit 81876435e6
No known key found for this signature in database
GPG Key ID: 2A9413063820C8CD
3 changed files with 597 additions and 90 deletions

675
rust/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -3,10 +3,8 @@ edition = "2021"
name = "_ch_rust_prql"
version = "0.1.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
prql-compiler = "0.9.3"
prqlc = "0.11.3"
serde_json = "1.0"
[lib]

View File

@ -1,8 +1,8 @@
use prql_compiler::sql::Dialect;
use prql_compiler::{Options, Target};
use prqlc::sql::Dialect;
use prqlc::{Options, Target};
use std::ffi::{c_char, CString};
use std::slice;
use std::panic;
use std::slice;
fn set_output(result: String, out: *mut *mut u8, out_size: *mut u64) {
assert!(!out_size.is_null());
@ -37,7 +37,7 @@ pub unsafe extern "C" fn prql_to_sql_impl(
signature_comment: false,
color: false,
};
let (is_err, res) = match prql_compiler::compile(&prql_query, &opts) {
let (is_err, res) = match prqlc::compile(&prql_query, &opts) {
Ok(sql_str) => (false, sql_str),
Err(err) => (true, err.to_string()),
};