@@ -39,76 +39,76 @@ public extension Connection {
3939 /// The assigned types must be explicit.
4040 ///
4141 /// - Returns: A closure returning an SQL expression to call the function.
42- public func createFunction< Z : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( ) -> Z ) throws -> ( ( ) -> Expression < Z > ) {
42+ func createFunction< Z : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( ) -> Z ) throws -> ( ( ) -> Expression < Z > ) {
4343 let fn = try createFunction ( function, 0 , deterministic) { _ in block ( ) }
4444 return { fn ( [ ] ) }
4545 }
4646
47- public func createFunction< Z : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( ) -> Z ? ) throws -> ( ( ) -> Expression < Z ? > ) {
47+ func createFunction< Z : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( ) -> Z ? ) throws -> ( ( ) -> Expression < Z ? > ) {
4848 let fn = try createFunction ( function, 0 , deterministic) { _ in block ( ) }
4949 return { fn ( [ ] ) }
5050 }
5151
5252 // MARK: -
5353
54- public func createFunction< Z : Value , A : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A ) -> Z ) throws -> ( ( Expression < A > ) -> Expression < Z > ) {
54+ func createFunction< Z : Value , A : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A ) -> Z ) throws -> ( ( Expression < A > ) -> Expression < Z > ) {
5555 let fn = try createFunction ( function, 1 , deterministic) { args in block ( value ( args [ 0 ] ) ) }
5656 return { arg in fn ( [ arg] ) }
5757 }
5858
59- public func createFunction< Z : Value , A : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A ? ) -> Z ) throws -> ( ( Expression < A ? > ) -> Expression < Z > ) {
59+ func createFunction< Z : Value , A : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A ? ) -> Z ) throws -> ( ( Expression < A ? > ) -> Expression < Z > ) {
6060 let fn = try createFunction ( function, 1 , deterministic) { args in block ( args [ 0 ] . map ( value) ) }
6161 return { arg in fn ( [ arg] ) }
6262 }
6363
64- public func createFunction< Z : Value , A : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A ) -> Z ? ) throws -> ( ( Expression < A > ) -> Expression < Z ? > ) {
64+ func createFunction< Z : Value , A : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A ) -> Z ? ) throws -> ( ( Expression < A > ) -> Expression < Z ? > ) {
6565 let fn = try createFunction ( function, 1 , deterministic) { args in block ( value ( args [ 0 ] ) ) }
6666 return { arg in fn ( [ arg] ) }
6767 }
6868
69- public func createFunction< Z : Value , A : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A ? ) -> Z ? ) throws -> ( ( Expression < A ? > ) -> Expression < Z ? > ) {
69+ func createFunction< Z : Value , A : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A ? ) -> Z ? ) throws -> ( ( Expression < A ? > ) -> Expression < Z ? > ) {
7070 let fn = try createFunction ( function, 1 , deterministic) { args in block ( args [ 0 ] . map ( value) ) }
7171 return { arg in fn ( [ arg] ) }
7272 }
7373
7474 // MARK: -
7575
76- public func createFunction< Z : Value , A : Value , B : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A , B ) -> Z ) throws -> ( Expression < A > , Expression < B > ) -> Expression < Z > {
76+ func createFunction< Z : Value , A : Value , B : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A , B ) -> Z ) throws -> ( Expression < A > , Expression < B > ) -> Expression < Z > {
7777 let fn = try createFunction ( function, 2 , deterministic) { args in block ( value ( args [ 0 ] ) , value ( args [ 1 ] ) ) }
7878 return { a, b in fn ( [ a, b] ) }
7979 }
8080
81- public func createFunction< Z : Value , A : Value , B : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A ? , B ) -> Z ) throws -> ( Expression < A ? > , Expression < B > ) -> Expression < Z > {
81+ func createFunction< Z : Value , A : Value , B : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A ? , B ) -> Z ) throws -> ( Expression < A ? > , Expression < B > ) -> Expression < Z > {
8282 let fn = try createFunction ( function, 2 , deterministic) { args in block ( args [ 0 ] . map ( value) , value ( args [ 1 ] ) ) }
8383 return { a, b in fn ( [ a, b] ) }
8484 }
8585
86- public func createFunction< Z : Value , A : Value , B : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A , B ? ) -> Z ) throws -> ( Expression < A > , Expression < B ? > ) -> Expression < Z > {
86+ func createFunction< Z : Value , A : Value , B : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A , B ? ) -> Z ) throws -> ( Expression < A > , Expression < B ? > ) -> Expression < Z > {
8787 let fn = try createFunction ( function, 2 , deterministic) { args in block ( value ( args [ 0 ] ) , args [ 1 ] . map ( value) ) }
8888 return { a, b in fn ( [ a, b] ) }
8989 }
9090
91- public func createFunction< Z : Value , A : Value , B : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A , B ) -> Z ? ) throws -> ( Expression < A > , Expression < B > ) -> Expression < Z ? > {
91+ func createFunction< Z : Value , A : Value , B : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A , B ) -> Z ? ) throws -> ( Expression < A > , Expression < B > ) -> Expression < Z ? > {
9292 let fn = try createFunction ( function, 2 , deterministic) { args in block ( value ( args [ 0 ] ) , value ( args [ 1 ] ) ) }
9393 return { a, b in fn ( [ a, b] ) }
9494 }
9595
96- public func createFunction< Z : Value , A : Value , B : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A ? , B ? ) -> Z ) throws -> ( Expression < A ? > , Expression < B ? > ) -> Expression < Z > {
96+ func createFunction< Z : Value , A : Value , B : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A ? , B ? ) -> Z ) throws -> ( Expression < A ? > , Expression < B ? > ) -> Expression < Z > {
9797 let fn = try createFunction ( function, 2 , deterministic) { args in block ( args [ 0 ] . map ( value) , args [ 1 ] . map ( value) ) }
9898 return { a, b in fn ( [ a, b] ) }
9999 }
100100
101- public func createFunction< Z : Value , A : Value , B : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A ? , B ) -> Z ? ) throws -> ( Expression < A ? > , Expression < B > ) -> Expression < Z ? > {
101+ func createFunction< Z : Value , A : Value , B : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A ? , B ) -> Z ? ) throws -> ( Expression < A ? > , Expression < B > ) -> Expression < Z ? > {
102102 let fn = try createFunction ( function, 2 , deterministic) { args in block ( args [ 0 ] . map ( value) , value ( args [ 1 ] ) ) }
103103 return { a, b in fn ( [ a, b] ) }
104104 }
105105
106- public func createFunction< Z : Value , A : Value , B : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A , B ? ) -> Z ? ) throws -> ( Expression < A > , Expression < B ? > ) -> Expression < Z ? > {
106+ func createFunction< Z : Value , A : Value , B : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A , B ? ) -> Z ? ) throws -> ( Expression < A > , Expression < B ? > ) -> Expression < Z ? > {
107107 let fn = try createFunction ( function, 2 , deterministic) { args in block ( value ( args [ 0 ] ) , args [ 1 ] . map ( value) ) }
108108 return { a, b in fn ( [ a, b] ) }
109109 }
110110
111- public func createFunction< Z : Value , A : Value , B : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A ? , B ? ) -> Z ? ) throws -> ( Expression < A ? > , Expression < B ? > ) -> Expression < Z ? > {
111+ func createFunction< Z : Value , A : Value , B : Value > ( _ function: String , deterministic: Bool = false , _ block: @escaping ( A ? , B ? ) -> Z ? ) throws -> ( Expression < A ? > , Expression < B ? > ) -> Expression < Z ? > {
112112 let fn = try createFunction ( function, 2 , deterministic) { args in block ( args [ 0 ] . map ( value) , args [ 1 ] . map ( value) ) }
113113 return { a, b in fn ( [ a, b] ) }
114114 }
0 commit comments