1. Project Clover database Wed Nov 12 2025 05:07:35 UTC
  2. Package guru.mikelue.foxglove.setting

File GeneratingUtils.java

 

Coverage histogram

../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

10
12
1
1
38
28
6
0.5
12
1
6

Classes

Class Line # Actions
GeneratingUtils 9 12 0% 6 2
0.913043591.3%
 

Contributing tests

This file is covered by 49 tests. .

Source view

1    package guru.mikelue.foxglove.setting;
2   
3    import java.util.Set;
4   
5    import guru.mikelue.foxglove.ColumnMeta;
6   
7    import static guru.mikelue.foxglove.ColumnMeta.Property.*;
8   
 
9    interface GeneratingUtils {
 
10  918 toggle static boolean checkAutoGenerating(
11    ColumnMeta columnMeta,
12    Set<ColumnMeta.Property> autoGenerateProperties
13    ) {
14  918 var columnProperties = columnMeta.properties();
15   
16  918 if (columnProperties.isEmpty()) {
17  282 return true;
18    }
19   
20  636 if (columnProperties.contains(GENERATED)) {
21  63 return autoGenerateProperties.contains(GENERATED);
22    }
23   
24  573 if (columnProperties.contains(AUTO_INCREMENT)) {
25  62 return autoGenerateProperties.contains(AUTO_INCREMENT);
26    }
27   
28  511 if (columnProperties.contains(NULLABLE)) {
29  288 return autoGenerateProperties.contains(NULLABLE);
30    }
31   
32  223 if (columnProperties.contains(DEFAULT_VALUE)) {
33  223 return autoGenerateProperties.contains(DEFAULT_VALUE);
34    }
35   
36  0 return true;
37    }
38    }