All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Added
ValueTuple::Many
for tuple with length up to 12 SeaQL#564 - Added create Table
CHECK
Constraints SeaQL#567
- Removed
Expr::tbl
,Expr::greater_than
,Expr::greater_or_equal
,Expr::less_than
,Expr::less_or_equal
,Expr::into_simple_expr
SeaQL#551 - Removed
SimpleExpr::equals
andSimpleExpr::not_equals
SeaQL#551 - Removed
InsertStatement::exprs
,InsertStatement::exprs_panic
SeaQL#551 - Removed
OnConflict::update_value
,OnConflict::update_values
,OnConflict::update_expr
,OnConflict::update_exprs
SeaQL#551 - Removed
UpdateStatement::exprs
,UpdateStatement::col_expr
,UpdateStatement::value_expr
SeaQL#551 BigInteger
now maps tobigint
instead ofinteger
on SQLite SeaQL#556- Fixed Postgres
GEN_RANDOM_UUID
SeaQL#568PgFunction::GetRandomUUID
->PgFunction::GenRandomUUID
PgFunc::get_random_uuid
->PgFunc::gen_random_uuid
- Elided unnecessary lifetimes SeaQL#552
- Changed all
version = "^x.y.z"
intoversion = "x.y.z"
in all Cargo.toml SeaQL#547 - Disabled default features and enable only the needed ones SeaQL#547
- Added
Cow<str>
conversion toValue
SeaQL#550 - Added convert various
UUID
defined inuuid::fmt
module intosea_query::Value::Uuid
SeaQL#563
- Fixes Postgres
GEN_RANDOM_UUID
SeaQL#568
- New struct
FunctionCall
which hold function and arguments SeaQL#475 - New trait
IdenStatic
with methodfn as_str(&self) -> &'static str
SeaQL#508 - New traits
PgExpr
andSqliteExpr
for custom expressions SeaQL#519 - Support
BigDecimal
,IpNetwork
andMacAddress
forsea-query-postgres
SeaQL#503
- Added
SelectStatement::from_function
SeaQL#475 - Added binary operators from the Postgres
pg_trgm
extension SeaQL#486 - Added
ILIKE
andNOT ILIKE
operators SeaQL#473 - Added the
mul
anddiv
methods forSimpleExpr
SeaQL#510 - Added the
MATCH
,->
and->>
operators for SQLite SeaQL#513 - Added the
FULL OUTER JOIN
SeaQL#497 - Added
PgFunc::get_random_uuid
SeaQL#530 - Added
SimpleExpr::eq
,SimpleExpr::ne
,Expr::not_equals
SeaQL#528 - Added
PgFunc::starts_with
SeaQL#529 - Added
Expr::custom_keyword
andSimpleExpr::not
SeaQL#535 - Added
SimpleExpr::like
,SimpleExpr::not_like
andExpr::cast_as
SeaQL#539 - Added support for
NULLS NOT DISTINCT
clause for Postgres SeaQL#532 - Added
Expr::cust_with_expr
andExpr::cust_with_exprs
SeaQL#531 - Added support for converting
&String
to Value SeaQL#537
- Made
value::with_array
module public and therefore makingNotU8
trait public SeaQL#511 - Drop the
Sized
requirement on implementers ofSchemaBuilders
SeaQL#524
// given
let (statement, values) = sea_query::Query::select()
.column(Glyph::Id)
.from(Glyph::Table)
.cond_where(Cond::any()
.add(Cond::all()) // empty all() => TRUE
.add(Cond::any()) // empty any() => FALSE
)
.build(sea_query::MysqlQueryBuilder);
// old behavior
assert_eq!(statement, r#"SELECT `id` FROM `glyph`"#);
// new behavior
assert_eq!(
statement,
r#"SELECT `id` FROM `glyph` WHERE (TRUE) OR (FALSE)"#
);
- MSRV is up to 1.62 SeaQL#535
ColumnType::Array
definition changed fromArray(SeaRc<Box<ColumnType>>)
toArray(SeaRc<ColumnType>)
SeaQL#492Func::*
now returnsFunctionCall
instead ofSimpleExpr
SeaQL#475Func::coalesce
now acceptsIntoIterator<Item = SimpleExpr>
instead ofIntoIterator<Item = Into<SimpleExpr>
SeaQL#475- Removed
Expr::arg
andExpr::args
- these functions are no longer needed SeaQL#475 - Moved all Postgres specific operators to
PgBinOper
SeaQL#507 Expr::value
,Expr::gt
,Expr::gte
,Expr::lt
,Expr::lte
,Expr::add
,Expr::div
,Expr::sub
,Expr::modulo
,Expr::left_shift
,Expr::right_shift
,Expr::between
,Expr::not_between
,Expr::is
,Expr::is_not
,Expr::if_null
now acceptsInto<SimpleExpr>
instead ofInto<Value>
SeaQL#476Expr::is_in
,Expr::is_not_in
now acceptsInto<SimpleExpr>
instead ofInto<Value>
and convert it toSimpleExpr::Tuple
instead ofSimpleExpr::Values
SeaQL#476Expr::expr
now acceptsInto<SimpleExpr>
instead ofSimpleExpr
SeaQL#475- Moved
Expr::ilike
,Expr::not_ilike
,Expr::matches
,Expr::contains
,Expr::contained
,Expr::concatenate
,Expr::concat
,SimpleExpr::concatenate
andSimpleExpr::concat
to new traitPgExpr
SeaQL#519 Expr::equals
now acceptsC: IntoColumnRef
instead ofT: IntoIden, C: IntoIden
SeaQL#528- Removed integer and date time column types' display length / precision option SeaQL#525
- Deprecated
Expr::greater_than
,Expr::greater_or_equal
,Expr::less_than
andExpr::less_or_equal
SeaQL#476 - Deprecated
SimpleExpr::equals
,SimpleExpr::not_equals
SeaQL#528 - Deprecated
Expr::tbl
, please useExpr::col
with a tuple SeaQL#540
- Replace
impl Default
with#[derive(Default)]
SeaQL#535 - Exclude
sqlx
default features SeaQL#543 - Use
dtolnay/rust-toolchain
instead ofactions-rs/toolchain
inCI
SeaQL#544
- Made
value::with_array
module public and therefore makingNotU8
trait public SeaQL#511
- Enable SQLx features only if SQLx optional dependency is enabled SeaQL#517
- Fix consecutive spacing on schema statements SeaQL#481
- SQLite bind
rust_decimal
&bigdecimal
as f64 SeaQL#480
- Support
CROSS JOIN
SeaQL#376 - We are going through series of changes to how database drivers work
(SeaQL#416, SeaQL#423):
sea-query-binder
is now the recommended way (trait based) of working with SQLx, replacingsea-query-driver
(macro based) SeaQL#434sea-query-binder
is now a separate dependency, instead of integrated withsea-query
SeaQL#432rusqlite
support is moved tosea-query-rusqlite
SeaQL#422postgres
support is moved tosea-query-postgres
SeaQL#433
- Added sub-query operators:
EXISTS
,ALL
,ANY
,SOME
SeaQL#379 - Added support to
ON CONFLICT WHERE
SeaQL#447 - Added support
DROP COLUMN
for SQLite SeaQL#455 - Added
YEAR
,BIT
andVARBIT
types SeaQL#466 - Added support one dimension Postgres array for SQLx SeaQL#467
- Handle Postgres schema name for schema statements SeaQL#385
- Added
%
,<<
and>>
binary operators SeaQL#419 - Added
RAND
function SeaQL#430 - Implements
Display
forValue
SeaQL#425 - Added
INTERSECT
andEXCEPT
toUnionType
SeaQL#438 - Added
OnConflict::value
andOnConflict::values
SeaQL#451 ColumnDef::default
now accepts bothValue
andSimpleExpr
SeaQL#436OrderedStatement::order_by_customs
,OrderedStatement::order_by_columns
,OverStatement::partition_by_customs
,OverStatement::partition_by_columns
now acceptsIntoIterator<Item = T>
instead ofVec<T>
SeaQL#448Expr::case
,CaseStatement::case
andCaseStatement::finally
now acceptsInto<SimpleExpr>
instead ofInto<Expr>
SeaQL#460UpdateStatement::value
now acceptInto<SimpleExpr>
instead ofInto<Value>
SeaQL#460TableAlterStatement::rename_column
,TableAlterStatement::drop_column
,ColumnDef::new
,ColumnDef::new_with_type
now acceptsIntoIden
instead ofIden
SeaQL#472
distinct_on
properly handlesColumnRef
SeaQL#450- Removed
ON
forDROP INDEX
for SQLite SeaQL#462 - Change datetime string format to include microseconds SeaQL#468
ALTER TABLE
for PosgreSQL withUNIQUE
constraint SeaQL#472
- Changed
in_tuples
interface to acceptIntoValueTuple
SeaQL#386 - Removed deprecated methods (
or_where
,or_having
,table_column
etc) SeaQL#380 - Changed
cond_where
chaining semantics SeaQL#417
// Before: will extend current Condition
assert_eq!(
Query::select()
.cond_where(any![Expr::col(Glyph::Id).eq(1), Expr::col(Glyph::Id).eq(2)])
.cond_where(Expr::col(Glyph::Id).eq(3))
.to_owned()
.to_string(PostgresQueryBuilder),
r#"SELECT WHERE "id" = 1 OR "id" = 2 OR "id" = 3"#
);
// Before: confusing, since it depends on the order of invocation:
assert_eq!(
Query::select()
.cond_where(Expr::col(Glyph::Id).eq(3))
.cond_where(any![Expr::col(Glyph::Id).eq(1), Expr::col(Glyph::Id).eq(2)])
.to_owned()
.to_string(PostgresQueryBuilder),
r#"SELECT WHERE "id" = 3 AND ("id" = 1 OR "id" = 2)"#
);
// Now: will always conjoin with `AND`
assert_eq!(
Query::select()
.cond_where(Expr::col(Glyph::Id).eq(1))
.cond_where(any![Expr::col(Glyph::Id).eq(2), Expr::col(Glyph::Id).eq(3)])
.to_owned()
.to_string(PostgresQueryBuilder),
r#"SELECT WHERE "id" = 1 AND ("id" = 2 OR "id" = 3)"#
);
// Now: so they are now equivalent
assert_eq!(
Query::select()
.cond_where(any![Expr::col(Glyph::Id).eq(2), Expr::col(Glyph::Id).eq(3)])
.cond_where(Expr::col(Glyph::Id).eq(1))
.to_owned()
.to_string(PostgresQueryBuilder),
r#"SELECT WHERE ("id" = 2 OR "id" = 3) AND "id" = 1"#
);
CURRENT_TIMESTAMP
changed from being a function to keyword SeaQL#441- Update SQLite
boolean
type frominteger
toboolean
SeaQL#400 - Changed type of
ColumnType::Enum
from(String, Vec<String>)
to: SeaQL#435
Enum {
name: DynIden,
variants: Vec<DynIden>,
}
- Deprecated
InsertStatement::exprs
,InsertStatement::exprs_panic
,OnConflict::update_value
,OnConflict::update_values
,OnConflict::update_expr
,OnConflict::update_exprs
,UpdateStatement::col_expr
,UpdateStatement::value_expr
,UpdateStatement::exprs
SeaQL#460 InsertStatement::values
,UpdateStatement::values
now acceptsIntoIterator<Item = SimpleExpr>
instead ofIntoIterator<Item = Value>
SeaQL#460- Use native api from SQLx for SQLite to work with
time
SeaQL#412
- Cleanup
IndexBuilder
trait methods SeaQL#426 - Introduce
SqlWriter
trait SeaQL#436 - Remove unneeded
vec!
from examples SeaQL#448
- Upgrade
sqlx
driver to 0.6.1
- Added support
DROP COLUMN
for SQLite SeaQL#455
- Removed
ON
forDROP INDEX
for SQLite SeaQL#462 - Changed datetime display format to include microseconds SeaQL#468
DROP NOT NULL
for PostgresALTER COLUMN
SeaQL#394
- Rename
postgres-*
features towith-*
onpostgres
driver SeaQL#377
- Add support for
VALUES
lists SeaQL#351 - Introduce
sea-query-binder
SeaQL#275 - Convert from
IpNetwork
andMacAddress
toValue
SeaQL#364
- Move
escape
andunescape
string to backend SeaQL#306 LIKE ESCAPE
support SeaQL#352 #353)clear_order_by
forOrderedStatement
- Add method to make a column nullable SeaQL#365
- Add
is
&is_not
to Expr SeaQL#348 - Add
CURRENT_TIMESTAMP
function SeaQL#349 - Add
in_tuples
method to Expr SeaQL#345
- Upgrade
uuid
to 1.0 - Upgrade
time
to 0.3 - Upgrade
ipnetwork
to 0.19 - Upgrade
bigdecimal
to 0.3 - Upgrade
sqlx
driver to 0.6
- As part of #306, the standalone functions
escape_string
andunescape_string
are removed, and becomes backend specific. So now, you have to:
use sea_query::EscapeBuilder;
let string: String = MySqlQueryBuilder.escape_string(r#" "abc" "#);
let string: String = MysqlQueryBuilder.unescape_string(r#" \"abc\" "#);
-
Replace
Value::Ipv4Network
andValue::Ipv6Network
toValue::IpNetwork
SeaQL#364 -
Remove some redundant feature flags
postgres-chrono
,postgres-json
,postgres-uuid
,postgres-time
. Use thewith-*
equivalence
Full Changelog: https://github.com/SeaQL/sea-query/compare/0.25.0...0.26.0
- Introduce
sea-query-binder
SeaQL#275
- Add method to make a column nullable SeaQL#365
- Add
is
&is_not
to Expr SeaQL#348 - Add
CURRENT_TIMESTAMP
function SeaQL#349
clear_order_by
forOrderedStatement
- CASE WHEN statement support SeaQL#304
- Add support for Ip(4,6)Network and MacAddress SeaQL#309
- [sea-query-attr] macro for deriving
Iden
enum from struct SeaQL#300 - Add ability to alter foreign keys SeaQL#299
- Select
DISTINCT ON
SeaQL#313
- Insert Default SeaQL#266
- Make
sea-query-driver
an optional dependency SeaQL#324 - Add
ABS
function SeaQL#334 - Support
IF NOT EXISTS
when create index SeaQL#332 - Support different
blob
types in MySQL SeaQL#314 - Add
VarBinary
column type SeaQL#331 - Returning expression supporting
SimpleExpr
SeaQL#335
- Fix arguments when nesting custom expressions SeaQL#333
- Fix clippy warnings for manual map SeaQL#337
- Introducing a dedicated
ReturningClause
instead of reusingSelect
onreturning
: SeaQL#317
.returning(Query::select().column(Glyph::Id).take()) // before
.returning(Query::returning().columns([Glyph::Id])) // now
- In #333, the custom expression API changed for Postgres, users should change their placeholder from
?
to Postgres's$N
let query = Query::select()
.columns([Char::Character, Char::SizeW, Char::SizeH])
.from(Char::Table)
.and_where(Expr::col(Char::Id).eq(1))
.and_where(Expr::cust_with_values("6 = $2 * $1", vec![3, 2]).into())
.to_owned();
assert_eq!(
query.to_string(PostgresQueryBuilder),
r#"SELECT "character", "size_w", "size_h" FROM "character" WHERE "id" = 1 AND 6 = 2 * 3"#
);
As a side effect, ??
is no longer needed for escaping ?
let query = Query::select()
.expr(Expr::cust_with_values(
"data @? ($1::JSONPATH)",
vec!["hello"],
))
.to_owned();
assert_eq!(
query.to_string(PostgresQueryBuilder),
r#"SELECT data @? ('hello'::JSONPATH)"#
);
- In #314,
ColumnType
'sBinary(Option<u32>)
changed toBinary(BlobSize)
, so if you usedBinary(None)
before, you should change toBinary(BlobSize::Blob(None))
Full Changelog: https://github.com/SeaQL/sea-query/compare/0.24.0...0.25.0
- Make
sea-query-driver
an optional dependency SeaQL#324
- Insert
or_default_values
SeaQL#266
- update sea-query-driver
- Fix MySQL index create statement SeaQL#308
- Add length check on condition array SeaQL#307
- Fixed SeaQL#303 driver breakage in 0.24.0
Notes: 0.24.0 & 0.24.1 were yanked
- #295 Add parameter for SQLx path to proc-macro SeaQL#297
- CTE optional columns SeaQL#301
- Add
LOWER
andUPPER
func SeaQL#276 - Insert
ON CONFLICT
support SeaQL#279 - #174 Add support for
WINDOWS
statement SeaQL#271 - #142 full support lock in select SeaQL#289
- #269 add support for postgres
ANY
,SOME
,ALL
SeaQL#283
- Add support for multiple
ALTER
operations SeaQL#277 - #229 add column if not exists SeaQL#278
- #255 Add support to CommonTableExpression columns method SeaQL#284
- #280 Rewrite drivers using proc-macro SeaQL#292
- #285 Fix timestamp_with_time_zone_len SeaQL#286
- The enum variants for
LockType
were renamed:Exclusive
->Update
andShared
->Share
- As part of #283, the drivers are split to the
sea-query-driver
crate- Remove methods
Value::is_json
andValue::as_ref_json
when feature: with-json is disabled - Remove methods
Value::is_time_*
andValue::as_ref_time_*
when feature: with-time is disabled - Remove methods
Value::is_chrono_*
andValue::as_ref_chrono*
when feature: with-chrono is disabled - Remove methods
Value::is_decimal
,Value::as_ref_decimal
andValue::decimal_to_f64
when feature: with-rust_decimal is disabled - Remove methods
Value::is_big_decimal
,Value::as_ref_big_decimal
andValue::big_decimal_to_f64
when feature: with-bigdecimal is disabled - Remove methods
Value::is_uuid
andValue::as_ref_uuid
when feature: with-uuid is disabled - Remove methods
Value::is_array
andValue::as_ref_array
when feature: postgres-array is disabled
- Remove methods
Full Changelog: https://github.com/SeaQL/sea-query/compare/0.23.0...0.24.0
- Supports
time
in addition tochrono
SeaQL#267
- Allow for trailing commas in any and all macros SeaQL#270
- Fix UNIQUE table index expression syntax for sqlite SeaQL#227
In order to co-exist with the time
crate, Date
, Time
, DateTime
etc are renamed to ChronoDate
, ChronoTime
, ChronoDateTime
. In addition, new variants TimeDate
, TimeTime
, TimeDateTime
and so on are introduced to Value
.
- Support multiple tables in the select from by @Sytten in SeaQL#261
- Add support for replace insert by @Sytten in SeaQL#262
- Add
ColumnType
unsigned integer types by @billy1624 in SeaQL#211
Full Changelog: https://github.com/SeaQL/sea-query/compare/0.21.0...0.22.0
- Use double quotes for quoting identifiers for SQLite by @SpyrosRoum in SeaQL#221
- Implement
RETURNING
for SQLite by @SpyrosRoum in SeaQL#194 - Support 'NULLS LAST' and 'NULLS FIRST' by @qyihua in SeaQL#210
- [join-lateral] by @rex-remind101 in SeaQL#224
- Insert from select by @05storm26 in SeaQL#238
- Add Expr::asterisk() and Expr::tbl_asterisk(table: DynIden) methods - Fix #217 by @RomainMazB in SeaQL#219
- Implement ToTokens for IntervalField by @autarch in SeaQL#195
- Implemented 'Array' type for Postgres. by @kev0960 in SeaQL#205
- Add
Value::DateTimeLocal
by @billy1624 in SeaQL#249 - Add
ColumnRef::SchemaTableColumn
by @billy1624 in SeaQL#206 - Datetime utc by @tyt2y3 in SeaQL#241
- Support the use of chrono::DateTime using the type alias DateTim… by @charleschege in SeaQL#222
- Fix PostgreSQL
ColumnType::TinyInteger
mapping by @billy1624 in SeaQL#207 - PR without clippy warmings in file changed tab by @billy1624 in SeaQL#212
Full Changelog: https://github.com/SeaQL/sea-query/compare/0.20.0...0.21.0
- Add
TableRef::DatabaseSchemaTable
by @billy1624 in SeaQL#193
Full Changelog: https://github.com/SeaQL/sea-query/compare/0.19.4...0.20.0
- Binding
DateTime<FixedOffset>
for SQLx MySQL & SQLite by @billy1624 in SeaQL#197
Full Changelog: https://github.com/SeaQL/sea-query/compare/0.19.2...0.19.4
Full Changelog: https://github.com/SeaQL/sea-query/compare/0.19.1...0.19.2
driver/postgres
handle non-exhaustiveValue
by @billy1624 in SeaQL#191
Full Changelog: https://github.com/SeaQL/sea-query/compare/0.19.0...0.19.1
TableCreateStatement
andTableDropStatement
takes anyIntoTableRef
table name. by @josh-codes in SeaQL#186- Add
ColumnType::Enum
by @billy1624 in SeaQL#188 - Update to Rust Edition 2021 by @billy1624 in SeaQL#189
Full Changelog: https://github.com/SeaQL/sea-query/compare/0.18.2...0.19.0
- Rename "where" keywords in
SelectStatement
to suppress IDEA warnings by @baoyachi in SeaQL#166 - Add binary method to expr by @Progdrasil in SeaQL#173
- Cast expression as custom type by @billy1624 in SeaQL#170
- Support tuple expression by @shuoli84 in SeaQL#178
Full Changelog: https://github.com/SeaQL/sea-query/compare/0.18.1...0.18.2
- [#169] Add support for Postgres interval type
- [#171] Fix bug in
Condition::add
where Condition negation is ignored
- [#171] Fix bug in
Condition::add
where Condition negation is ignored
- [#164] Revert "Fix SQLite
chrono::NaiveTime
binding"
- [#157] Fix binding nullable custom types on db drivers
The as_ref_*
methods on Value
are changed:
pub fn as_ref_json(&self) -> &Json;
Is now
pub fn as_ref_json(&self) -> Option<&Json>;
- [#171] Fix bug in
Condition::add
where Condition negation is ignored
- Fix table drop options for SQLite
- Add
IndexCreateStatement::is_unique_key()
- [#131]
CAST AS
expression - [#131]
InsertStatement
acceptsSimpleExpr
- [#137] SQLx Postgres driver bind
DateTime<FixedOffset>
- [#129] MySql
ColumnType::Binary(None)
maps to "blob"
-
[#112] Introduce
Nullable
trait to permit customOption<T>
-
[#113]
ValueType
trait should have a non-panic-ing method -
[#114]
ValueType
revamp- Remove
ValueTypeDefault
- Change
type_name
to returnString
- Remove
-
[#115] Postgres concatenate operator (
||
) -
[#117] Lock support (
FOR SHARE
,FOR UPDATE
) for SELECT statement
- [#107] Revamp
Value
to typed null value - Added
BigDecimal
support
The Value::Null
variant is removed. You have to use a specific variant with a None
.
Before:
Query::insert()
.values_panic(vec![
Value::Null,
2.1345.into(),
])
After:
Query::insert()
.values_panic(vec![
Value::String(None),
2.1345.into(),
])
Since we cannot handle the generic Null
value on JSON, we removed the json
method on InsertStatement
and UpdateStatement
. The following NO LONGER WORKS:
let query = Query::insert()
.into_table(Glyph::Table)
.json(json!({
"aspect": 2.1345,
"image": "24B",
}));
let query = Query::update()
.table(Glyph::Table)
.json(json!({
"aspect": 2.1345,
"image": "235m",
}));
In addition, if you constructed Value
manually before (instead of using into()
which is unaffected), you have to wrap them in an Option
:
Before:
let (sql, values) = query.build(PostgresQueryBuilder);
assert_eq!(
values,
Values(vec![Value::String(Box::new("A".to_owned())), Value::Int(1), Value::Int(2), Value::Int(3)]))
);
After:
let (sql, values) = query.build(PostgresQueryBuilder);
assert_eq!(
values,
Values(vec![Value::String(Some(Box::new("A".to_owned()))), Value::Int(Some(1)), Value::Int(Some(2)), Value::Int(Some(3))]))
);
- [#87] Fix inconsistent Ownership of self in Builder APIs
- [#105] Use Arc for SeaRc with feature flag thread-safe
- [#98] Support Postgres full text search
- Support SeaORM
- [#89] flattening iden enums in derive macro
- [#77] Postgres
binary
type - [#81] example for CockroachDB
- [#84] Fix Postgres constraint keywords
- [#75]
DateTimeWithTimeZone
value type andTimestampWithTimeZone
column type
- Fix Postgres
datetime
column type mapping Uuid
in schema builder
cust_with_values
allow escape?
using??
- Fixed build error for
sqlx-sqlite
- Support
Decimal
from rust_decimal
- Added
returning
for update statement
- Added
type_name
for ValueType Values
deriveClone
- Added
Update::col_expr
- Type def Rc as
SeaRc
- getters for schema statements
- Fixed
and_where_option
- Added
Condition::add_option
- Added
not_in_subquery
- Unify
cond_where
andand_where
. Note: will panic if callingor_where
afterand_where
.
- Updated Readme
- Added APIs to support ORM
- Backend and internal refactoring
- Introduced
QueryStatementBuilder
andSchemaStatementBuilder
traits - Introduced
ConditionalStatement
andOrderedStatement
traits - Introduced any/all style conditions for
cond_where
andcond_having
- Postgres
ALTER TYPE
statements forENUM
- Updated documentation
returning()
expression for Postgres insert statements- Remove redundant index name in foreign key expression of MySQL
- custom
Error
type - Empty value list for IN
- Index prefix and
IndexOrder
- Foreign key API
from
andto
- Fix foreign key bug in
ON UPDATE
- Added
index_type()
(FullText
andHash
) - Added
unique()
toIndex
- Support composite primary key
- Use
IntoIterator
trait instead ofVec
on most APIs - UUID support in
Value
- Rusqlite support
- Rename
create_if_not_exists
toif_not_exists
- Remove
partition_option
fromTableAlterStatement
- Added
ColumnDef::extra()
- Added
SchemaStatement
- Fixed
DateTime
quoting bugs
- Update sea-query-derive to 0.1.2
- derive supporting enum tuple variant and custom method
- updated docs
- Introduced
IntoColumnRef
trait to consolidatecolumn
andtable.column
- Introduced
IntoTableRef
trait to consolidatetable
andschema.table
- Introduced
IntoIden
trait to remove*_dyn
methods
- added
into_simple_expr()
- Fixing
IS NULL
- derive
Debug
on most structs
- Added
unescape_string
- Improve documentation
json
support behind features- backend as features (
backend-mysql
,backend-postgres
,backend-sqlite
) - added
from_schema()
,from_schema_as()
- Revamp
Value
build()
API changepostgres
driver supportjson
andchrono
support
- Added
join_as
- Deprecated
expr_alias
,from_alias
- Custom expression with parameters
Expr::cust_with_values()
- Custom function call
Func::cust()
- Postgres enum
Type::create().as_enum()
- derive macro
#[derive(Iden)]
- Added JSON binary column type
ColumnDef::json_binary()
- Custom column type
ColumnDef::custom()
Publish to crate.io