File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Tests/StructuredQueriesTests Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,15 @@ extension SnapshotTests {
2828 }
2929}
3030
31+
32+
33+
34+
35+
36+
37+
38+
39+
3140// ---
3241import Foundation
3342import SQLite3
@@ -49,6 +58,34 @@ func _$dateTime(
4958var __ $dateTime: CustomFunction < String ? , Date , Never > {
5059 CustomFunction ( " dateTime " , isDeterministic: false , body: dateTime ( _: ) )
5160}
61+
62+ //struct DateTime: DatabaseFunction {
63+ // typealias Input = String?
64+ ////
65+ // typealias Output = Date
66+ ////
67+ // typealias Failure = Never
68+ ////
69+ // typealias Result = SQLQueryExpression<Date>
70+ //
71+ // let name = "dateTime"
72+ // let isDeterministic = false
73+ // func callAsFunction(
74+ // _ input: some QueryExpression<String?> = String?.none
75+ // ) -> Result {
76+ // SQLQueryExpression("\(quote: name)(\(input))")
77+ // }
78+ //}
79+ // ---
80+ //protocol DatabaseFunction<Input, Output, Failure> {
81+ // associatedtype Input
82+ // associatedtype Output: QueryBindable where Output.QueryValue == Result.QueryValue
83+ // associatedtype Failure: Error
84+ // associatedtype Result: QueryExpression
85+ // var name: String { get }
86+ // var isDeterministic: Bool { get }
87+ // func callAsFunction(_ input: some QueryExpression<Input>) throws(Failure) -> Result
88+ //}
5289// ---
5390// Library code:
5491@available ( macOS 14 , * )
You can’t perform that action at this time.
0 commit comments