File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1777,22 +1777,28 @@ impl<'s, S: Storage<'s>> Db<S> {
17771777 let mut rows = vec ! [ ] ;
17781778 let mut idx = 0 ;
17791779 for col in & handle. metadata . keys {
1780+ let default_expr = col. default_gen . as_ref ( ) . map ( |gen| format ! ( "{}" , gen ) ) ;
1781+
17801782 rows. push ( vec ! [
17811783 json!( col. name) ,
17821784 json!( true ) ,
17831785 json!( idx) ,
17841786 json!( col. typing. to_string( ) ) ,
17851787 json!( col. default_gen. is_some( ) ) ,
1788+ json!( default_expr) ,
17861789 ] ) ;
17871790 idx += 1 ;
17881791 }
17891792 for col in & handle. metadata . non_keys {
1793+ let default_expr = col. default_gen . as_ref ( ) . map ( |gen| format ! ( "{}" , gen ) ) ;
1794+
17901795 rows. push ( vec ! [
17911796 json!( col. name) ,
17921797 json!( false ) ,
17931798 json!( idx) ,
17941799 json!( col. typing. to_string( ) ) ,
17951800 json!( col. default_gen. is_some( ) ) ,
1801+ json!( default_expr) ,
17961802 ] ) ;
17971803 idx += 1 ;
17981804 }
@@ -1807,6 +1813,7 @@ impl<'s, S: Storage<'s>> Db<S> {
18071813 "index" . to_string( ) ,
18081814 "type" . to_string( ) ,
18091815 "has_default" . to_string( ) ,
1816+ "default_expr" . to_string( ) ,
18101817 ] ,
18111818 rows,
18121819 ) )
You can’t perform that action at this time.
0 commit comments