@@ -26,37 +26,37 @@ pub fn is_column_nullable(
2626 where_clause,
2727 ..
2828 } = select. body . select
29- {
30- // If a column is declared as not null we only need to prove that the table it came from is always present
31- if notnull {
32- return get_used_table_name ( table_name, & from) . map ( |_| NullableResult :: NotNull ) ;
33- }
29+ {
30+ // If a column is declared as not null we only need to prove that the table it came from is always present
31+ if notnull {
32+ return get_used_table_name ( table_name, & from) . map ( |_| NullableResult :: NotNull ) ;
33+ }
3434
35- let used_table_name = get_used_table_name ( table_name, & from) ?;
35+ let used_table_name = get_used_table_name ( table_name, & from) ?;
3636
37- if let Some ( where_clause) = where_clause {
38- let result = test_expr ( column, used_table_name, & where_clause) ;
39- if result. is_some ( ) {
40- return result;
41- }
37+ if let Some ( where_clause) = where_clause {
38+ let result = test_expr ( column, used_table_name, & where_clause) ;
39+ if result. is_some ( ) {
40+ return result;
4241 }
42+ }
4343
44- if let Some ( joins) = & from. joins {
45- // https://www.sqlite.org/lang_select.html#special_handling_of_cross_join_
46- return joins. iter ( ) . find_map ( |join| match join {
47- ast:: JoinedSelectTable {
48- operator :
49- ast:: JoinOperator :: Comma
50- | ast:: JoinOperator :: TypedJoin ( None )
51- | ast:: JoinOperator :: TypedJoin ( Some ( ast:: JoinType :: INNER ) )
52- | ast:: JoinOperator :: TypedJoin ( Some ( ast:: JoinType :: CROSS ) ) ,
53- constraint : Some ( ast:: JoinConstraint :: On ( expr) ) ,
54- ..
55- } => test_expr ( column, used_table_name, expr) ,
56- _ => None ,
57- } ) ;
58- }
44+ if let Some ( joins) = & from. joins {
45+ // https://www.sqlite.org/lang_select.html#special_handling_of_cross_join_
46+ return joins. iter ( ) . find_map ( |join| match join {
47+ ast:: JoinedSelectTable {
48+ operator :
49+ ast:: JoinOperator :: Comma
50+ | ast:: JoinOperator :: TypedJoin ( None )
51+ | ast:: JoinOperator :: TypedJoin ( Some ( ast:: JoinType :: INNER ) )
52+ | ast:: JoinOperator :: TypedJoin ( Some ( ast:: JoinType :: CROSS ) ) ,
53+ constraint : Some ( ast:: JoinConstraint :: On ( expr) ) ,
54+ ..
55+ } => test_expr ( column, used_table_name, expr) ,
56+ _ => None ,
57+ } ) ;
5958 }
59+ }
6060
6161 None
6262}
0 commit comments