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.
- [#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>;
- 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