Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make partiql_value::parse_ion public #294

Merged
merged 1 commit into from
Feb 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Adds some benchmarks for parsing, compiling, planning, & evaluation
- Implements `PIVOT` operator in evaluator
- `serde` feature to `partiql-value` and `partiql-logical` with `Serialize` and `Deserialize` traits.
- Adds `Display` for `LogicalPlan`
- Expose `partiql_value::parse_ion` as a public API.

### Fixes

Expand Down
3 changes: 2 additions & 1 deletion partiql-value/src/ion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ use ion_rs::{Integer, IonReader, IonType, Reader, StreamItem};

// TODO handle errors more gracefully than `expect`/`unwrap`

pub(crate) fn parse_ion(contents: &str) -> Value {
/// For a given `contents` as Ion text produces a PartiQL Value
pub fn parse_ion(contents: &str) -> Value {
let mut reader = ion_rs::ReaderBuilder::new()
.build(contents)
.expect("reading contents");
Expand Down
2 changes: 1 addition & 1 deletion partiql-value/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use rust_decimal::prelude::FromPrimitive;
use rust_decimal::{Decimal as RustDecimal, Decimal};
use unicase::UniCase;

mod ion;
pub mod ion;

#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
Expand Down