@@ -37,6 +37,8 @@ pub mod values {
37
37
38
38
/// A ltree [label path](https://www.postgresql.org/docs/current/ltree.html#LTREE-DEFINITIONS).
39
39
#[ derive( Debug , PartialEq , Eq , Clone , FromSqlRow , AsExpression ) ]
40
+ #[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
41
+ #[ cfg_attr( feature = "serde" , serde( transparent) ) ]
40
42
#[ diesel( sql_type = crate :: sql_types:: Ltree ) ]
41
43
pub struct Ltree ( pub String ) ;
42
44
@@ -96,18 +98,18 @@ pub mod functions {
96
98
use crate :: sql_types:: * ;
97
99
use diesel:: sql_types:: * ;
98
100
99
- sql_function ! ( fn subltree( ltree: Ltree , start: Int4 , end: Int4 ) -> Ltree ) ;
100
- sql_function ! ( fn subpath( ltree: Ltree , offset: Int4 , len: Int4 ) -> Ltree ) ;
101
- // sql_function !(fn subpath(ltree: Ltree, offset: Int4) -> Ltree);
102
- sql_function ! ( fn nlevel( ltree: Ltree ) -> Int4 ) ;
103
- //sql_function !(fn index(a: Ltree, b: Ltree) -> Int4);
104
- sql_function ! ( fn index( a: Ltree , b: Ltree , offset: Int4 ) -> Int4 ) ;
105
- sql_function ! ( fn text2ltree( text: Text ) -> Ltree ) ;
106
- sql_function ! ( fn ltree2text( ltree: Ltree ) -> Text ) ;
107
- sql_function ! ( fn lca( ltrees: Array <Ltree >) -> Ltree ) ;
108
-
109
- sql_function ! ( fn lquery( x: Text ) -> Lquery ) ;
110
- sql_function ! ( fn ltxtquery( x: Text ) -> Ltxtquery ) ;
101
+ define_sql_function ! ( fn subltree( ltree: Ltree , start: Int4 , end: Int4 ) -> Ltree ) ;
102
+ define_sql_function ! ( fn subpath( ltree: Ltree , offset: Int4 , len: Int4 ) -> Ltree ) ;
103
+ // define_sql_function !(fn subpath(ltree: Ltree, offset: Int4) -> Ltree);
104
+ define_sql_function ! ( fn nlevel( ltree: Ltree ) -> Int4 ) ;
105
+ //define_sql_function !(fn index(a: Ltree, b: Ltree) -> Int4);
106
+ define_sql_function ! ( fn index( a: Ltree , b: Ltree , offset: Int4 ) -> Int4 ) ;
107
+ define_sql_function ! ( fn text2ltree( text: Text ) -> Ltree ) ;
108
+ define_sql_function ! ( fn ltree2text( ltree: Ltree ) -> Text ) ;
109
+ define_sql_function ! ( fn lca( ltrees: Array <Ltree >) -> Ltree ) ;
110
+
111
+ define_sql_function ! ( fn lquery( x: Text ) -> Lquery ) ;
112
+ define_sql_function ! ( fn ltxtquery( x: Text ) -> Ltxtquery ) ;
111
113
}
112
114
113
115
pub mod dsl {
0 commit comments