Fix for GRDB+SQLCipher

This commit is contained in:
Gwendal Roué committed 2020-07-23 07:55:34 +02:00
1 parent 25baecdc39
commit d08d3b311f
1 file changed
-7
@@ -26,17 +26,10 @@ private struct SQLOrderingGenerator: _SQLOrderingTermVisitor {
resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " ASC"
case .desc(let expression):
resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " DESC"
#if GRDBCUSTOMSQLITE
case .ascNullsLast(let expression):
resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " ASC NULLS LAST"
case .descNullsFirst(let expression):
resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " DESC NULLS FIRST"
#elseif !GRDBCIPHER
case .ascNullsLast(let expression):
resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " ASC NULLS LAST"
case .descNullsFirst(let expression):
resultSQL = try expression.expressionSQL(context, wrappedInParenthesis: false) + " DESC NULLS FIRST"
#endif
}
}