File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Sources/StructuredQueriesCore Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,7 @@ extension QueryFragment: ExpressibleByStringInterpolation {
150150 }
151151
152152 public mutating func appendLiteral( _ literal: String ) {
153+ guard !literal. isEmpty else { return }
153154 segments. append ( . sql( literal) )
154155 }
155156
@@ -183,7 +184,7 @@ extension QueryFragment: ExpressibleByStringInterpolation {
183184 ///
184185 /// - Parameter sql: A raw query string.
185186 public mutating func appendInterpolation( raw sql: String ) {
186- segments . append ( . sql( sql ) )
187+ appendLiteral ( sql)
187188 }
188189
189190 /// Append a raw lossless string to the interpolation.
@@ -200,7 +201,7 @@ extension QueryFragment: ExpressibleByStringInterpolation {
200201 ///
201202 /// - Parameter sql: A raw query string.
202203 public mutating func appendInterpolation( raw sql: some LosslessStringConvertible ) {
203- segments . append ( . sql( sql . description) )
204+ appendLiteral ( sql. description)
204205 }
205206
206207 /// Append a query binding to the interpolation.
You can’t perform that action at this time.
0 commit comments