Skip to content

Commit 04587c2

Browse files
authored
merge changes from v0.43.1 (#16)
2 parents 2f5e3ff + 32eb380 commit 04587c2

25 files changed

Lines changed: 2867 additions & 347 deletions

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rust 1.73.0
1+
rust 1.75.0

CHANGELOG.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,51 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project aims to adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

6-
Given that the parser produces a typed AST, any changes to the AST will technically be breaking and thus will result in a `0.(N+1)` version. We document changes that break via addition as "Added".
6+
Given that the parser produces a typed AST, any changes to the AST will
7+
technically be breaking and thus will result in a `0.(N+1)` version. We document
8+
changes that break via addition as "Added".
79

810
## [Unreleased]
911
Check https://github.com/sqlparser-rs/sqlparser-rs/commits/main for undocumented changes.
1012

13+
## [0.43.1] 2024-01-22
14+
### Changes
15+
* Fixed CHANGELOG
16+
17+
18+
## [0.43.0] 2024-01-22
19+
* NO CHANGES
20+
21+
## [0.42.0] 2024-01-22
22+
23+
### Added
24+
* Support for constraint `CHARACTERISTICS` clause (#1099) - Thanks @dimfeld
25+
* Support for unquoted hyphenated identifiers on bigquery (#1109) - Thanks @jmhain
26+
* Support `BigQuery` table and view options (#1061) - Thanks @iffyio
27+
* Support Postgres operators for the LIKE expression variants (#1096) - Thanks @gruuya
28+
* Support "timezone_region" and "timezone_abbr" for `EXTRACT` (and `DATE_PART`) (#1090) - Thanks @alexander-beedie
29+
* Support `JSONB` datatype (#1089) - Thanks @alexander-beedie
30+
* Support PostgreSQL `^@` starts-with operator (#1091) - Thanks @alexander-beedie
31+
* Support PostgreSQL Insert table aliases (#1069) (#1084) - Thanks @boydjohnson
32+
* Support PostgreSQL `CREATE EXTENSION` (#1078) - Thanks @tobyhede
33+
* Support PostgreSQL `ADD GENERATED` in `ALTER COLUMN` statements (#1079) - Thanks @tobyhede
34+
* Support SQLite column definitions with no type (#1075) - Thanks @takluyver
35+
* Support PostgreSQL `ENABLE` and `DISABLE` on `ALTER TABLE` (#1077) - Thanks @tobyhede
36+
* Support MySQL `FLUSH` statement (#1076) - Thanks @emin100
37+
* Support Mysql `REPLACE` statement and `PRIORITY` clause of `INSERT` (#1072) - Thanks @emin100
38+
39+
### Fixed
40+
* Fix `:start` and `:end` json accesses on SnowFlake (#1110) - Thanks @jmhain
41+
* Fix array_agg wildcard behavior (#1093) - Thanks @ReppCodes
42+
* Error on dangling `NO` in `CREATE SEQUENCE` options (#1104) - Thanks @PartiallyTyped
43+
* Allow string values in `PRAGMA` commands (#1101) - Thanks @invm
44+
45+
### Changed
46+
* Use `Option<Expr>` for Min and Max vals in Seq Opts, fix alter col seq display (#1106) - Thanks @PartiallyTyped
47+
* Replace `AtomicUsize` with Cell<usize> in the recursion counter (#1098) - Thanks @wzzzzd
48+
* Add Qrlew as a user in README.md (#1107) - Thanks @ngrislain
49+
* Add APIs to reuse token buffers in `Tokenizer` (#1094) - Thanks @0rphon
50+
* Bump version of `sqlparser-derive` to 0.2.2 (#1083) - Thanks @alamb
1151

1252
## [0.41.0] 2023-12-22
1353

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "sqlparser"
33
description = "Extensible SQL Lexer and Parser with support for ANSI SQL:2011"
4-
version = "0.41.0"
4+
version = "0.43.1"
55
authors = ["Andy Grove <andygrove73@gmail.com>"]
66
homepage = "https://github.com/sqlparser-rs/sqlparser-rs"
77
documentation = "https://docs.rs/sqlparser/"

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ $ cargo run --features json_example --example cli FILENAME.sql [--dialectname]
115115
## Users
116116

117117
This parser is currently being used by the [DataFusion] query engine,
118-
[LocustDB], [Ballista], [GlueSQL], [Opteryx], [PRQL], and [JumpWire].
118+
[LocustDB], [Ballista], [GlueSQL], [Opteryx], [PRQL], [Qrlew], and [JumpWire].
119119

120120
If your project is using sqlparser-rs feel free to make a PR to add it
121121
to this list.
@@ -211,6 +211,7 @@ licensed as above, without any additional terms or conditions.
211211
[GlueSQL]: https://github.com/gluesql/gluesql
212212
[Opteryx]: https://github.com/mabel-dev/opteryx
213213
[PRQL]: https://github.com/PRQL/prql
214+
[Qrlew]: https://github.com/Qrlew/qrlew
214215
[JumpWire]: https://github.com/extragoodlabs/jumpwire
215216
[Pratt Parser]: https://tdop.github.io/
216217
[sql-2016-grammar]: https://jakewheat.github.io/sql-overview/sql-2016-foundation-grammar.html

derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "sqlparser_derive"
33
description = "proc macro for sqlparser"
4-
version = "0.2.1"
4+
version = "0.2.2"
55
authors = ["sqlparser-rs authors"]
66
homepage = "https://github.com/sqlparser-rs/sqlparser-rs"
77
documentation = "https://docs.rs/sqlparser_derive/"

src/ast/data_type.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,10 @@ pub enum DataType {
196196
Timestamp(Option<u64>, TimezoneInfo),
197197
/// Interval
198198
Interval,
199-
/// JSON type used in BigQuery
199+
/// JSON type
200200
JSON,
201+
/// Binary JSON type
202+
JSONB,
201203
/// Regclass used in postgresql serial
202204
Regclass,
203205
/// Text
@@ -219,6 +221,10 @@ pub enum DataType {
219221
/// [hive]: https://docs.cloudera.com/cdw-runtime/cloud/impala-sql-reference/topics/impala-struct.html
220222
/// [bigquery]: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#struct_type
221223
Struct(Vec<StructField>),
224+
/// No type specified - only used with
225+
/// [`SQLiteDialect`](crate::dialect::SQLiteDialect), from statements such
226+
/// as `CREATE TABLE t1 (a)`.
227+
Unspecified,
222228
}
223229

224230
impl fmt::Display for DataType {
@@ -336,6 +342,7 @@ impl fmt::Display for DataType {
336342
}
337343
DataType::Interval => write!(f, "INTERVAL"),
338344
DataType::JSON => write!(f, "JSON"),
345+
DataType::JSONB => write!(f, "JSONB"),
339346
DataType::Regclass => write!(f, "REGCLASS"),
340347
DataType::Text => write!(f, "TEXT"),
341348
DataType::String(size) => format_type_with_optional_length(f, "STRING", size, false),
@@ -379,6 +386,7 @@ impl fmt::Display for DataType {
379386
write!(f, "STRUCT")
380387
}
381388
}
389+
DataType::Unspecified => Ok(()),
382390
}
383391
}
384392
}

0 commit comments

Comments
 (0)