commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
af866a9d69bad00a20a906281f119d1f855457b8 | Richard Jonas | 2026-01-26T20:29:34 | Implement SELECT INTO for Postgres | diff --git a/src/backend/mysql/query.rs b/src/backend/mysql/query.rs
index 7726fcc..b08f430 100644
--- a/src/backend/mysql/query.rs
+++ b/src/backend/mysql/query.rs
@@ -15,6 +15,11 @@ impl QueryBuilder for MysqlQueryBuilder {
};
}
+ fn prepare_select_into(&self, _: &SelectInto, _: &mut impl SqlWriter... | 6 | 109 | 1 |
cf2e79ad21ce2279d3cba9c6d155f2f0fb919c82 | Chris Tsang | 2026-01-26T13:49:24 | sea-query-sqlx 0.8.0-rc.14 | diff --git a/sea-query-sqlx/Cargo.toml b/sea-query-sqlx/Cargo.toml
index 13efb95..98c91be 100644
--- a/sea-query-sqlx/Cargo.toml
+++ b/sea-query-sqlx/Cargo.toml
@@ -3,7 +3,7 @@
[package]
name = "sea-query-sqlx"
-version = "0.8.0-rc.12"
+version = "0.8.0-rc.14"
authors = [ "Valentin Tolmer <valentin@tolmer.fr>", "I... | 1 | 2 | 2 |
955d55057f8a44bb3cecd1ba46c4aa8bc177819a | Chris Tsang | 2026-01-26T13:15:27 | 1.0.0-rc.30 | diff --git a/Cargo.toml b/Cargo.toml
index 8176732..3b26cb7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = [".", "sea-query-derive"]
[package]
name = "sea-query"
-version = "1.0.0-rc.28"
+version = "1.0.0-rc.30"
authors = [
"Chris Tsang <chris.2y3@outlook.com>",
"Billy Chan <ccw.billy... | 3 | 4 | 4 |
7b5d59e6e9f9b7ddcb3174d393d0a1e7c9817ba1 | Chris Tsang | 2026-01-26T12:26:30 | one more test case | diff --git a/sea-query-derive/src/raw_sql/token.rs b/sea-query-derive/src/raw_sql/token.rs
index b4a90a0..6ae3346 100644
--- a/sea-query-derive/src/raw_sql/token.rs
+++ b/sea-query-derive/src/raw_sql/token.rs
@@ -217,7 +217,7 @@ impl<'a> Tokenizer<'a> {
b = self.p_c(c);
self.in... | 2 | 36 | 2 |
5d3f210b9f13ce6d6b64d10b91fa7cbb2f59ca83 | Chris Tsang | 2026-01-26T12:17:21 | Tokenizer supports comment parsing | diff --git a/sea-query-derive/src/raw_sql/token.rs b/sea-query-derive/src/raw_sql/token.rs
index b070a2b..b4a90a0 100644
--- a/sea-query-derive/src/raw_sql/token.rs
+++ b/sea-query-derive/src/raw_sql/token.rs
@@ -196,6 +196,7 @@ impl<'a> Tokenizer<'a> {
if a != b {
let string = &self.input[a..b];
... | 2 | 76 | 0 |
575c0f69ab109e6a1d5297c7d70ff72abfa56943 | Chris Tsang | 2026-01-26T12:06:59 | Tokenizer supports comment parsing | diff --git a/sea-query-derive/src/raw_sql/token.rs b/sea-query-derive/src/raw_sql/token.rs
index f06851c..b070a2b 100644
--- a/sea-query-derive/src/raw_sql/token.rs
+++ b/sea-query-derive/src/raw_sql/token.rs
@@ -18,6 +18,7 @@ pub enum Token<'a> {
Unquoted(&'a str),
Space(&'a str),
Punctuation(&'a str),
... | 3 | 511 | 16 |
a6e58a186ea943e56855a52226ab5031bfc00ab6 | Chris Tsang | 2026-01-24T12:47:35 | One more test case | diff --git a/tests/raw_sql.rs b/tests/raw_sql.rs
index 040f4f7..5d044ae 100644
--- a/tests/raw_sql.rs
+++ b/tests/raw_sql.rs
@@ -373,3 +373,11 @@ fn test_raw_sql_11() {
])
);
}
+
+#[test]
+fn test_raw_sql_12() {
+ let v = 12i32;
+ let query = sea_query::raw_query!(PostgresQueryBuilder, r#"SELECT {v... | 1 | 8 | 0 |
6c2ba2dd7c8104a26f4e0f0b305a8919d324e9f2 | Chris Tsang | 2026-01-24T12:22:03 | Give up on ranged dependency | diff --git a/Cargo.toml b/Cargo.toml
index 89bc0ce..8176732 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -40,7 +40,7 @@ bigdecimal = { version = "0.4", default-features = false, optional = true }
uuid = { version = "1", default-features = false, optional = true }
time = { version = "0.3.36", default-features = false, ... | 1 | 1 | 1 |
6bf098e567d77a8107a85a1976b34497f0bcaa00 | Chris Tsang | 2026-01-24T10:51:29 | Reduce dependency on specific versions of value type crates
Allow ranged dependency of ipnetwork | diff --git a/Cargo.toml b/Cargo.toml
index 7705691..89bc0ce 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -34,13 +34,13 @@ sea-query-postgres-types = { version = "0.1.0", path = "sea-query-postgres-types
serde = { version = "1", default-features = false, optional = true, features = ["std", "derive", "rc"] }
serde_json ... | 7 | 43 | 59 |
5ccdbba490c95768e586c7b679652d41ae730c72 | 狐狸 | 2026-01-13T05:32:28 | Escape array suffix in prepare_type_ref (#1024)
Closes #1023 | diff --git a/src/backend/query_builder.rs b/src/backend/query_builder.rs
index 73ac578..91dbe1b 100644
--- a/src/backend/query_builder.rs
+++ b/src/backend/query_builder.rs
@@ -1,4 +1,4 @@
-use std::{fmt, ops::Deref};
+use std::{borrow::Cow, fmt, ops::Deref};
use crate::*;
@@ -962,7 +962,21 @@ pub trait QueryBuild... | 1 | 36 | 3 |
e13b5fcf85463f82bcdac31adb73f75a3be697ec | Chris Tsang | 2026-01-07T13:54:12 | Update documentation | diff --git a/src/value.rs b/src/value.rs
index 14a97f2..337e5f1 100644
--- a/src/value.rs
+++ b/src/value.rs
@@ -309,9 +309,9 @@ pub enum Value {
/// Previously, the size was 24. We bumped it to 32 such that `String`
/// can be unboxed.
///
-/// When the `with-json` feature is enabled, the size of `Value` may
-/// e... | 1 | 3 | 3 |
12291d7a62fb2a2692ddb65507edd05587db2525 | Chris Tsang | 2026-01-01T20:38:39 | Tweak examples | diff --git a/examples/diesel_mysql/src/main.rs b/examples/diesel_mysql/src/main.rs
index 44ed441..c73a7d8 100644
--- a/examples/diesel_mysql/src/main.rs
+++ b/examples/diesel_mysql/src/main.rs
@@ -7,7 +7,7 @@ use diesel::{
sql_types::{BigInt, Blob},
};
use sea_query::{
- Alias, ColumnDef, Expr, ExprTrait, Fun... | 3 | 5 | 7 |
cd2c7e2f786880babdfdf48104d41a8f22f4ff24 | Andrii Hrimov | 2026-01-01T20:34:16 | Use named columns in sqlx examples (#1037)
## PR Info
A more resilient approach using named column access instead of numeric
indices. This will be even more consistent given the example as a whole
- `query_as_with` and `FromRow` are used throughout.
I don't know if this was intended or not, but I left a `try_get` in... | diff --git a/examples/sqlx_mysql/src/main.rs b/examples/sqlx_mysql/src/main.rs
index 37b0c27..8294cc9 100644
--- a/examples/sqlx_mysql/src/main.rs
+++ b/examples/sqlx_mysql/src/main.rs
@@ -2,7 +2,8 @@ use bigdecimal::{BigDecimal, FromPrimitive};
use chrono::NaiveDate;
use rust_decimal::Decimal;
use sea_query::{
- ... | 3 | 10 | 8 |
46c58fb650d5e2d3ce835c5c671b16ebbe6c145c | Chris Tsang | 2025-12-29T19:31:19 | 1.0.0-rc.28 | diff --git a/Cargo.toml b/Cargo.toml
index a86d213..5648644 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = [".", "sea-query-derive"]
[package]
name = "sea-query"
-version = "1.0.0-rc.27"
+version = "1.0.0-rc.28"
authors = [
"Chris Tsang <chris.2y3@outlook.com>",
"Billy Chan <ccw.billy... | 6 | 6 | 6 |
c6fe74a9d4ff17bc907f00f4db8c31885a002c0e | Chris Tsang | 2025-12-29T01:13:01 | 1.0.0-rc.27 | diff --git a/Cargo.toml b/Cargo.toml
index 2e355f8..a86d213 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = [".", "sea-query-derive"]
[package]
name = "sea-query"
-version = "1.0.0-rc.26"
+version = "1.0.0-rc.27"
authors = [
"Chris Tsang <chris.2y3@outlook.com>",
"Billy Chan <ccw.billy... | 1 | 1 | 1 |
265a37677b52af06186322f0cf7c600a3b6a6906 | Chris Tsang | 2025-12-29T01:06:50 | Revert "`impl Iden for String` (#1019)"
This reverts commit 3946d3786fc586f421709f6516e04cc6db9f95d1. | diff --git a/src/types/iden/core.rs b/src/types/iden/core.rs
index 93adfee..7db6eb5 100644
--- a/src/types/iden/core.rs
+++ b/src/types/iden/core.rs
@@ -51,16 +51,6 @@ impl Iden for &'static str {
}
}
-impl Iden for String {
- fn quoted(&self) -> Cow<'static, str> {
- Cow::Owned(self.clone())
- }
-... | 1 | 6 | 10 |
377c81f1397274edd97e7e6e0c4c0818dd65e859 | Chris Tsang | 2025-12-28T20:19:44 | 1.0.0-rc.26 | diff --git a/Cargo.toml b/Cargo.toml
index c870a4b..2e355f8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = [".", "sea-query-derive"]
[package]
name = "sea-query"
-version = "1.0.0-rc.25"
+version = "1.0.0-rc.26"
authors = [
"Chris Tsang <chris.2y3@outlook.com>",
"Billy Chan <ccw.billy... | 1 | 1 | 1 |
01f297022970ec3bc5610cd1cd74567a0678406d | Chris Tsang | 2025-12-28T19:59:18 | impl From<Vec<Value>> for Array | diff --git a/src/value/array.rs b/src/value/array.rs
index 16b5d76..85767ee 100644
--- a/src/value/array.rs
+++ b/src/value/array.rs
@@ -7,6 +7,7 @@ use std::sync::Arc;
#[cfg(feature = "hashable-value")]
mod hash;
+/// (type_name, values)
type EnumArray = Box<(Arc<str>, Box<[Option<Arc<Enum>>]>)>;
#[derive(Debu... | 2 | 404 | 23 |
246826a689f341a1e6e283ca1291adf151f35590 | Chris Tsang | 2025-12-28T18:10:17 | Add back FromIterator<T> for Array | diff --git a/src/sealed.rs b/src/sealed.rs
index 0650b2f..df20019 100644
--- a/src/sealed.rs
+++ b/src/sealed.rs
@@ -1 +1,2 @@
+#[allow(dead_code)]
pub trait Sealed {}
diff --git a/src/value/array.rs b/src/value/array.rs
index 320c0f1..16b5d76 100644
--- a/src/value/array.rs
+++ b/src/value/array.rs
@@ -94,6 +94,8 @@ ... | 2 | 116 | 0 |
ab42f29126435f55f9e56ea53a2729daa36bacc9 | Chris Tsang | 2025-12-28T17:19:32 | 1.0.0-rc.25 | diff --git a/Cargo.toml b/Cargo.toml
index 2c3d9f7..c870a4b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = [".", "sea-query-derive"]
[package]
name = "sea-query"
-version = "1.0.0-rc.24"
+version = "1.0.0-rc.25"
authors = [
"Chris Tsang <chris.2y3@outlook.com>",
"Billy Chan <ccw.billy... | 2 | 1 | 3 |
41ebd03f3b8e491924a2f74dee21e5c2708ccbde | Chris Tsang | 2025-12-28T17:10:53 | 1.0.0-rc.24 | diff --git a/Cargo.toml b/Cargo.toml
index d6c664b..2c3d9f7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = [".", "sea-query-derive"]
[package]
name = "sea-query"
-version = "1.0.0-rc.23"
+version = "1.0.0-rc.24"
authors = [
"Chris Tsang <chris.2y3@outlook.com>",
"Billy Chan <ccw.billy... | 1 | 1 | 1 |
58c64ddf2e226373c8173cf8abcdcc1e7f050b42 | 狐狸 | 2025-12-28T16:51:09 | Redesign array-related APIs (#1027)
Changes:
- Remove `NotU8`
Refactoring:
- Use `ArrayElement` to simplify code
- Move hash mod to a separate file | diff --git a/src/lib.rs b/src/lib.rs
index f4e64f1..d29a93f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -984,6 +984,7 @@ pub mod prepare;
pub mod query;
pub mod raw_sql;
pub mod schema;
+mod sealed;
#[cfg(feature = "sqlx-utils")]
pub mod sqlx;
pub mod table;
diff --git a/src/sealed.rs b/src/sealed.rs
new file mod... | 6 | 319 | 373 |
036d37c17ef1e37cb1bea4c468c4e7284e1b0e0b | 狐狸 | 2025-12-25T12:09:29 | Fix value size check (#1033) | diff --git a/src/value.rs b/src/value.rs
index ff6d128..30a1e8e 100644
--- a/src/value.rs
+++ b/src/value.rs
@@ -244,7 +244,6 @@ pub enum Value {
/// so we use Arc to save space
Enum(Option<Arc<Enum>>),
- #[allow(clippy::box_collection)]
Bytes(Option<Vec<u8>>),
#[cfg(feature = "with-json")]
@... | 1 | 17 | 17 |
3862ec462d6905e777c03de0bd5b5cbd1370ab75 | Chris Tsang | 2025-12-20T13:17:48 | bump versions | diff --git a/sea-query-diesel/Cargo.toml b/sea-query-diesel/Cargo.toml
index d38c9b9..304a337 100644
--- a/sea-query-diesel/Cargo.toml
+++ b/sea-query-diesel/Cargo.toml
@@ -3,7 +3,7 @@
[package]
name = "sea-query-diesel"
-version = "0.3.0-rc.1"
+version = "0.3.0-rc.2"
authors = ["Emile Fugulin <emile@caido.io>"]
... | 6 | 6 | 6 |
7c14629325666630bce160ec328e4eaef5925996 | Chris Tsang | 2025-12-20T13:12:38 | 1.0.0-rc.23 | diff --git a/Cargo.toml b/Cargo.toml
index fa7293e..d6c664b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = [".", "sea-query-derive"]
[package]
name = "sea-query"
-version = "1.0.0-rc.22"
+version = "1.0.0-rc.23"
authors = [
"Chris Tsang <chris.2y3@outlook.com>",
"Billy Chan <ccw.billy... | 1 | 1 | 1 |
d0b1369b8882642faa2e15e0ffdd63e2e2caf385 | 狐狸 | 2025-12-20T09:01:26 | Fix CI (#1026) | diff --git a/sea-query-postgres/src/lib.rs b/sea-query-postgres/src/lib.rs
index 2d0db4f..5089078 100644
--- a/sea-query-postgres/src/lib.rs
+++ b/sea-query-postgres/src/lib.rs
@@ -240,10 +240,6 @@ impl ToSql for PostgresValue {
.collect::<Vec<_>>()
.to_sql(ty, out)
... | 9 | 16 | 18 |
3946d3786fc586f421709f6516e04cc6db9f95d1 | Dmitrii Aleksandrov | 2025-12-08T12:33:52 | `impl Iden for String` (#1019)
An obvious and often-requested feature.
Turns out, now I need this for my other PRs:
- https://github.com/SeaQL/sea-query/pull/1020
- There's another stacked PR in progress, I'll link it soon | diff --git a/src/types/iden/core.rs b/src/types/iden/core.rs
index 11214d6..38c7aea 100644
--- a/src/types/iden/core.rs
+++ b/src/types/iden/core.rs
@@ -51,6 +51,16 @@ impl Iden for &'static str {
}
}
+impl Iden for String {
+ fn quoted(&self) -> Cow<'static, str> {
+ Cow::Owned(self.clone())
+ }
+... | 1 | 10 | 6 |
a3a6a851847fd6e87788be30a18fb89f06e09259 | Richard Jonas | 2025-12-08T12:13:32 | Implement Postgres ON CONFLICT ON CONSTRAINT (#1016)
## PR Info
- Closes: https://github.com/SeaQL/sea-query/issues/1013
## New Features
- [ ] Refactor OnConflict enum to conform the Postgres specification,
see the related issue.
- [ ] Possible change in API
- OnConflict::exprs() no longer appends to the list of co... | diff --git a/src/backend/mysql/query.rs b/src/backend/mysql/query.rs
index 08d19db..7726fcc 100644
--- a/src/backend/mysql/query.rs
+++ b/src/backend/mysql/query.rs
@@ -158,7 +158,7 @@ impl QueryBuilder for MysqlQueryBuilder {
sql.push_param(value, self as _);
}
- fn prepare_on_conflict_target(&self,... | 4 | 123 | 18 |
2462a11fa932fec0a86d0010925353519053b79c | Chris Tsang | 2025-12-07T00:59:18 | rusqlite: bind json null as json null | diff --git a/sea-query-rusqlite/Cargo.toml b/sea-query-rusqlite/Cargo.toml
index 78c3735..86a357a 100644
--- a/sea-query-rusqlite/Cargo.toml
+++ b/sea-query-rusqlite/Cargo.toml
@@ -31,3 +31,4 @@ with-ipnetwork = ["sea-query/with-ipnetwork"]
with-mac_address = ["sea-query/with-mac_address"]
postgres-array = ["sea-quer... | 2 | 12 | 10 |
bcaaadbc6975176df5a6605b7fc59abddc29d5db | Chris Tsang | 2025-12-06T23:23:20 | sea-query-rusqlite 0.8.0-rc.10 | diff --git a/sea-query-rusqlite/Cargo.toml b/sea-query-rusqlite/Cargo.toml
index 30ee016..78c3735 100644
--- a/sea-query-rusqlite/Cargo.toml
+++ b/sea-query-rusqlite/Cargo.toml
@@ -3,7 +3,7 @@
[package]
name = "sea-query-rusqlite"
-version = "0.8.0-rc.8"
+version = "0.8.0-rc.10"
authors = [ "Ivan Krivosheev <py.kr... | 1 | 1 | 1 |
f84a76329715b0bfdf0e51b376dc99cf302f6867 | Chris Tsang | 2025-12-05T10:52:16 | rusqlite: fixup | diff --git a/sea-query-rusqlite/src/lib.rs b/sea-query-rusqlite/src/lib.rs
index cee8629..1ee5a03 100644
--- a/sea-query-rusqlite/src/lib.rs
+++ b/sea-query-rusqlite/src/lib.rs
@@ -119,13 +119,13 @@ impl ToSql for RusqliteValue {
#[cfg(feature = "with-json")]
Value::Json(j) => box_to_sql!(j),
... | 1 | 4 | 4 |
5c63ac205c4c6b1cb897ba3f64ed5a1280868822 | Chris Tsang | 2025-12-05T10:40:41 | rusqlite: use native binding for time | diff --git a/examples/rusqlite/src/main.rs b/examples/rusqlite/src/main.rs
index 7ed1795..a356f10 100644
--- a/examples/rusqlite/src/main.rs
+++ b/examples/rusqlite/src/main.rs
@@ -4,7 +4,7 @@ use sea_query::{ColumnDef, Expr, ExprTrait, Func, Iden, Order, Query, SqliteQuer
use sea_query_rusqlite::{RusqliteBinder, rusq... | 2 | 10 | 24 |
f77f6c9cf408d339d544064e0359c04511c2bf19 | Chris Tsang | 2025-12-04T20:56:39 | rusqlite: reexport crate | diff --git a/examples/rusqlite/Cargo.toml b/examples/rusqlite/Cargo.toml
index f0a59a8..8f9e045 100644
--- a/examples/rusqlite/Cargo.toml
+++ b/examples/rusqlite/Cargo.toml
@@ -13,7 +13,6 @@ chrono = { version = "0.4", default-features = false, features = ["clock"] }
time = { version = "0.3.36", features = ["parsing",... | 3 | 12 | 9 |
cc44461ac4ecd2d355ec928e22579c1d7f38f242 | Richard Jonas | 2025-12-01T22:30:31 | Implement VALUES clause for Postgres CTE (#1008)
## PR Info
- Closes https://github.com/SeaQL/sea-query/issues/993
## New Features
- [ ] Add a `values()` fn to `CommonTableExpression` in order to feed
Postgres VALUES clause.
## Changes
- [ ] During building the CTE struct, either query or values should be
specifi... | diff --git a/src/audit/select.rs b/src/audit/select.rs
index 93ca767..0ec3dd1 100644
--- a/src/audit/select.rs
+++ b/src/audit/select.rs
@@ -1,8 +1,8 @@
use super::*;
use crate::{
CaseStatement, CommonTableExpression, Condition, ConditionExpression, ConditionHolder,
- ConditionHolderContents, Cycle, Expr, Fun... | 4 | 101 | 8 |
c0821c39942bb3b8efbeb845cafa5dc83aca9b9a | Chris Tsang | 2025-11-29T13:27:55 | 1.0.0-rc.22 | diff --git a/Cargo.toml b/Cargo.toml
index 828b1b7..d77949a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = [".", "sea-query-derive"]
[package]
name = "sea-query"
-version = "1.0.0-rc.20"
+version = "1.0.0-rc.22"
authors = [
"Chris Tsang <chris.2y3@outlook.com>",
"Billy Chan <ccw.billy... | 1 | 1 | 1 |
1c375a1f6c27b0c08342ce7d1bbc63ffd887b4d0 | Chris Tsang | 2025-11-29T13:26:16 | Add nullable value classes | diff --git a/src/value/value_class.rs b/src/value/value_class.rs
index 2a40c03..063f250 100644
--- a/src/value/value_class.rs
+++ b/src/value/value_class.rs
@@ -1,10 +1,18 @@
pub trait NumericValue: Sized {}
+pub trait NumericValueNullable: Sized {}
+impl<T: NumericValue> NumericValueNullable for T {}
pub trait Dat... | 6 | 39 | 0 |
5b6c9682f70c1285fa7d1e6dd069bb2f7da0321d | Chris Tsang | 2025-11-29T12:05:05 | Add test case for #998 | diff --git a/src/table/column.rs b/src/table/column.rs
index 18dd2c5..45b86cf 100644
--- a/src/table/column.rs
+++ b/src/table/column.rs
@@ -311,7 +311,7 @@ impl ColumnDef {
/// .table("character")
/// .col(ColumnDef::new("font_id").integer().default(12i32))
/// .col(
- /// ColumnD... | 1 | 3 | 3 |
42c0e29de15d28f99efd5d60cff21a74394298e2 | Chris Tsang | 2025-11-29T12:05:05 | Add test case for #998 | diff --git a/src/table/column.rs b/src/table/column.rs
index 8d9cd48..18dd2c5 100644
--- a/src/table/column.rs
+++ b/src/table/column.rs
@@ -308,10 +308,15 @@ impl ColumnDef {
/// use sea_query::{tests_cfg::*, *};
///
/// let table = Table::create()
- /// .table(Char::Table)
- /// .col(Colu... | 1 | 10 | 3 |
c5700ff7de7793a1dfba7efefcc0c3438cdd8873 | Chris Tsang | 2025-11-29T11:32:42 | Tweaks #996 | diff --git a/src/backend/mysql/table.rs b/src/backend/mysql/table.rs
index 41c192a..5b8ef12 100644
--- a/src/backend/mysql/table.rs
+++ b/src/backend/mysql/table.rs
@@ -190,11 +190,8 @@ impl TableBuilder for MysqlQueryBuilder {
sql.write_str(" TO ").unwrap();
self.prepa... | 2 | 2 | 11 |
e202c245c921cb322f4179fd5df5386fec399443 | Chris Tsang | 2025-11-29T11:33:27 | feat(indexes): Support for index column operator class (#1014)
cont'd #964
---------
Co-authored-by: daniel <therealhackermon@gmail.com> | diff --git a/src/backend/postgres/index.rs b/src/backend/postgres/index.rs
index ac818d4..a025b75 100644
--- a/src/backend/postgres/index.rs
+++ b/src/backend/postgres/index.rs
@@ -40,7 +40,7 @@ impl IndexBuilder for PostgresQueryBuilder {
sql.write_str("INDEX ").unwrap();
if create.concurrently {
-... | 3 | 56 | 2 |
ceecf75ba988d28a52c5146d79188d977a6b1f0c | 狐狸 | 2025-11-29T11:14:54 | Wrap expressions in parentheses in the DEFAULT clause (#998)
- Closes SeaQL/sea-orm#2652 | diff --git a/src/backend/table_builder.rs b/src/backend/table_builder.rs
index 9baebfe..3f266ea 100644
--- a/src/backend/table_builder.rs
+++ b/src/backend/table_builder.rs
@@ -112,8 +112,25 @@ pub trait TableBuilder:
}
if let Some(default) = default {
- write!(sql, " DEFAULT ").unwrap();... | 1 | 19 | 2 |
ca1581271c6383ce5e07aa29b3c37be00fffbb3a | Kevin Jacob | 2025-11-29T11:12:31 | implemented drop column if exists for postgres (#996)
## PR Info
<!-- mention the related issue -->
Closes https://github.com/SeaQL/sea-query/issues/995
## New Features
This pull request implements DROP COLUMN IF EXISTS for Postgres which is
not supported by sea-query currently.
Signed-off-by: involk-secure-1609 <... | diff --git a/src/backend/mysql/table.rs b/src/backend/mysql/table.rs
index e1dc878..41c192a 100644
--- a/src/backend/mysql/table.rs
+++ b/src/backend/mysql/table.rs
@@ -190,8 +190,11 @@ impl TableBuilder for MysqlQueryBuilder {
sql.write_str(" TO ").unwrap();
self.prepa... | 4 | 59 | 6 |
603d9497a163ce414878d5da2417973aaf8f73a9 | Chris Tsang | 2025-11-27T22:11:28 | pub the module | diff --git a/src/value.rs b/src/value.rs
index 42860d4..b678c7b 100644
--- a/src/value.rs
+++ b/src/value.rs
@@ -7,7 +7,7 @@ use crate::{ColumnType, CommonSqlQueryBuilder, QueryBuilder, StringLen};
#[cfg(test)]
mod tests;
-mod prelude;
+pub mod prelude;
#[allow(unused_imports)]
use prelude::*; | 1 | 1 | 1 |
e1f700b0c7d91a3865e19e2f5d9b78558cd210cf | Chris Tsang | 2025-11-27T22:10:56 | Move re-export to prelude #1012 | diff --git a/src/value.rs b/src/value.rs
index 654456b..42860d4 100644
--- a/src/value.rs
+++ b/src/value.rs
@@ -2,46 +2,15 @@
use std::borrow::Cow;
-#[cfg(feature = "with-json")]
-use serde_json::Value as Json;
-#[cfg(feature = "with-json")]
-use std::str::from_utf8;
-
-#[cfg(feature = "with-chrono")]
-pub use ch... | 3 | 38 | 36 |
7704d145669337221119c104a1906b1a905b4ddc | Chris Tsang | 2025-11-27T21:47:21 | Move aggregate methods and if_null to ExprTrait #1002 | diff --git a/src/expr/enum.rs b/src/expr/enum.rs
index e9a3565..1f85792 100644
--- a/src/expr/enum.rs
+++ b/src/expr/enum.rs
@@ -507,212 +507,6 @@ impl Expr {
Self::CustomWithExpr(s.into(), v.into_iter().collect())
}
- /// Express a `MAX` function.
- ///
- /// # Examples
- ///
- /// ```
-... | 2 | 222 | 206 |
00070f618002db77c6f0b6bb8dd231c345f99365 | GenuaGSchulz | 2025-11-27T21:36:53 | Re-exporting stronger-pinned third-party types (#1012)
<!--
Thank you for contributing to this project!
If you need any help please feel free to contact us on Discord:
https://discord.com/invite/uCPdDXzbdv
Or, mention our core members by typing `@GitHub_Handle` on any issue /
PR
Add some test cases! It help reviewe... | diff --git a/src/value.rs b/src/value.rs
index 313da9a..654456b 100644
--- a/src/value.rs
+++ b/src/value.rs
@@ -8,31 +8,31 @@ use serde_json::Value as Json;
use std::str::from_utf8;
#[cfg(feature = "with-chrono")]
-use chrono::{DateTime, FixedOffset, Local, NaiveDate, NaiveDateTime, NaiveTime, Utc};
+pub use chron... | 1 | 8 | 8 |
e05d0d995bae2d1083d3c2f75cdb0a64226b3632 | Chris Tsang | 2025-11-26T21:36:05 | Fixes #1009 | diff --git a/src/query/delete.rs b/src/query/delete.rs
index 590f042..3edf4eb 100644
--- a/src/query/delete.rs
+++ b/src/query/delete.rs
@@ -1,15 +1,12 @@
+use inherent::inherent;
use std::borrow::Cow;
use crate::{
- Expr, QueryStatement, QueryStatementBuilder, QueryStatementWriter, ReturningClause,
- SubQuer... | 6 | 28 | 37 |
4fd6b5862bde00f4438f5c66f6e1f7f07cbfb283 | Chris Tsang | 2025-11-20T21:02:11 | 1.0.0-rc.20 | diff --git a/Cargo.toml b/Cargo.toml
index 5f4cc41..828b1b7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = [".", "sea-query-derive"]
[package]
name = "sea-query"
-version = "1.0.0-rc.18"
+version = "1.0.0-rc.20"
authors = [
"Chris Tsang <chris.2y3@outlook.com>",
"Billy Chan <ccw.billy... | 1 | 1 | 1 |
0779c8b91bd1d7c80e6ac40267b515e4787bb050 | Chris Tsang | 2025-11-20T20:59:04 | sqlite: map decimal as real_decimal | diff --git a/src/table/column.rs b/src/table/column.rs
index e72dcd2..8d9cd48 100644
--- a/src/table/column.rs
+++ b/src/table/column.rs
@@ -47,7 +47,7 @@ impl From<&mut ColumnDef> for ColumnDef {
/// | BigUnsigned | bigint unsigned | bigint | integer |
/// | Floa... | 1 | 2 | 2 |
470ef3bfd8fbf1833489219c91bd48a3107cb547 | Chris Tsang | 2025-11-20T20:55:27 | sqlite: map decimal as real_decimal | diff --git a/src/backend/sqlite/table.rs b/src/backend/sqlite/table.rs
index 81c6eb8..40840f3 100644
--- a/src/backend/sqlite/table.rs
+++ b/src/backend/sqlite/table.rs
@@ -133,13 +133,13 @@ impl SqliteQueryBuilder {
// if precision > &16 {
// panic!("precision cannot be la... | 1 | 4 | 4 |
c2ceb5d1bc8adb7ea202e1a70f5b6821a4ce1bcb | Chris Tsang | 2025-11-19T22:54:26 | sqlite: map decimal as decimal | diff --git a/src/backend/sqlite/table.rs b/src/backend/sqlite/table.rs
index ab2aa3a..81c6eb8 100644
--- a/src/backend/sqlite/table.rs
+++ b/src/backend/sqlite/table.rs
@@ -130,16 +130,16 @@ impl SqliteQueryBuilder {
ColumnType::Double => sql.write_str("double"),
ColumnType::Decimal(precision)... | 2 | 9 | 9 |
a76a82bbb77a635385077c7044e8d043bf9e48e8 | Chris Tsang | 2025-11-16T00:35:22 | Tweak doc tests | diff --git a/src/extension/postgres/func.rs b/src/extension/postgres/func.rs
index ea942bf..7a76e1f 100644
--- a/src/extension/postgres/func.rs
+++ b/src/extension/postgres/func.rs
@@ -253,7 +253,9 @@ impl PgFunc {
///
/// # Examples
///
- /// ```ignore
+ /// ```
+ /// #[cfg(feature = "postgres-... | 1 | 12 | 3 |
0e2a9f633ec379a2c29a62a6e09dc61b9fc22f84 | Chris Tsang | 2025-11-15T23:28:37 | Add ValueTupleIter | diff --git a/src/value/value_tuple.rs b/src/value/value_tuple.rs
index 5e58639..215bcd3 100644
--- a/src/value/value_tuple.rs
+++ b/src/value/value_tuple.rs
@@ -9,6 +9,18 @@ pub enum ValueTuple {
Many(Vec<Value>),
}
+#[derive(Debug)]
+pub struct ValueTupleIter<'a> {
+ value: &'a ValueTuple,
+ index: usize... | 1 | 49 | 3 |
bbb0e0fe4f8584fd956297e6e8a0361d7475fc2b | Chris Tsang | 2025-11-15T16:08:50 | 1.0.0-rc.18 | diff --git a/Cargo.toml b/Cargo.toml
index 4287235..5f4cc41 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = [".", "sea-query-derive"]
[package]
name = "sea-query"
-version = "1.0.0-rc.17"
+version = "1.0.0-rc.18"
authors = [
"Chris Tsang <chris.2y3@outlook.com>",
"Billy Chan <ccw.billy... | 2 | 3 | 2 |
357728668e3b3c8a83194c20c652afdaaa07989d | Chris Tsang | 2025-11-15T15:41:23 | Expose all PgFunc | diff --git a/src/backend/postgres/query.rs b/src/backend/postgres/query.rs
index a2e5c12..766fecd 100644
--- a/src/backend/postgres/query.rs
+++ b/src/backend/postgres/query.rs
@@ -136,11 +136,8 @@ impl QueryBuilder for PostgresQueryBuilder {
PgFunc::JsonAgg => "JSON_AGG",
PgFu... | 2 | 0 | 9 |
0a3428c00b5c74970e02569536edc7d40ed7838e | Chris Tsang | 2025-11-08T22:52:58 | Tweak crate structure and dependency | diff --git a/sea-query-postgres-types/src/range/postgres_driver.rs b/sea-query-postgres-types/src/range/postgres_driver.rs
new file mode 100644
index 0000000..5929d8d
--- /dev/null
+++ b/sea-query-postgres-types/src/range/postgres_driver.rs
@@ -0,0 +1,78 @@
+use super::*;
+use bytes::BytesMut;
+use postgres_protocol::t... | 1 | 78 | 0 |
8d0806bbdf475bde2d620833e0481ae1f0beaa07 | Chris Tsang | 2025-11-08T22:52:58 | Tweak crate structure and dependency | diff --git a/Cargo.toml b/Cargo.toml
index fb441ae..4287235 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -30,30 +30,16 @@ path = "src/lib.rs"
[dependencies]
inherent = "1.0"
sea-query-derive = { version = "1.0.0-rc", path = "sea-query-derive", optional = true }
-sea-query-postgres-types = { version = "0.8.0-rc.9", pa... | 7 | 56 | 189 |
b42ccb0414b68ded32d9b0c2da833e7b76e681e8 | Chris Tsang | 2025-11-07T16:15:19 | 1.0.0-rc.17 | diff --git a/Cargo.toml b/Cargo.toml
index 4a67bca..f58ea03 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = [".", "sea-query-derive"]
[package]
name = "sea-query"
-version = "1.0.0-rc.16"
+version = "1.0.0-rc.17"
authors = [
"Chris Tsang <chris.2y3@outlook.com>",
"Billy Chan <ccw.billy... | 1 | 1 | 1 |
7f7c41b6d086200711b2506f31fa2f191dd9bdfa | Chris Tsang | 2025-11-07T15:15:09 | sqlite: write bigint as integer | diff --git a/src/backend/sqlite/table.rs b/src/backend/sqlite/table.rs
index cd5d361..ab2aa3a 100644
--- a/src/backend/sqlite/table.rs
+++ b/src/backend/sqlite/table.rs
@@ -98,12 +98,10 @@ impl TableBuilder for SqliteQueryBuilder {
impl SqliteQueryBuilder {
fn prepare_column_type(
&self,
- column_... | 2 | 3 | 12 |
075456668d5d9f8ce37b2978c4be459fa40a9fec | Chris Tsang | 2025-11-04T15:58:05 | bump
(forgot to push) | diff --git a/Cargo.toml b/Cargo.toml
index ee2551d..4a67bca 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = [".", "sea-query-derive"]
[package]
name = "sea-query"
-version = "1.0.0-rc.15"
+version = "1.0.0-rc.16"
authors = [
"Chris Tsang <chris.2y3@outlook.com>",
"Billy Chan <ccw.billy... | 1 | 1 | 1 |
c25a84daeeba51664f1aa6f4e8feff1f93d43102 | Chris Tsang | 2025-11-04T00:26:51 | Add Value classes | diff --git a/src/value.rs b/src/value.rs
index 42c8214..148c966 100644
--- a/src/value.rs
+++ b/src/value.rs
@@ -42,6 +42,9 @@ mod tests;
#[cfg(feature = "hashable-value")]
mod hashable_value;
+mod value_class;
+pub use value_class::*;
+
mod value_tuple;
pub use value_tuple::*;
diff --git a/src/value/value_clas... | 7 | 43 | 0 |
e7f3816406ff485abdfcfb6166e1ecad33e55134 | Chris Tsang | 2025-11-03T20:28:53 | Add AVG for average | diff --git a/src/expr/enum.rs b/src/expr/enum.rs
index 07bf915..e9a3565 100644
--- a/src/expr/enum.rs
+++ b/src/expr/enum.rs
@@ -594,6 +594,35 @@ impl Expr {
Func::sum(self).into()
}
+ /// Express a `AVG` (average) function.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use sea_query::{... | 2 | 30 | 1 |
23818b8d21b710516954e91a05fd1fc7d95d8fd3 | Chris Tsang | 2025-10-25T19:39:39 | Expose getters for index and foreign keys | diff --git a/src/foreign_key/common.rs b/src/foreign_key/common.rs
index 597fd2b..9d6a7df 100644
--- a/src/foreign_key/common.rs
+++ b/src/foreign_key/common.rs
@@ -100,6 +100,14 @@ impl TableForeignKey {
self
}
+ pub fn get_name(&self) -> Option<&str> {
+ self.name.as_deref()
+ }
+
+ pu... | 2 | 15 | 2 |
dd9ecc271844bf79ea9290d611eeb0183baa8cc2 | Chris Tsang | 2025-10-25T14:42:31 | 1.0.0-rc.15 | diff --git a/Cargo.toml b/Cargo.toml
index c9457e1..ee2551d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = [".", "sea-query-derive"]
[package]
name = "sea-query"
-version = "1.0.0-rc.14"
+version = "1.0.0-rc.15"
authors = [
"Chris Tsang <chris.2y3@outlook.com>",
"Billy Chan <ccw.billy... | 1 | 1 | 1 |
64aa21eb10a5761edede0f125f465a363afdc6ae | Chris Tsang | 2025-10-25T14:40:59 | sea-query-derive 1.0.0-rc.11 | diff --git a/sea-query-derive/Cargo.toml b/sea-query-derive/Cargo.toml
index 8a981d3..c0b88f8 100644
--- a/sea-query-derive/Cargo.toml
+++ b/sea-query-derive/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "sea-query-derive"
-version = "1.0.0-rc.10"
+version = "1.0.0-rc.11"
authors = [ "Follpvosten <wolfi@karpador.xyz>"... | 1 | 1 | 1 |
013186ac111b4fc1fda0568b3d4595c68412d312 | Chris Tsang | 2025-10-25T14:23:20 | Make sea-query-derive more lightweight | diff --git a/Cargo.toml b/Cargo.toml
index b0ed200..c9457e1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -29,7 +29,7 @@ path = "src/lib.rs"
[dependencies]
inherent = "1.0"
-sea-query-derive = { version = "1.0.0-rc", path = "sea-query-derive", default-features = false, optional = true }
+sea-query-derive = { version ... | 3 | 13 | 4 |
e884e35bd852aa81a405e83fe73d16e98de269bc | Desiders | 2025-10-25T11:04:33 | Add `null` method for `Expr` (#1000)
## PR Info
- Closes #999
## New Features
- Add `null` method for `Expr` | diff --git a/src/expr/enum.rs b/src/expr/enum.rs
index ddec8b0..07bf915 100644
--- a/src/expr/enum.rs
+++ b/src/expr/enum.rs
@@ -832,6 +832,23 @@ impl Expr {
CaseStatement::new().case(cond, then)
}
+ /// Keyword `NULL`.
+ ///
+ /// # Examples
+ ///
+ /// ```
+ /// use sea_query::*;
+ ... | 1 | 17 | 0 |
bb24f177973f038ebac86cc759f57b9c64ec71ac | Chris Tsang | 2025-10-25T00:26:16 | ValueTuple shouldn't be open-ended | diff --git a/src/value/value_tuple.rs b/src/value/value_tuple.rs
index 5152edd..5e58639 100644
--- a/src/value/value_tuple.rs
+++ b/src/value/value_tuple.rs
@@ -2,7 +2,6 @@ use super::*;
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "hashable-value", derive(Hash, Eq))]
-#[non_exhaustive]
pub enum ValueTu... | 1 | 0 | 1 |
b057d1a5c1cd8d36e5f7be4054039c32a363de09 | Luca Barbato | 2025-10-23T02:47:54 | Fix some documentation errors (#1003) | diff --git a/src/extension/postgres/ltree.rs b/src/extension/postgres/ltree.rs
index 8483084..917d45a 100644
--- a/src/extension/postgres/ltree.rs
+++ b/src/extension/postgres/ltree.rs
@@ -12,7 +12,7 @@ use crate::Iden;
///
/// The `path` column is then populated to generate the tree.
///
-/// ```ignore
+/// ```sql
... | 3 | 9 | 7 |
c712cb79b977deb627cfcd538026a1eb46f9c8f8 | Luca Barbato | 2025-10-17T09:50:00 | Fix docs generation for sea-query-sqlx (#997)
Currently the docs.rs version is quite empty. | diff --git a/sea-query-sqlx/Cargo.toml b/sea-query-sqlx/Cargo.toml
index b51ba5e..ae0c50f 100644
--- a/sea-query-sqlx/Cargo.toml
+++ b/sea-query-sqlx/Cargo.toml
@@ -53,3 +53,7 @@ runtime-actix-rustls = ["sqlx?/runtime-tokio-rustls"]
runtime-tokio = ["sqlx?/runtime-tokio"]
runtime-tokio-native-tls = ["sqlx?/runtime-to... | 2 | 8 | 2 |
a79c7733683a783eac75cbf42273216bec1f1e8e | 狐狸 | 2025-10-08T09:11:05 | Use `IntoIden` instead of `Into<String>` in `ColumnType::custom` (#994) | diff --git a/src/table/column.rs b/src/table/column.rs
index 58de8ae..fbb942c 100644
--- a/src/table/column.rs
+++ b/src/table/column.rs
@@ -167,9 +167,9 @@ impl PartialEq for ColumnType {
impl ColumnType {
pub fn custom<T>(ty: T) -> ColumnType
where
- T: Into<String>,
+ T: IntoIden,
{
- ... | 1 | 2 | 2 |
4c591385cf22ecc6493942f38cde1cab7682e285 | 狐狸 | 2025-09-30T20:38:31 | Use itoa for integer formatting (#990)
This optimization reduces the gap in build and to_string methods between
the PostgreSQL backend and other backends. | diff --git a/Cargo.toml b/Cargo.toml
index f3b6b4d..b0ed200 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -43,6 +43,7 @@ jiff = { version = "0.2.15", default-features = false, optional = true, features
ipnetwork = { version = "0.20", default-features = false, optional = true }
mac_address = { version = "1.1", default-f... | 9 | 92 | 49 |
8ba44ecc1b8795b664deff75035ffe06cd5642f1 | Chris Tsang | 2025-09-24T11:00:43 | Add Send + Sync to IdenStatic when thread-safe is enabled
This allows SeaORM to reuse this type | diff --git a/src/types/iden/core.rs b/src/types/iden/core.rs
index fb174de..11214d6 100644
--- a/src/types/iden/core.rs
+++ b/src/types/iden/core.rs
@@ -51,6 +51,13 @@ impl Iden for &'static str {
}
}
+#[cfg(feature = "thread-safe")]
+/// Identifier statically known at compile-time.
+pub trait IdenStatic: Iden ... | 1 | 7 | 0 |
1542d0e90ef1c7e39fb3ecd427694b4ae57cce1b | Chris Tsang | 2025-09-24T10:17:16 | Improve docs | diff --git a/src/query/insert.rs b/src/query/insert.rs
index 2ebd2c8..e0763ad 100644
--- a/src/query/insert.rs
+++ b/src/query/insert.rs
@@ -241,6 +241,7 @@ impl InsertStatement {
}
/// Specify a row of values to be inserted.
+ ///
/// Return error when number of values not matching number of column... | 2 | 17 | 0 |
d1d2d88a911b4a8001ee4a6eb4c976cd76c8fd1d | brqnko | 2025-09-22T16:03:43 | Change the shared lock syntax to 'LOCK IN SHARE MODE' in MSQL for MariaDB support (#980)
<!--
Thank you for contributing to this project!
If you need any help please feel free to contact us on Discord:
https://discord.com/invite/uCPdDXzbdv
Or, mention our core members by typing `@GitHub_Handle` on any issue /
PR
Ad... | diff --git a/src/backend/mysql/query.rs b/src/backend/mysql/query.rs
index 76dddb3..08d19db 100644
--- a/src/backend/mysql/query.rs
+++ b/src/backend/mysql/query.rs
@@ -214,6 +214,15 @@ impl QueryBuilder for MysqlQueryBuilder {
"RAND"
}
+ fn lock_phrase(&self, lock_type: LockType) -> &'static str {
+... | 3 | 22 | 9 |
b6c0b5e68b28516e8588905bcb999ab4becc716b | Chris Tsang | 2025-09-16T22:08:48 | Bump binder crates | diff --git a/sea-query-rbatis/Cargo.toml b/sea-query-rbatis/Cargo.toml
index f5d8aa6..e16fcaa 100644
--- a/sea-query-rbatis/Cargo.toml
+++ b/sea-query-rbatis/Cargo.toml
@@ -3,7 +3,7 @@
[package]
name = "sea-query-rbatis"
-version = "0.2.0-rc.1"
+version = "0.2.0-rc.2"
authors = ["Caisin <kaixing622@qq.com>"]
edit... | 2 | 2 | 2 |
77b888e3b2daffc9dc301badb2934985a1896ab8 | Chris Tsang | 2025-09-16T21:44:43 | 1.0.0-rc.14 | diff --git a/Cargo.toml b/Cargo.toml
index ad0da01..f3b6b4d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = [".", "sea-query-derive"]
[package]
name = "sea-query"
-version = "1.0.0-rc.12"
+version = "1.0.0-rc.14"
authors = [
"Chris Tsang <chris.2y3@outlook.com>",
"Billy Chan <ccw.billy... | 1 | 1 | 1 |
37c1c32f0478026b03f8038d7f4d9efa7204dc91 | Chris Tsang | 2025-09-16T21:41:20 | Tweak audit API | diff --git a/src/audit/mod.rs b/src/audit/mod.rs
index a2990ad..e8f0ca0 100644
--- a/src/audit/mod.rs
+++ b/src/audit/mod.rs
@@ -49,8 +49,8 @@ pub enum SchemaOper {
}
impl AccessType {
- pub fn as_str(at: &AccessType) -> &'static str {
- match at {
+ pub fn as_str(&self) -> &'static str {
+ matc... | 1 | 2 | 2 |
3d7729dbea5f4597a8a10a90313b97c8eefaa4ea | Chris Tsang | 2025-09-16T21:39:12 | Tweak audit API | diff --git a/src/audit/mod.rs b/src/audit/mod.rs
index b174e2e..a2990ad 100644
--- a/src/audit/mod.rs
+++ b/src/audit/mod.rs
@@ -48,6 +48,22 @@ pub enum SchemaOper {
Truncate,
}
+impl AccessType {
+ pub fn as_str(at: &AccessType) -> &'static str {
+ match at {
+ AccessType::Select => "selec... | 1 | 19 | 0 |
6eecb49f00d4d4db85a35b6313c1406d5318afd9 | Chris Tsang | 2025-09-16T21:25:53 | Change inject_parameters interface | diff --git a/src/prepare.rs b/src/prepare.rs
index 4ac8831..c404542 100644
--- a/src/prepare.rs
+++ b/src/prepare.rs
@@ -83,11 +83,7 @@ impl SqlWriter for SqlWriterValues {
}
}
-pub fn inject_parameters<I>(sql: &str, params: I, query_builder: &impl QueryBuilder) -> String
-where
- I: IntoIterator<Item = Valu... | 1 | 8 | 12 |
de47989df4b58b4f6784c3bcfea85bead478b1a7 | 狐狸 | 2025-09-13T19:56:54 | Change Expr::Custom(String) to Cow<'static, str> (#940) | diff --git a/src/expr/enum.rs b/src/expr/enum.rs
index 19b251e..ddec8b0 100644
--- a/src/expr/enum.rs
+++ b/src/expr/enum.rs
@@ -1,3 +1,5 @@
+use std::borrow::Cow;
+
use crate::*;
/// An arbitrary, dynamically-typed SQL expression.
@@ -25,8 +27,8 @@ pub enum Expr {
SubQuery(Option<SubQueryOper>, Box<SubQuerySt... | 12 | 42 | 31 |
b5581812543a34b6c821956ad726f5affe49c3d3 | Chris Tsang | 2025-09-13T00:11:04 | Fix doc tests | diff --git a/src/extension/postgres/func/json_table/mod.rs b/src/extension/postgres/func/json_table/mod.rs
index 1d903ff..3b078d3 100644
--- a/src/extension/postgres/func/json_table/mod.rs
+++ b/src/extension/postgres/func/json_table/mod.rs
@@ -39,7 +39,7 @@ impl PgFunc {
///
/// assert_eq!(
/// quer... | 1 | 3 | 3 |
db9e2d8dc4f75193d139ebaead71d4cc878efeed | Chris Tsang | 2025-09-12T22:14:39 | Fix test case | diff --git a/tests/postgres/query.rs b/tests/postgres/query.rs
index c9ec7d8..8d041d6 100644
--- a/tests/postgres/query.rs
+++ b/tests/postgres/query.rs
@@ -1948,7 +1948,7 @@ fn escape_1() {
let test = r#" "abc" "#;
assert_eq!(
PostgresQueryBuilder.escape_string(test),
- r#" \"abc\" "#.to_owne... | 1 | 2 | 2 |
8e07fc8572d7a28bbe1bfa1030c7f1752effef2b | 狐狸 | 2025-09-12T22:11:38 | Implement the `EscapeBuilder` trait specifically for Postgres (#984)
Closes #694
I didn’t escape Unicode because Postgres can handle Unicode input
directly.
I also renamed `need_escape` to `needs_escape` to better follow English
grammar. | diff --git a/src/backend/mod.rs b/src/backend/mod.rs
index 29f9d44..ca96280 100644
--- a/src/backend/mod.rs
+++ b/src/backend/mod.rs
@@ -63,7 +63,7 @@ pub trait QuotedBuilder {
pub trait EscapeBuilder {
/// Return if string literal needs to be escaped
- fn need_escape(&self, s: &str) -> bool {
+ fn needs_... | 3 | 150 | 3 |
ac1985a50c2c97df443277d39065666830bdf04a | 狐狸 | 2025-09-12T21:57:48 | Fix mysql index hint (#957)
## PR Info
Closes #760
## Bug Fixes
- Fix all index hints appear after the last from statement | diff --git a/src/backend/mysql/query.rs b/src/backend/mysql/query.rs
index 739cb4c..ebc5b85 100644
--- a/src/backend/mysql/query.rs
+++ b/src/backend/mysql/query.rs
@@ -15,13 +15,18 @@ impl QueryBuilder for MysqlQueryBuilder {
};
}
- fn prepare_index_hints(&self, select: &SelectStatement, sql: &mut d... | 4 | 259 | 29 |
1f0cb30948e64934344902659a7ae2ea8c457929 | 狐狸 | 2025-09-07T20:18:24 | Rename `prepare_simple_expr` to `prepare_expr` (#988)
Since we have renamed SimpleExpr, I renamed the related methods for
consistency.
This is basically just a personal preference. | diff --git a/src/backend/mysql/index.rs b/src/backend/mysql/index.rs
index ee0a782..888b06d 100644
--- a/src/backend/mysql/index.rs
+++ b/src/backend/mysql/index.rs
@@ -113,7 +113,7 @@ impl IndexBuilder for MysqlQueryBuilder {
}
IndexColumn::Expr(column) => {
... | 13 | 50 | 50 |
40e33f2528cf00dd930a6f05becebb8593bd9d20 | 狐狸 | 2025-08-31T19:29:23 | Tweak pg json functions (#981)
- Minimize the exported surface and improve visibility.
- Remove all `on_*` methods, as they were verbose anyway.
- Remove the `set_passing` methods. We can add them back if needed, but
I think the current methods are sufficient. | diff --git a/src/extension/postgres/func/json_exists.rs b/src/extension/postgres/func/json_exists.rs
index 7480184..ad427d8 100644
--- a/src/extension/postgres/func/json_exists.rs
+++ b/src/extension/postgres/func/json_exists.rs
@@ -7,10 +7,10 @@ use crate::{
#[derive(Debug, Clone)]
pub struct Builder {
- pub(cr... | 10 | 122 | 154 |
ed4008e0aef98120a0d3c10024a52f6dd593eace | Dmitrii Aleksandrov | 2025-08-29T06:07:15 | Further split `types.rs` (#978)
It was a little annoying to navigate, too much stuff lumped together.
I'm still not sure how to best factor `iden/`, but at least now we have
a clear separation between `iden/`-related stuff and other unrelated
types in `types/mod.rs`. At 237 lines, it seems about right.
There should b... | diff --git a/src/types/iden/compound.rs b/src/types/iden/compound.rs
new file mode 100644
index 0000000..7a49edb
--- /dev/null
+++ b/src/types/iden/compound.rs
@@ -0,0 +1,252 @@
+//! "Compound" identifiers built on top of `DynIden`.
+
+use crate::{FunctionCall, SelectStatement, ValueTuple};
+use std::{fmt::Debug, iter:... | 7 | 675 | 659 |
512f416a5cf93ee54563f4a914e900d5245a096d | 狐狸 | 2025-08-28T20:07:05 | Rework `ColumnSpec` (#961)
It should be a struct instead of a vec of enum.
The fix for tests is a bit dirty, but I couldn’t think of any other way
than implementing `prepare_column_spec` individually for each backend.
- Close SeaQL/sea-orm#2396
- Close SeaQL/sea-orm#2337 | diff --git a/src/backend/mysql/table.rs b/src/backend/mysql/table.rs
index 2ad424a..0789124 100644
--- a/src/backend/mysql/table.rs
+++ b/src/backend/mysql/table.rs
@@ -19,10 +19,7 @@ impl TableBuilder for MysqlQueryBuilder {
self.prepare_column_type(column_type, sql);
}
- for column_spec... | 9 | 193 | 182 |
273b66404fba54f2a1fd4c274b2a9a6ddab948ed | 狐狸 | 2025-08-28T20:04:36 | Continue #572 (#968)
Since we merged Expr and SimpleExpr, this solution is cleaner.
I also implement the From trait for other types.
- Closes #516 | diff --git a/src/expr.rs b/src/expr.rs
index 3d3d901..e31949b 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -46,6 +46,84 @@ pub enum Expr {
TypeName(TypeRef),
}
+impl<T> From<T> for Expr
+where
+ T: Into<Value>,
+{
+ fn from(v: T) -> Self {
+ Self::Value(v.into())
+ }
+}
+
+impl From<Vec<Value>>... | 2 | 92 | 50 |
ac2abe9f664e2b886309eb9d6b82cf717f891abf | Chris Tsang | 2025-08-27T22:40:14 | Remove feature guard | diff --git a/src/backend/query_builder.rs b/src/backend/query_builder.rs
index 9b46a5b..b91cfb1 100644
--- a/src/backend/query_builder.rs
+++ b/src/backend/query_builder.rs
@@ -972,7 +972,6 @@ pub trait QueryBuilder:
JoinType::LeftJoin => "LEFT JOIN",
JoinType::RightJoin => "RIGHT JOIN",
... | 3 | 1 | 4 |
31fd40820795614d97f95fc84742901bdf1845b7 | honzuki | 2025-08-27T22:26:09 | Add straight join (#962) | diff --git a/src/backend/query_builder.rs b/src/backend/query_builder.rs
index 41bb26a..9b46a5b 100644
--- a/src/backend/query_builder.rs
+++ b/src/backend/query_builder.rs
@@ -972,6 +972,8 @@ pub trait QueryBuilder:
JoinType::LeftJoin => "LEFT JOIN",
JoinType::RightJoin => "RIGHT JOIN",
... | 3 | 51 | 0 |
63bec5cc923442ea37671aedd8ca17e59906b592 | daniel | 2025-08-27T10:38:40 | feat(index): Support for `CONCURRENTLY` modifying indexes (#963)
## New Features
- Adds support for creating and dropping indexes concurrently
https://www.postgresql.org/docs/current/sql-createindex.html#SQL-CREATEINDEX-CONCURRENTLY
Postgres only. | diff --git a/src/backend/postgres/index.rs b/src/backend/postgres/index.rs
index 5115c7d..55eed32 100644
--- a/src/backend/postgres/index.rs
+++ b/src/backend/postgres/index.rs
@@ -39,6 +39,10 @@ impl IndexBuilder for PostgresQueryBuilder {
self.prepare_index_prefix(create, sql);
sql.write_str("INDEX ... | 4 | 57 | 8 |
a3df3f719d50b18f301d4be9c55ada8df4598883 | Chris Tsang | 2025-08-27T10:16:03 | 1.0.0-rc.12 | diff --git a/Cargo.toml b/Cargo.toml
index 989896b..ad0da01 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = [".", "sea-query-derive"]
[package]
name = "sea-query"
-version = "1.0.0-rc.11"
+version = "1.0.0-rc.12"
authors = [
"Chris Tsang <chris.2y3@outlook.com>",
"Billy Chan <ccw.billy... | 1 | 1 | 1 |
3eb76c278947ac04b13387d5ea86c1e22db57668 | Filip "botafi" Botai | 2025-08-26T15:16:02 | Fix #971 compilation error with serde_json preserve_order feature (#972)
## PR Info
- Closes https://github.com/SeaQL/sea-query/issues/971
## New Features
- [ ] checks value size correctly on serde_json::Value with
preserve-order feature by increasing it
## Bug Fixes
- [ ] fixes compilation with serde_json::Value... | diff --git a/src/value.rs b/src/value.rs
index 6786cbb..b4817d9 100644
--- a/src/value.rs
+++ b/src/value.rs
@@ -330,10 +330,25 @@ pub enum Value {
/// Previously, the size was 24. We bumped it to 32 such that `String`
/// can be unboxed.
pub const VALUE_SIZE: usize = check_value_size();
+const MAX_VALUE_SIZE: usize... | 1 | 17 | 2 |
6dd6cd387f924bdde86f92e971ac6d7c595c1383 | Chris Tsang | 2025-08-24T23:53:14 | Revert "Remove SchemaTable" | diff --git a/src/audit/delete.rs b/src/audit/delete.rs
index 6704794..325715f 100644
--- a/src/audit/delete.rs
+++ b/src/audit/delete.rs
@@ -7,18 +7,18 @@ impl AuditTrait for DeleteStatement {
let Some(table) = &self.table else {
return Err(Error::UnableToParseQuery);
};
- let Some... | 5 | 16 | 16 |
d20aeb2d513385f549bf6ac145fecf8a5df93b41 | Chris Tsang | 2025-08-22T23:16:24 | 1.0.0-rc.11 | diff --git a/Cargo.toml b/Cargo.toml
index 7f9f031..70edcfe 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = [".", "sea-query-derive"]
[package]
name = "sea-query"
-version = "1.0.0-rc.10"
+version = "1.0.0-rc.11"
authors = [
"Chris Tsang <chris.2y3@outlook.com>",
"Billy Chan <ccw.billy... | 1 | 1 | 1 |
95f9ce80dac122ee40321f97378d18dc03a830c0 | Chris Tsang | 2025-08-19T17:59:10 | 1.0.0-rc.10 | diff --git a/Cargo.toml b/Cargo.toml
index 679bf28..ffe78c4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ members = [".", "sea-query-derive"]
[package]
name = "sea-query"
-version = "1.0.0-rc.8"
+version = "1.0.0-rc.10"
authors = [
"Chris Tsang <chris.2y3@outlook.com>",
"Billy Chan <ccw.billy.... | 4 | 4 | 4 |
3e89483d37d800c42c306ac383f94d1f94ce2969 | Chris Tsang | 2025-08-19T11:36:12 | pub fn inject_parameters | diff --git a/src/prepare.rs b/src/prepare.rs
index 35f539f..ee883b5 100644
--- a/src/prepare.rs
+++ b/src/prepare.rs
@@ -77,8 +77,7 @@ impl SqlWriter for SqlWriterValues {
}
}
-#[cfg(test)]
-fn inject_parameters<I>(sql: &str, params: I, query_builder: &dyn QueryBuilder) -> String
+pub fn inject_parameters<I>(sq... | 1 | 1 | 2 |
95a20726ab5b5573758302bf7cc2f0669b96f2fb | 狐狸 | 2025-08-15T11:09:15 | Remove Expr::new (#917)
https://github.com/SeaQL/sea-query/pull/897#issuecomment-2954569983
> I'm considering removing Expr::new, since we already have Expr::from.
> As @Expurple mentioned here, I checked my codebase and found that
using Expr::from makes the intent clearer. Moreover, accepting
Into<Self> in the new m... | diff --git a/src/expr.rs b/src/expr.rs
index 9582b01..0b3a479 100644
--- a/src/expr.rs
+++ b/src/expr.rs
@@ -1543,10 +1543,6 @@ where
}
impl Expr {
- pub fn new(expr: impl Into<Self>) -> Self {
- expr.into()
- }
-
#[deprecated(since = "0.29.0", note = "Please use the [`Asterisk`]")]
pub fn as... | 1 | 0 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.