Skip to content

Commit

Permalink
Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
tyt2y3 committed Dec 1, 2024
1 parent caee3b2 commit 8b9a5b7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## 0.32.1 - 2024-12-01

### Enhancements
### New Features

* Added `Value::as_null`
```rust
Expand All @@ -16,6 +16,23 @@ let n = v.as_null();

assert_eq!(n, Value::Int(None));
```
* Added bitwise and/or operators (`bit_and`, `bit_or`) https://github.com/SeaQL/sea-query/pull/841
```rust
let query = Query::select()
.expr(1.bit_and(2).eq(3))
.to_owned();

assert_eq!(
query.to_string(PostgresQueryBuilder),
r#"SELECT (1 & 2) = 3"#
);
```

### Enhancements

* Added `GREATEST` & `LEAST` function https://github.com/SeaQL/sea-query/pull/844
* Added `ValueType::enum_type_name()` https://github.com/SeaQL/sea-query/pull/836
* Removed "one common table" restriction on recursive CTE https://github.com/SeaQL/sea-query/pull/835

### House keeping

Expand Down
9 changes: 9 additions & 0 deletions src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,15 @@ pub trait ExprTrait: Sized {
/// use sea_query::{tests_cfg::*, *};
///
/// let query = Query::select()
/// .expr(1.bit_and(2).eq(3))
/// .to_owned();
///
/// assert_eq!(
/// query.to_string(PostgresQueryBuilder),
/// r#"SELECT (1 & 2) = 3"#
/// );
///
/// let query = Query::select()
/// .columns([Char::Character, Char::SizeW, Char::SizeH])
/// .from(Char::Table)
/// .and_where(1.bit_and(1).eq(1))
Expand Down

0 comments on commit 8b9a5b7

Please sign in to comment.