From 5966100244e8b327734773e4e8f3332d47ac283a Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Mon, 23 Aug 2021 01:16:00 +0800 Subject: [PATCH] ColumnTrait extends FromStr --- src/entity/column.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/entity/column.rs b/src/entity/column.rs index 8ffb7275..16546057 100644 --- a/src/entity/column.rs +++ b/src/entity/column.rs @@ -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;