Merge branch 'master' into last-insert-id
This commit is contained in:
commit
3fd33ab53c
24
.github/workflows/rust.yml
vendored
24
.github/workflows/rust.yml
vendored
@ -171,7 +171,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
path: [async-std, tokio, actix_example, actix4_example, rocket_example]
|
||||
path: [basic, actix_example, actix4_example, rocket_example]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
@ -187,6 +187,28 @@ jobs:
|
||||
args: >
|
||||
--manifest-path examples/${{ matrix.path }}/Cargo.toml
|
||||
|
||||
issues:
|
||||
name: Issues
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
path: [86]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
|
||||
- uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: build
|
||||
args: >
|
||||
--manifest-path issues/${{ matrix.path }}/Cargo.toml
|
||||
|
||||
sqlite:
|
||||
name: SQLite
|
||||
runs-on: ubuntu-20.04
|
||||
|
@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## 0.2.6 - 2021-10-09
|
||||
|
||||
- [[#224]] [sea-orm-cli] Date & Time column type mapping
|
||||
- Escape rust keywords with `r#` raw identifier
|
||||
|
||||
[#224]: https://github.com/SeaQL/sea-orm/pull/224
|
||||
|
||||
## 0.2.5 - 2021-10-06
|
||||
|
||||
- [[#227]] Resolve "Inserting actual none value of Option<Date> results in panic"
|
||||
|
@ -3,7 +3,7 @@ members = [".", "sea-orm-macros", "sea-orm-codegen"]
|
||||
|
||||
[package]
|
||||
name = "sea-orm"
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
authors = ["Chris Tsang <tyt2y7@gmail.com>"]
|
||||
edition = "2018"
|
||||
description = "🐚 An async & dynamic ORM for Rust"
|
||||
@ -29,7 +29,7 @@ futures = { version = "^0.3" }
|
||||
futures-util = { version = "^0.3" }
|
||||
log = { version = "^0.4", optional = true }
|
||||
rust_decimal = { version = "^1", optional = true }
|
||||
sea-orm-macros = { version = "^0.2.5", path = "sea-orm-macros", optional = true }
|
||||
sea-orm-macros = { version = "^0.2.6", path = "sea-orm-macros", optional = true }
|
||||
sea-query = { version = "^0.17.1", features = ["thread-safe"] }
|
||||
sea-strum = { version = "^0.21", features = ["derive", "sea-orm"] }
|
||||
serde = { version = "^1.0", features = ["derive"] }
|
||||
|
@ -21,7 +21,7 @@
|
||||
SeaORM is a relational ORM to help you build light weight and concurrent web services in Rust.
|
||||
|
||||
[](https://www.sea-ql.org/SeaORM/docs/index)
|
||||
[](https://github.com/SeaQL/sea-orm/tree/master/examples/async-std)
|
||||
[](https://github.com/SeaQL/sea-orm/tree/master/examples/basic)
|
||||
[](https://github.com/SeaQL/sea-orm/tree/master/examples/actix_example)
|
||||
[](https://github.com/SeaQL/sea-orm/tree/master/examples/rocket_example)
|
||||
[](https://discord.com/invite/uCPdDXzbdv)
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
[package]
|
||||
name = "sea-orm-cli"
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
authors = [ "Billy Chan <ccw.billy.123@gmail.com>" ]
|
||||
edition = "2018"
|
||||
description = "Command line utility for SeaORM"
|
||||
@ -21,7 +21,7 @@ path = "src/main.rs"
|
||||
clap = { version = "^2.33.3" }
|
||||
dotenv = { version = "^0.15" }
|
||||
async-std = { version = "^1.9", features = [ "attributes" ] }
|
||||
sea-orm-codegen = { version = "^0.2.5", path = "../sea-orm-codegen" }
|
||||
sea-orm-codegen = { version = "^0.2.6", path = "../sea-orm-codegen" }
|
||||
sea-schema = { version = "^0.2.9", default-features = false, features = [
|
||||
"debug-print",
|
||||
"sqlx-mysql",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "sea-orm-codegen"
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
authors = ["Billy Chan <ccw.billy.123@gmail.com>"]
|
||||
edition = "2018"
|
||||
description = "Code Generator for SeaORM"
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "sea-orm-macros"
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
authors = [ "Billy Chan <ccw.billy.123@gmail.com>" ]
|
||||
edition = "2018"
|
||||
description = "Derive macros for SeaORM"
|
||||
|
@ -239,23 +239,23 @@ where
|
||||
matches!(self.state, ActiveValueState::Unset)
|
||||
}
|
||||
|
||||
pub fn take(&mut self) -> V {
|
||||
pub fn take(&mut self) -> Option<V> {
|
||||
self.state = ActiveValueState::Unset;
|
||||
self.value.take().unwrap()
|
||||
self.value.take()
|
||||
}
|
||||
|
||||
pub fn unwrap(self) -> V {
|
||||
self.value.unwrap()
|
||||
}
|
||||
|
||||
pub fn into_value(self) -> Value {
|
||||
self.value.unwrap().into()
|
||||
pub fn into_value(self) -> Option<Value> {
|
||||
self.value.map(Into::into)
|
||||
}
|
||||
|
||||
pub fn into_wrapped_value(self) -> ActiveValue<Value> {
|
||||
match self.state {
|
||||
ActiveValueState::Set => ActiveValue::set(self.into_value()),
|
||||
ActiveValueState::Unchanged => ActiveValue::unchanged(self.into_value()),
|
||||
ActiveValueState::Set => ActiveValue::set(self.into_value().unwrap()),
|
||||
ActiveValueState::Unchanged => ActiveValue::unchanged(self.into_value().unwrap()),
|
||||
ActiveValueState::Unset => ActiveValue::unset(),
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
//! SeaORM is a relational ORM to help you build light weight and concurrent web services in Rust.
|
||||
//!
|
||||
//! [](https://www.sea-ql.org/SeaORM/docs/index)
|
||||
//! [](https://github.com/SeaQL/sea-orm/tree/master/examples/async-std)
|
||||
//! [](https://github.com/SeaQL/sea-orm/tree/master/examples/basic)
|
||||
//! [](https://github.com/SeaQL/sea-orm/tree/master/examples/actix_example)
|
||||
//! [](https://github.com/SeaQL/sea-orm/tree/master/examples/rocket_example)
|
||||
//! [](https://discord.com/invite/uCPdDXzbdv)
|
||||
|
@ -131,7 +131,7 @@ where
|
||||
}
|
||||
if av_has_val {
|
||||
columns.push(col);
|
||||
values.push(av.into_value());
|
||||
values.push(av.into_value().unwrap());
|
||||
}
|
||||
}
|
||||
self.query.columns(columns);
|
||||
|
Loading…
x
Reference in New Issue
Block a user