Skip to content

Commit 52e3ea8

Browse files
authored
Add a Value conformance for Foundation NSURL
1 parent 5f5ad81 commit 52e3ea8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Sources/SQLite/Foundation.swift

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,20 @@ extension UUID: Value {
8484
}
8585

8686
}
87+
88+
extension URL: Value {
89+
90+
public static var declaredDatatype: String {
91+
String.declaredDatatype
92+
}
93+
94+
public static func fromDatatypeValue(_ stringValue: String) -> URL {
95+
URL(string: stringValue)!
96+
}
97+
98+
public var datatypeValue: String {
99+
absoluteString
100+
}
101+
102+
}
103+

0 commit comments

Comments
 (0)