@@ -25,10 +25,11 @@ public static MethodDeclaration OneDeclare(string funcName, string queryTextCons
25
25
]
26
26
) ;
27
27
28
- return new MethodDeclaration ( funcName , GetMethodArgs ( argInterface , parameters ) , new List < IComposable >
29
- {
30
- new WithResource ( Variable . Pool . AsProperty ( ) , Variable . Client . AsVar ( ) , withResourceBody )
31
- } ) ;
28
+ return new MethodDeclaration ( funcName , GetMethodArgs ( argInterface , parameters ) ,
29
+ new List < IComposable >
30
+ {
31
+ new WithResource ( Variable . Pool . AsProperty ( ) , Variable . Client . AsVar ( ) , withResourceBody )
32
+ } ) ;
32
33
}
33
34
34
35
private static string ? GetMethodArgs ( string argInterface , IList < Parameter > parameters )
@@ -39,7 +40,8 @@ public static MethodDeclaration OneDeclare(string funcName, string queryTextCons
39
40
public static MethodDeclaration ManyDeclare ( string funcName , string queryTextConstant , string argInterface ,
40
41
string returnInterface , IList < Parameter > parameters , IList < Column > columns )
41
42
{
42
- var listAppend = new ListAppend ( Variable . Entities . AsVar ( ) , new NewObject ( returnInterface , GetColumnsInitExpressions ( columns ) ) ) ;
43
+ var listAppend = new ListAppend ( Variable . Entities . AsVar ( ) ,
44
+ new NewObject ( returnInterface , GetColumnsInitExpressions ( columns ) ) ) ;
43
45
IEnumerable < IComposable > withResourceBody = new List < IComposable > ( ) ;
44
46
var queryParams = GetQueryParams ( argInterface , parameters ) ;
45
47
withResourceBody = withResourceBody . AppendIfNotNull ( queryParams ) ;
@@ -53,10 +55,11 @@ public static MethodDeclaration ManyDeclare(string funcName, string queryTextCon
53
55
]
54
56
) ;
55
57
56
- return new MethodDeclaration ( funcName , GetMethodArgs ( argInterface , parameters ) , new List < IComposable >
57
- {
58
- new WithResource ( Variable . Pool . AsProperty ( ) , Variable . Client . AsVar ( ) , withResourceBody )
59
- } ) ;
58
+ return new MethodDeclaration ( funcName , GetMethodArgs ( argInterface , parameters ) ,
59
+ new List < IComposable >
60
+ {
61
+ new WithResource ( Variable . Pool . AsProperty ( ) , Variable . Client . AsVar ( ) , withResourceBody )
62
+ } ) ;
60
63
}
61
64
62
65
public static MethodDeclaration ExecDeclare ( string funcName , string queryTextConstant , string argInterface ,
@@ -68,13 +71,14 @@ public static MethodDeclaration ExecDeclare(string funcName, string queryTextCon
68
71
withResourceBody = withResourceBody . Concat (
69
72
[
70
73
PrepareQuery ( queryTextConstant ) ,
71
- ExecuteStmt ( queryTextConstant , queryParams ) ,
74
+ ExecuteStmt ( queryTextConstant , queryParams )
72
75
]
73
76
) ;
74
- return new MethodDeclaration ( funcName , GetMethodArgs ( argInterface , parameters ) , new List < IComposable >
75
- {
76
- new WithResource ( Variable . Pool . AsProperty ( ) , Variable . Client . AsVar ( ) , withResourceBody )
77
- } ) ;
77
+ return new MethodDeclaration ( funcName , GetMethodArgs ( argInterface , parameters ) ,
78
+ new List < IComposable >
79
+ {
80
+ new WithResource ( Variable . Pool . AsProperty ( ) , Variable . Client . AsVar ( ) , withResourceBody )
81
+ } ) ;
78
82
}
79
83
80
84
public static MethodDeclaration ExecLastIdDeclare ( string funcName , string queryTextConstant , string argInterface ,
@@ -90,10 +94,11 @@ public static MethodDeclaration ExecLastIdDeclare(string funcName, string queryT
90
94
new SimpleExpression ( $ "return { Variable . Client . AsVar ( ) } .last_id")
91
95
]
92
96
) ;
93
- return new MethodDeclaration ( funcName , GetMethodArgs ( argInterface , parameters ) , new List < IComposable >
94
- {
95
- new WithResource ( Variable . Pool . AsProperty ( ) , Variable . Client . AsVar ( ) , withResourceBody )
96
- } ) ;
97
+ return new MethodDeclaration ( funcName , GetMethodArgs ( argInterface , parameters ) ,
98
+ new List < IComposable >
99
+ {
100
+ new WithResource ( Variable . Pool . AsProperty ( ) , Variable . Client . AsVar ( ) , withResourceBody )
101
+ } ) ;
97
102
}
98
103
99
104
private static SimpleStatement ? GetQueryParams ( string argInterface , IList < Parameter > parameters )
0 commit comments