Vendor dependencies

This commit is contained in:
2026-08-01 16:11:49 +03:00
parent 7f139a0241
commit 6b5e7f0f8b
29706 changed files with 9575646 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
## Release Notes: sea-query 1.0.0-rc.20
*(since 1.0.0-rc.18)*
### Enhancements
* Add `ValueTupleIter`
### Bug Fixes
* SQLite: map `Decimal` as `real` with decimal string representation
+15
View File
@@ -0,0 +1,15 @@
## Release Notes: sea-query 1.0.0-rc.22
*(since 1.0.0-rc.20)*
### New Features
* Support for index column operator class https://github.com/SeaQL/sea-query/pull/1014
* Implement `DROP COLUMN IF EXISTS` for Postgres https://github.com/SeaQL/sea-query/pull/996
* Wrap expressions in parentheses in the `DEFAULT` clause https://github.com/SeaQL/sea-query/pull/998
### Enhancements
* Move aggregate methods and `if_null` to `ExprTrait` https://github.com/SeaQL/sea-query/pull/1002
* Re-export stronger-pinned third-party types https://github.com/SeaQL/sea-query/pull/1012
* Add nullable value classes
+14
View File
@@ -0,0 +1,14 @@
## Release Notes: sea-query 1.0.0-rc.23
*(since 1.0.0-rc.22)*
### New Features
* Refactor `Value::Array` and add `Value::Enum` https://github.com/SeaQL/sea-query/pull/1004
* `impl Iden for String` https://github.com/SeaQL/sea-query/pull/1019
* Implement Postgres `ON CONFLICT ON CONSTRAINT` https://github.com/SeaQL/sea-query/pull/1016
* Implement `VALUES` clause for Postgres CTE https://github.com/SeaQL/sea-query/pull/1008
### Bug Fixes
* rusqlite: bind JSON null as JSON null
+11
View File
@@ -0,0 +1,11 @@
## Release Notes: sea-query 1.0.0-rc.24
*(since 1.0.0-rc.23)*
### New Features
* Redesign array-related APIs https://github.com/SeaQL/sea-query/pull/1027
### Bug Fixes
* Fix value size check https://github.com/SeaQL/sea-query/pull/1033
@@ -0,0 +1,8 @@
## Release Notes: sea-query 1.0.0-rc.26
*(since 1.0.0-rc.24)*
### Enhancements
* `impl From<Vec<Value>> for Array`
* Add back `FromIterator<T> for Array`
@@ -0,0 +1,7 @@
## Release Notes: sea-query 1.0.0-rc.27
*(since 1.0.0-rc.26)*
### Breaking Changes
* Revert `impl Iden for String` https://github.com/SeaQL/sea-query/pull/1019
@@ -0,0 +1,7 @@
## Release Notes: sea-query 1.0.0-rc.28
*(since 1.0.0-rc.27)*
### Enhancements
* Restore Value system https://github.com/SeaQL/sea-query/pull/1035
@@ -0,0 +1,7 @@
## Release Notes: sea-query 1.0.0-rc.29
*(since 1.0.0-rc.28)*
### Enhancements
* Add option to use `serial` for Postgres primary key (legacy, via `option-postgres-use-serial` feature flag)
+45
View File
@@ -0,0 +1,45 @@
## Release Notes: sea-query 1.0.0-rc.30
*(since 1.0.0-rc.29)*
### New Features
* Tokenizer supports comment parsing — `--` line comments and `/* */` block comments are now recognized as `Token::Comment` tokens
```rust
let string = r#"SELECT -- hello
1"#;
let tokens: Vec<Token> = Tokenizer::new(string).iter().collect();
assert_eq!(
tokens,
vec![
Token::Unquoted("SELECT"),
Token::Space(" "),
Token::Comment("-- hello"),
Token::Space("\n "),
Token::Unquoted("1"),
]
);
let string = r#"SELECT /* hello */ 1"#;
let tokens: Vec<Token> = Tokenizer::new(string).iter().collect();
assert_eq!(
tokens,
vec![
Token::Unquoted("SELECT"),
Token::Space(" "),
Token::Comment("/* hello */"),
Token::Space(" "),
Token::Unquoted("1"),
]
);
```
### Bug Fixes
* Escape array suffix in `prepare_type_ref` https://github.com/SeaQL/sea-query/pull/1024
### House Keeping
* Reduce dependency on specific versions of value type crates
* Use named columns in sqlx examples https://github.com/SeaQL/sea-query/pull/1037
+72
View File
@@ -0,0 +1,72 @@
## Release Notes: sea-query 1.0.0-rc.31
*(since 1.0.0-rc.30)*
### New Features
* Implement `SELECT INTO` for Postgres
```rust
let query = Query::select()
.from(Char::Table)
.column(Char::Character)
.into_table(SelectInto::table("character_copy").modifier(SelectIntoTableModifier::Unlogged))
.to_owned();
assert_eq!(
query.to_string(PostgresQueryBuilder),
r#"SELECT "character" INTO UNLOGGED TABLE "character_copy" FROM "character""#
);
let query = Query::select()
.from(Char::Table)
.column(Char::Character)
.into_table(SelectInto::table("character_temp").modifier(SelectIntoTableModifier::Temporary))
.to_owned();
assert_eq!(
query.to_string(PostgresQueryBuilder),
r#"SELECT "character" INTO TEMPORARY TABLE "character_temp" FROM "character""#
);
```
* Add `Expr::eq_any` and `Expr::ne_all` (Postgres, requires `postgres-array` feature)
```rust
let query = Query::select()
.columns([Char::Id])
.from(Char::Table)
.and_where(
(Char::Table, Char::SizeW)
.into_column_ref()
.eq_any([1, 2, 3]),
)
.to_owned();
assert_eq!(
query.to_string(PostgresQueryBuilder),
r#"SELECT "id" FROM "character" WHERE "character"."size_w" = ANY(ARRAY [1,2,3])"#
);
let query = Query::select()
.columns([Char::Id])
.from(Char::Table)
.and_where(
(Char::Table, Char::SizeW)
.into_column_ref()
.ne_all([1, 2, 3]),
)
.to_owned();
assert_eq!(
query.to_string(PostgresQueryBuilder),
r#"SELECT "id" FROM "character" WHERE "character"."size_w" <> ALL(ARRAY [1,2,3])"#
);
```
* Add `Value::array_type` — returns the `ArrayType` of a `Value` without inspecting the inner value
### Bug Fixes
* Fix `GENERATED ALWAYS` clause
* Clarify default behaviour on `StringLen` — `StringLen::None` maps to `varchar(255)` on MySQL, `text` on Postgres
+99
View File
@@ -0,0 +1,99 @@
## Release Notes: sea-query 1.0.0-rc.32
*(since 1.0.0-rc.31)*
### New Features
* Support `EXPLAIN` statements https://github.com/SeaQL/sea-query/pull/1044
```rust
// Postgres
assert_eq!(
ExplainStatement::new()
.analyze()
.format(ExplainFormat::Json)
.statement(
Query::select()
.column(Char::Character)
.from(Char::Table)
.to_owned(),
)
.to_string(PostgresQueryBuilder),
r#"EXPLAIN (ANALYZE, FORMAT JSON) SELECT "character" FROM "character""#
);
// MySQL
assert_eq!(
ExplainStatement::new()
.format(ExplainFormat::Json)
.statement(
Query::select()
.column(Char::Character)
.from(Char::Table)
.to_owned(),
)
.to_string(MysqlQueryBuilder),
"EXPLAIN FORMAT = JSON SELECT `character` FROM `character`"
);
// SQLite
assert_eq!(
ExplainStatement::new()
.query_plan()
.statement(
Query::select()
.column(Char::Character)
.from(Char::Table)
.to_owned(),
)
.to_string(SqliteQueryBuilder),
r#"EXPLAIN QUERY PLAN SELECT "character" FROM "character""#
);
```
* Support for `FILTER` clause on aggregate functions https://github.com/SeaQL/sea-query/pull/1043
```rust
let query = Query::select()
.expr_as(
Func::count(Expr::val(1))
.filter(
Cond::all()
.add(Expr::col(Char::Character).eq("foo"))
.add(Expr::col(Char::SizeW).eq(1))
),
Alias::new("filtered_total")
)
.expr_as(Func::count(Expr::val(1)), Alias::new("total"))
.from(Char::Table)
.to_owned();
assert_eq!(
query.to_string(PostgresQueryBuilder),
r#"SELECT COUNT(1) FILTER (WHERE "character" = 'foo' AND "size_w" = 1) AS "filtered_total", COUNT(1) AS "total" FROM "character""#
);
```
* Add `ALTER TABLE DROP CONSTRAINT`
```rust
let table = Table::alter()
.table(Font::Table)
.drop_constraint("font_name_key")
.to_owned();
assert_eq!(
table.to_string(MysqlQueryBuilder),
r#"ALTER TABLE `font` DROP CONSTRAINT `font_name_key`"#
);
assert_eq!(
table.to_string(PostgresQueryBuilder),
r#"ALTER TABLE "font" DROP CONSTRAINT "font_name_key""#
);
```
### House Keeping
* Bump Rust version to 1.88
* Bump `rusqlite` to 0.38.0 https://github.com/SeaQL/sea-query/pull/1059
* Update `time` to 0.3.47 https://github.com/SeaQL/sea-query/pull/1057
+86
View File
@@ -0,0 +1,86 @@
## Release Notes: sea-query 1.0.0-rc.33
*(since 1.0.0-rc.32)*
### New Features
* Add `Value::Enum` — a typed enum value that generates a literal cast in Postgres https://github.com/SeaQL/sea-query/pull/1051
```rust
let value = sea_query::Enum {
type_name: "FontSizeEnum".to_owned().into(),
value: "large".into(),
};
assert_eq!(
Query::insert()
.into_table(Char::Table)
.columns([Char::FontSize])
.values_panic([Expr::val(value)])
.to_string(PostgresQueryBuilder),
r#"INSERT INTO "character" ("font_size") VALUES ('large'::"FontSizeEnum")"#
);
```
Arrays of enum values are also supported (requires `postgres-array`):
```rust
let value = Value::Array(
ArrayType::Enum(Box::new("FontSizeEnum".to_owned().into())),
Some(Box::new(vec![
sea_query::Enum { type_name: "FontSizeEnum".to_owned().into(), value: "large".into() }.into(),
])),
);
// Generates: INSERT INTO "character" ("font_size") VALUES ($1::"FontSizeEnum"[])
```
* Add Postgres advisory lock functions https://github.com/SeaQL/sea-query/pull/1062
```rust
assert_eq!(
Query::select()
.expr(PgFunc::advisory_lock(Expr::val(12345_i64)))
.to_owned()
.to_string(PostgresQueryBuilder),
r#"SELECT PG_ADVISORY_LOCK(12345)"#
);
```
Full set of functions added: `PgFunc::advisory_lock`, `advisory_lock_shared`, `try_advisory_lock`, `try_advisory_lock_shared`, `advisory_unlock`, `advisory_unlock_shared`, `advisory_unlock_all`, `advisory_xact_lock`, `advisory_xact_lock_shared`, `try_advisory_xact_lock`, `try_advisory_xact_lock_shared`
* Add `SelectExprTrait` for ergonomic alias and window chaining https://github.com/SeaQL/sea-query/pull/1040
```rust
// Attach alias directly on an expression
Query::select()
.expr(Expr::col(Char::Character).alias("C"))
.from(Char::Table);
// Chain window function inline
Query::select()
.from(Char::Table)
.expr(
Expr::col(Char::Character)
.max()
.over(WindowStatement::partition_by(Char::FontSize))
.alias("C"),
);
// Reference a named window
Query::select()
.from(Char::Table)
.expr(Expr::col(Char::Character).max().over("w"))
.window("w", WindowStatement::partition_by(Char::FontSize));
```
### Enhancements
* Allow schema-referencing foreign keys in SQLite backend — the schema qualifier is stripped since SQLite foreign key syntax does not support it https://github.com/SeaQL/sea-query/pull/1056
* Fix null array handling: `Array::Null.is_empty()` now correctly returns `false`; null and empty are distinct states https://github.com/SeaQL/sea-query/pull/1034
* Rename `Value::as_ref_array` to `Value::as_array`; old name kept as a deprecated alias https://github.com/SeaQL/sea-query/pull/1034
* Add `PostgresValues::as_types()` — returns the corresponding `postgres::Type` for each bound value https://github.com/SeaQL/sea-query/pull/967
### House Keeping
* Simplify `FunctionCall::new(PgFunc::...)` calls
+130
View File
@@ -0,0 +1,130 @@
## Release Notes: sea-query 1.0.0-rc.34
*(since 1.0.0-rc.33)*
### Highlights
* Added `CREATE TABLE` partitioning support for PostgreSQL and MySQL.
* Added SQLx and rusqlite binder support for Jiff values.
* Fixed PostgreSQL unsigned integer column mappings to avoid overflow-prone type choices.
* Fixed MySQL `IndexCreateStatement::cond_where` behavior so partial index filters are no longer silently dropped.
* Refactored the PostgreSQL `JSON_TABLE` builder API.
### Breaking Changes
* Changed PostgreSQL type mapping for unsigned integer columns to use wider signed integer types https://github.com/SeaQL/sea-query/pull/1028
PostgreSQL does not have unsigned integer types. SeaQuery now maps unsigned column types to signed types that can represent a wider range:
| ColumnType | 0.32.x PostgreSQL type | 1.0.0-rc.34 PostgreSQL type |
| --- | --- | --- |
| `TinyUnsigned` | `smallint` | `smallint` |
| `SmallUnsigned` | `smallint` | `integer` |
| `Unsigned` | `integer` | `bigint` |
| `BigUnsigned` | `bigint` | `bigint` |
This affects generated PostgreSQL schema SQL. Existing migrations remain unchanged, but newly generated migrations may produce different column types for `SmallUnsigned` and `Unsigned`.
* MySQL index creation now emits `cond_where` filters instead of silently dropping them https://github.com/SeaQL/sea-query/pull/1067
MySQL does not support partial indexes. SeaQuery now keeps the `WHERE` clause when `IndexCreateStatement::cond_where` is used with `MysqlQueryBuilder`, causing the database to reject the statement instead of silently creating an index with different semantics.
* Removed `jiff::Zoned` support from the `with-jiff` value API https://github.com/SeaQL/sea-query/pull/1061
The Jiff value mapping now excludes `jiff::Zoned`, because the SQLx Jiff binder does not support lossless `Zoned` values. Code using `Value::jiff_zoned`, `Value::JiffZoned`, `ArrayType::JiffZoned`, `is_jiff_zoned`, or `as_ref_jiff_zoned` should migrate to a supported Jiff type or store zoned datetimes as an application-defined text value.
* Changed Jiff datetime type mappings https://github.com/SeaQL/sea-query/pull/1061
Jiff datetime mappings now align with SQLx binder support:
| Rust type | Previous SeaQuery column type | 1.0.0-rc.34 column type |
| --- | --- | --- |
| `jiff::civil::DateTime` | `DateTime` | `Timestamp` |
| `jiff::Timestamp` | `Timestamp` | `TimestampWithTimeZone` |
* Refactored `PgFunc::json_table` builder APIs https://github.com/SeaQL/sea-query/pull/1029
The PostgreSQL `JSON_TABLE` API now uses value objects for columns and nested paths instead of chained sub-builders:
| Previous API | New API |
| --- | --- |
| `json_path_name(...)` | `path_name(...)` |
| `ordinality_column(...)` | `for_ordinality(...)` |
| `column(name, ty).path(...).build_column()` | `column(json_table::Column::new(name, ty).path(...))` |
| `exists_column(name, ty).path(...).build_column()` | `exists(json_table::ExistsColumn::new(name, ty).path(...))` |
| `nested(path).column(...).build_nested()` | `nested(json_table::NestedPath::new(path).column(...))` |
`explicit_path` was removed. Nested paths now render as `NESTED PATH ...`.
### New Features
* Added table partitioning support for `CREATE TABLE` https://github.com/SeaQL/sea-query/pull/1039
PostgreSQL support includes:
* `PARTITION BY RANGE`
* `PARTITION BY LIST`
* `PARTITION BY HASH`
* `PARTITION OF`
* `FOR VALUES IN`
* `FOR VALUES FROM ... TO`
* `FOR VALUES WITH`
MySQL support includes:
* `PARTITION BY RANGE`
* `PARTITION BY LIST`
* `PARTITION BY HASH`
* `PARTITION BY KEY`
* Partition definitions with `VALUES IN` and `VALUES LESS THAN`
`PartitionDefinition` is kept crate-private; users create partition definitions through `TableCreateStatement::add_partition`.
* Added SQLx and rusqlite binder support for Jiff values, except `jiff::Zoned` https://github.com/SeaQL/sea-query/pull/1061
Supported Jiff values:
| Rust type | SeaQuery value variant |
| --- | --- |
| `jiff::civil::Date` | `Value::JiffDate` |
| `jiff::civil::Time` | `Value::JiffTime` |
| `jiff::civil::DateTime` | `Value::JiffDateTime` |
| `jiff::Timestamp` | `Value::JiffTimestamp` |
`sea-query-sqlx` intentionally rejects `with-jiff` together with `sqlx-mysql` or `sqlx-any` unless the `unimplemented-jiff-sqlx-mysql` feature is enabled to acknowledge the limitation.
### Fixes
* Wrapped PostgreSQL `ON CONFLICT` index expressions in parentheses where required by PostgreSQL syntax https://github.com/SeaQL/sea-query/pull/1055
For example, SeaQuery now renders:
```sql
ON CONFLICT ("name", ("variant" IS NULL)) DO NOTHING
```
instead of:
```sql
ON CONFLICT ("name", "variant" IS NULL) DO NOTHING
```
This matches PostgreSQL's `conflict_target` grammar for index expressions.
* Fixed MySQL partial index filters being silently ignored https://github.com/SeaQL/sea-query/pull/1067
`IndexCreateStatement::cond_where` now renders the filter for both standalone MySQL `CREATE INDEX` statements and inline indexes inside `CREATE TABLE`.
### Documentation And Tests
* Added documentation for the unsigned integer PostgreSQL type mapping changes.
* Added table partitioning doctests and backend-specific coverage for PostgreSQL and MySQL.
* Added focused PostgreSQL `JSON_TABLE` tests for the refactored API.
* Added documentation and regression tests for MySQL `cond_where` behavior on indexes.
### Migration Notes
* Review newly generated PostgreSQL migrations for `SmallUnsigned` and `Unsigned` column type changes.
* Replace old `PgFunc::json_table` chained sub-builder calls with `json_table::Column`, `json_table::ExistsColumn`, and `json_table::NestedPath`.
* Replace any `jiff::Zoned` `Value` usage with supported Jiff types or application-level text storage.
* Treat MySQL partial indexes as unsupported. SeaQuery now emits invalid MySQL SQL intentionally when `cond_where` is used, so applications should branch by backend when they need a partial index on PostgreSQL or SQLite only.
+131
View File
@@ -0,0 +1,131 @@
## Release Notes: sea-query 1.0.0
*(final release after the 1.0.0 release candidate series)*
### Highlights
* Published the stable `sea-query 1.0.0` release.
* Published `sea-query-derive 1.0.0`.
* Promoted the binder crates to final non-rc versions:
* `sea-query-rusqlite 0.8.0`
* `sea-query-postgres 0.6.0`
* `sea-query-diesel 0.3.0`
* `sea-query-rbatis 0.2.0`
* Updated installation snippets from rc versions to the stable `1.0` dependency line.
* Dated and finalized the 1.0 changelog after the rc.34 release.
### Release Candidate Notes
The 1.0.0 final release includes the full release candidate series:
* [1.0.0-rc.34](1.0.0-rc.34.md) - Table partitioning, Jiff binder support, `JSON_TABLE` refactor
* [1.0.0-rc.33](1.0.0-rc.33.md) - `Value::Enum`, Postgres advisory locks, `SelectExprTrait`
* [1.0.0-rc.32](1.0.0-rc.32.md) - `EXPLAIN`, `FILTER` on aggregates, `ALTER TABLE DROP CONSTRAINT`
* [1.0.0-rc.31](1.0.0-rc.31.md) - `SELECT INTO`, `eq_any`/`ne_all`, `Value::array_type`
* [1.0.0-rc.30](1.0.0-rc.30.md) - Tokenizer comment parsing, dependency reductions
* [1.0.0-rc.29](1.0.0-rc.29.md) - Legacy `serial` option for Postgres
* [1.0.0-rc.28](1.0.0-rc.28.md) - Restore Value system
* [1.0.0-rc.27](1.0.0-rc.27.md) - Revert `impl Iden for String`
* [1.0.0-rc.26](1.0.0-rc.26.md) - `From<Vec<Value>> for Array`, `FromIterator<T> for Array`
* [1.0.0-rc.24](1.0.0-rc.24.md) - Array API redesign
* [1.0.0-rc.23](1.0.0-rc.23.md) - `Value::Enum`, `ON CONFLICT ON CONSTRAINT`, CTE `VALUES` clause
* [1.0.0-rc.22](1.0.0-rc.22.md) - Index operator class, `DROP COLUMN IF EXISTS`, nullable values
* [1.0.0-rc.20](1.0.0-rc.20.md) - `ValueTupleIter`, SQLite decimal fix
### Major Breaking Changes
* Unified `Expr` and `SimpleExpr`.
`SimpleExpr` is now an alias of `Expr`, so redundant `.into()` calls may need to be removed.
* Reworked the identifier type system.
`DynIden` now eagerly stores rendered identifier text as a `Cow<'static, str>`, and `SeaRc` is no longer an `Rc` / `Arc` alias.
* Reworked `TableRef` and `ColumnRef`.
The older many-variant representation was collapsed into structured `TableName`, `SchemaName`, `DatabaseName`, and `ColumnName` forms.
* Replaced Postgres `serial` defaults with identity columns.
Postgres now uses `GENERATED BY DEFAULT AS IDENTITY` by default. Enable `option-postgres-use-serial` to restore the legacy `serial` behavior.
* Updated PostgreSQL unsigned integer column mappings.
PostgreSQL does not have unsigned integer types. SeaQuery now maps `SmallUnsigned` to `integer` and `Unsigned` to `bigint` to avoid overflow-prone mappings.
* Removed `jiff::Zoned` from the `with-jiff` value API.
Supported Jiff values are `jiff::civil::Date`, `jiff::civil::Time`, `jiff::civil::DateTime`, and `jiff::Timestamp`.
### New Features
* Added `EXPLAIN` statement support.
* Added PostgreSQL and MySQL `CREATE TABLE` partitioning support.
* Added `Value::Enum`.
* Added Postgres advisory lock functions.
* Added aggregate `FILTER` support.
* Added `ALTER TABLE DROP CONSTRAINT`.
* Added `SELECT INTO`.
* Added `eq_any` and `ne_all`.
* Added `Value::array_type`.
* Added `Expr::not_exists`.
* Added `serde` support for `Value`.
* Added `Keyword::Default`.
* Added index operator class support.
* Added `DROP COLUMN IF EXISTS`.
* Added CTE `VALUES` clause support.
* Added `ON CONFLICT ON CONSTRAINT`.
### SQL Correctness Fixes
* Fixed PostgreSQL `ON CONFLICT` index expressions by wrapping expressions in parentheses where PostgreSQL syntax requires it.
* Fixed MySQL `IndexCreateStatement::cond_where` so partial index filters are emitted instead of silently dropped.
* Fixed SQLite decimal handling.
* Fixed tokenizer comment parsing and backend-specific string literal handling.
* Fixed null array element handling.
### Binder Crates
Use these stable companion crate versions with `sea-query 1.0.0`:
```toml
sea-query = "1.0"
sea-query-derive = "1.0"
sea-query-rusqlite = "0.8"
sea-query-postgres = "0.6"
sea-query-diesel = "0.3"
sea-query-rbatis = "0.2"
```
For SQLx users:
```toml
# SQLx 0.8 compatibility line
sea-query-sqlx = "0.8.1"
# SQLx 0.9 line
sea-query-sqlx = "0.9"
```
`sea-query-sqlx 0.8.0` was yanked. Use `0.8.1` for SQLx `0.8`, or `0.9.0` for SQLx `0.9`.
### Migration Notes
Review generated SQL when upgrading migrations from pre-1.0 releases, especially for:
* PostgreSQL unsigned integer columns.
* Postgres identity columns versus legacy `serial`.
* MySQL partial index filters.
* `Expr` / `SimpleExpr` conversions.
* `TableRef`, `ColumnRef`, and dynamic identifier construction.
* Jiff value mappings.
### Verification
Verified during release preparation with:
```sh
cargo +1.88 test --workspace --features all-features
cargo +1.88 doc --workspace --all-features --no-deps
```
+30
View File
@@ -0,0 +1,30 @@
## Release Notes: sea-query 1.0.1
*(since 1.0.0)*
### New Implementations
**Borrowed scalar primitive conversions for `Value`** (#1078)
SeaQuery now implements `From<&T> for Value` for copy scalar primitives:
- `bool`
- signed integers: `i8`, `i16`, `i32`, `i64`
- unsigned integers: `u8`, `u16`, `u32`, `u64`
- floating point numbers: `f32`, `f64`
- `char`
This allows borrowed scalar values to be converted into `Value` without manually dereferencing them first:
```rust
let id = 42_i32;
let value: sea_query::Value = (&id).into();
```
The owned `From<T> for Value` implementations are unchanged.
### Compatibility Notes
This is a patch release. It adds trait implementations but does not intentionally change generated SQL or existing `Value` behavior.
`sea-query-derive` is also released as `1.0.1` so the derive feature can depend on the matching `sea-query 1.0.1` line.
@@ -0,0 +1,58 @@
## Release Notes: sea-query-sqlx 0.9.0
*(since sea-query-sqlx 0.8.1)*
### Highlights
* Promoted `sea-query-sqlx` to the SQLx `0.9` release line.
* Kept `sea-query-sqlx 0.8.1` as the compatibility release for users staying on SQLx `0.8`.
* Raised the `sea-query-sqlx` Rust version requirement to `1.94.0`, matching SQLx `0.9`.
* Kept Jiff and pgvector value support available in SeaQuery, while temporarily disabling their SQLx binder integrations until their upstream crates support SQLx `0.9`.
### Breaking Changes
* Upgraded SQLx from `0.8` to `0.9`.
This is a breaking dependency upgrade for users of `sea-query-sqlx`. Projects that still depend on SQLx `0.8` should use:
```toml
sea-query-sqlx = "0.8.1"
```
Projects that are ready for SQLx `0.9` should use:
```toml
sea-query-sqlx = "0.9"
```
* Raised the minimum supported Rust version for `sea-query-sqlx` to `1.94.0`.
The main `sea-query` crate remains on its own Rust version requirement. This Rust version bump applies to the SQLx binder crate because SQLx `0.9` requires Rust `1.94.0`.
### Known Limitations
* `with-jiff` no longer enables `jiff-sqlx`.
`jiff-sqlx 0.1.1` still depends on SQLx `0.8`, so enabling it together with SQLx `0.9` would pull two incompatible SQLx versions into the dependency graph. `sea-query-sqlx 0.9.0` keeps SeaQuery's Jiff value support enabled, but SQLx binding support for Jiff values is temporarily unavailable.
Jiff binding support should be restored after `jiff-sqlx` supports SQLx `0.9`.
* `postgres-vector` no longer enables `pgvector/sqlx`.
`pgvector 0.4.2` still implements SQLx `0.8` traits, so enabling `pgvector/sqlx` with SQLx `0.9` causes trait mismatch errors. `sea-query-sqlx 0.9.0` keeps the `postgres-vector` feature compiling without pulling in `pgvector/sqlx`, but binding `Value::Vector` through the SQLx Postgres binder will panic until `pgvector` supports SQLx `0.9`.
### Migration Notes
Use `sea-query-sqlx 0.8.1` if your project, framework, or downstream dependency tree is still pinned to SQLx `0.8`.
Use `sea-query-sqlx 0.9.0` if your project is ready for SQLx `0.9` and Rust `1.94.0`.
SeaORM users should avoid accidentally resolving `sea-query-sqlx 0.9.0` while SeaORM is still pinned to SQLx `0.8`.
### Verification
Verified with:
```sh
cargo +1.94 check --manifest-path sea-query-sqlx/Cargo.toml --all-features
```