Rename feature
This commit is contained in:
parent
007d27768d
commit
cd439fe4df
@ -1,11 +1,11 @@
|
||||
mod executor;
|
||||
mod select;
|
||||
#[cfg(feature = "serialize-query-result")]
|
||||
#[cfg(feature = "with-json")]
|
||||
mod select_json;
|
||||
|
||||
pub use executor::*;
|
||||
pub use select::*;
|
||||
#[cfg(feature = "serialize-query-result")]
|
||||
#[cfg(feature = "with-json")]
|
||||
pub use select_json::*;
|
||||
|
||||
use crate::{DatabaseConnection, QueryResult, Statement, TypeErr};
|
||||
|
@ -5,7 +5,7 @@ use crate::{
|
||||
use sea_query::{QueryBuilder, SelectStatement};
|
||||
use std::marker::PhantomData;
|
||||
|
||||
#[cfg(feature = "serialize-query-result")]
|
||||
#[cfg(feature = "with-json")]
|
||||
use super::select_json::{SelectJson, SelectTwoJson};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
@ -41,7 +41,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "serialize-query-result")]
|
||||
#[cfg(feature = "with-json")]
|
||||
pub fn as_json(self) -> SelectJson {
|
||||
SelectJson {
|
||||
query: self.query,
|
||||
@ -73,7 +73,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "serialize-query-result")]
|
||||
#[cfg(feature = "with-json")]
|
||||
pub fn as_json(self) -> SelectTwoJson {
|
||||
SelectTwoJson {
|
||||
query: self.query,
|
||||
|
@ -76,7 +76,7 @@ impl QueryResult {
|
||||
T::try_get(self, pre, col)
|
||||
}
|
||||
|
||||
#[cfg(feature = "serialize-query-result")]
|
||||
#[cfg(feature = "with-json")]
|
||||
pub fn as_json(&self, pre: &str) -> Result<serde_json::Value, TypeErr> {
|
||||
use serde_json::{Value, Map, json};
|
||||
match &self.row {
|
||||
|
Loading…
x
Reference in New Issue
Block a user