ColumnTrait extends FromStr

This commit is contained in:
Chris Tsang 2021-08-23 01:16:00 +08:00
parent 4c3bc32fd8
commit 5966100244

View File

@ -1,3 +1,4 @@
use std::str::FromStr;
use crate::{EntityName, IdenStatic, Iterable};
use sea_query::{DynIden, Expr, SeaRc, SelectStatement, SimpleExpr, Value};
@ -77,7 +78,7 @@ macro_rules! bind_subquery_func {
// LINT: when the operand value does not match column type
/// Wrapper of the identically named method in [`sea_query::Expr`]
pub trait ColumnTrait: IdenStatic + Iterable {
pub trait ColumnTrait: IdenStatic + Iterable + FromStr {
type EntityName: EntityName;
fn def(&self) -> ColumnDef;